You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\begin{align}
a &= b\\ % comment1
c &= d % comment2
\end{align}
compiles fine with pdflatex, but pandoc -o foo.docx foo.tex throws the error
[WARNING] Could not convert TeX math \begin{aligned}
a &= b\\ % comment1
c &= d % comment2\end{aligned}, rendering as TeX:
mment2\end{aligned}
^
unexpected eof
expecting "&", "\\\\", white space or "\\end"
In markdown it becomes
$$\begin{aligned}
a &= b\\ % comment1
c &= d % comment2\end{aligned}$$
so the \end{aligned}$$ is commented out as well. In my opinion there should be a line break before \end{aligned}, regardless comments in the previous line.
Pandoc version?
What version of pandoc are you using, on what OS?
This is really just about the LaTeX reader and doesn't have anything to do with docx specifically.
% pandoc -f latex -t native
\begin{align}
a &= b\\ % comment1
c &= d % comment2
\end{align}
[ Para
[ Math
DisplayMath
"\\begin{aligned}\n a &= b\\\\ % comment1\n c &= d % comment2\\end{aligned}"
]
]
There is code in the reader to change the align environment to something that can go in a math context (hence aligned), and your case shows that it's broken.
Explain the problem.
The environment
compiles fine with pdflatex, but
pandoc -o foo.docx foo.tex
throws the errorIn markdown it becomes
so the
\end{aligned}$$
is commented out as well. In my opinion there should be a line break before\end{aligned}
, regardless comments in the previous line.Pandoc version?
What version of pandoc are you using, on what OS?
on Fedora 36 with TeXLive 2021 from the official repository.
The text was updated successfully, but these errors were encountered: