Move From/To to the Side of an Operator in LibreOffice

Like any decent office, LibreOffice (OpenOffice, etc.) has a formula editor to edit mathematical formulae. I wanted to have the from and to arguments to the side of the operator, but this does not seem to be foreseen. LibreOffice wants to place them at the bottom and top respectively, but if using a formula inside the main text, this really doesn’t look good. That’s the top of the illustration here.

formulae

Here’s how I worked around this limitation: I gave up on the from and to arguments, and used subscripts and superscripts instead.

Here is the code:
R = 1 - size*0.6 {{1} over {2}} sum from{i=1} to{n} lline Z_i - R_i rline
and:
R = 1 - size*0.6 {{1} over {2}} sum^{n}_{i=1} lline Z_i - R_i rline

I also set a smaller size for the 1/2 division. Obviously this applies to any operator, sums, products, etc.

Why I Ditched Sweave for odfWeave

Well, I didn’t really – not completely. Sweave is an incredible tool for research. It facilitates replicable research to the benefit of researchers, too. Here is the main reason that cut it for me: getting back to a paper after a few weeks or months – think working on multiple papers, think hearing back from reviewers –, and not remembering all the details. For example, a figure or number looks odd, and by using Sweave I can immediately see where it comes from. Another reason is that I don’t want to avoid the following situation from the other end: I recently asked an author about a detail in a recently published paper. The response was “I can’t remember, I did the analysis some 2 year ago.” Using a single Sweave file, I also avoid confusion on the level of filenames (compare here or here).

So what is the problem with Sweave? There are two. First, on some papers I collaborate with others who don’t use R and Latex. Second, most journals in political sciences and sociology don’t accept Latex files. Enters odfWeave, doing almost everything Sweave does using LibreOffice rather than Latex. Creating Word documents for commenting and submission is easy. It also plays nicely with Zotero – which I find a bit easier to work in than Bibtex. (One annoyance: odfWeave hates relative paths.)

I said that I did not really ditch Sweave. For first drafts, I still like the accessibility, non-distraction, and compatibility of a plain text file. Usually I use heavily commented R-code, but Sweave is never far, especially as I can keep all analysis and plots in a single file.