-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
Description
Pandoc does not translate equation references from latex to rst correctly. Consider the following very simple latex file, named simple.tex:
\documentclass{article}
\begin{document}
The Euler Identity is given by:
\begin{equation}
e^{i\pi} + 1 = 0
\label{euler}
\end{equation}
and we can refer back to the Euler Identity as Eq. \ref{euler}.
\end{document}
which demonstrates how to use the \label and \ref latex directives to refer to equations.
Translating the above document to restructured text using the command
$ pandoc -f latex -t rst simple.tex > simple.rst
results in a file simple.rst:
The Euler Identity is given by:
.. math::
e^{i\pi} + 1 = 0
\label{euler}
and we can refer back to the Euler Identity as Eq. [euler].
However, this is not the correct way to refer to equations in ReST. According to the sphinx implementation, the correct output should be:
The Euler Identity is given by:
.. math::
:label: euler
e^{i\pi} + 1 = 0
and we can refer back to the Euler Identity as Eq. :eq:`euler`.