Exporting Math to Word or LibreOffice

Any of you with an even fleeting familiarity with Irreal know that we are not fans of Word and its evil siblings. Still, even though our official position is that Word—in all its incarnations—is the spawn of the Devil, we recognize some folks have no choice but to use it, at least for the final document and, in the ecumenical spirit, Irreal is here to pass on some helpful information.

Over at Emacs Notes there’s a post from last year that has some advice for people exporting math from Org-mode to LibreOffice or Word. It turns out that neither do very well with LaTeX markup even if it’s converted to, say, MathML first. The problem appears to be that LibreOffice doesn’t do a good job of importing MathML. The other possibility is to convert the math to a PNG but then the results are not editable.

The correct way, according to the post, is to use Starmath markup instead. It’s native to LibreOffice and renders well. If you often export mathematical content from Org to LibreOffice, you should take a look at the post to see how use Starmath. There are a couple problems with this solution. The major disadvantage is that you lose document portability. If you use Starmath markup you can no longer export to HTML or LaTeX. Still, if you absolutely must provide ODT format documents but want to write in a sane environment, this tip may be a help.

AFTERWORD

Just as I was getting ready to publish this, I noticed that there was a follow-on post from Emacs Notes on how to mix Starmath and LaTeX in the same Org file. Actually, the post is a bit more general and shows how to conditionally include content depending on what exporter you’re using. A great addition to the previous post.

This entry was posted in General and tagged , . Bookmark the permalink.