# Fractions in latex2rtf

I am attempting to write a fraction using latex2rtf. I use a Linux Mint system with latex2rtf installed from the package manager, which at the time of writing is version 2.3.8 (released Jule 16 2014). My MWE is a file test.tex containing

\documentclass[10pt]{article}

\begin{document}

$$\label{eq:1} \frac{1}{2}$$

\end{document}


Rendering it as .rtf and converting it to PDF (for a consistent view)

latex2rtf test.tex
libreoffice --headless --invisible --norestore --convert-to pdf test.rtf


i get a blank document (except for the equation number). Am I doing something wrong or is there a bug in latex2rtf?

The bug¹ is not in latex2rtf but in LibreOffice. In Microsoft Word the generated file shows the equation:

The default conversion of equations for latex2rtf is to use EQ Fields, which is a (rather outdated) format for representing equations. The fraction in the example is converted to \\F(1,2), which is interpreted by Word as an equation object (see https://jay-freedman.info/EQ%20field%20switches.htm for more examples).

LibreOffice tries to convert the EQ fields as well, however "Interpretation of field functions in rtf files has been buggy in any version of OpenOffice and LibreOffice" (https://sourceforge.net/p/latex2rtf/mailman/message/28943468/).

If you don't have access to Microsoft Word, an alternative is to use tex4ht to convert to .odt and from there to rtf, using:

mk4ht oolatex test.tex

libreoffice --headless --invisible --norestore --convert-to rtf test.odt

This rtf file shows the equation in LibreOffice (and Word), and clicking on the equation shows the LibreOffice equation editor which uses a somewhat LaTeX-like syntax.

¹The documentation for latex2rtf states that some might consider RTF to be a bug and that the syntax and semantics of RTF are somewhat artistic, i.e., you can generate a syntactically correct RTF file that cannot be displayed by some/most word processors, however for these fractions it looks like LibreOffice is to blame.

• The math importing features in Word processors are interesting. Word cannot open math objects in ODT files that doesn't contain annotations in this TeX like syntax. Even if the ODT specification doesn't seem to include information about this syntax nor that it should be required, only MathML is stated. This is why one must use LibreOffice which can create the annotations from MathML. The problem is, that it sometimes creates wrong annotations and it also modify the original MathML to this wrong form. More details in this mail thread: tug.org/pipermail/tex4ht/2016q4/001651.html – michal.h21 Oct 27 '17 at 17:15