-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
Explain the problem.
I have a LaTeX document which uses the amsmath align environment. I need to convert it for inclusion in a LibreOffice odt document. Due to the way LibreOffice interprets MathML as formulas, characters are rendered as upside-down question marks, indicating missing arguments.
Example source:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
hello world
\begin{align*}
y &= {(x+1)}^2 \\
&= x^2 + 2x + 1.
\end{align*}
\end{document}
Example output generated by pdflatex:
Command for conversion from LaTeX to odt:
pandoc -f latex -o main.odt main.tex
How the converted document looks in LibreOffice Writer:
LibreOffice documentation indicates this is expected behavior from their side:
- Formulas over multiple lines says to use the
newline
operator for multiline formulas. - Aligning formulas using equals sign says to provide dummy arguments to the equals "operator" using a
{}={}
pattern. (This more closely matches my use case compared tonewline
.)
Therefore, unlike #6714 or #9235, I don't think the incorrect rendering would be accepted as a valid report by them this time.
I believe pandoc should be taught about LibreOffice's newline
operator and/or the {}={}
trick when generating mathml for odt. I understand if this isn't made default behavior; I suggest a flag such as --libreoffice-compat
or so could accommodate the other software's expectations.
Pandoc version?
3.7.0.2