jupyterlab-latex
jupyterlab-latex copied to clipboard
The equation numbers do not appear in the PDF preview
In the PDF preview, the equation numbers do not appear.
When the following code is compiled, the PDF preview does not show (1) but (??). However, when the PDF is opened with Acrobat Reader, it shows (1) correctly.
\documentclass{article}
\begin{document}
\begin{eqnarray}
E = mc^2 \label{eq:emc2}
\end{eqnarray}
The equation (\ref{eq:emc2}) is already known.
\end{document}
I also have this issue. It seems as though the LaTeX extension is only compiling the document once, hence the undefined references. A workaround is to include the line:
\usepackage[backend=biber]{biblatex}
(remove the backend bit, if you are not using biber) and then creating a blank .bib file. (e.g. touch empty.bib)
\documentclass{article}
\usepackage[backend=biber]{biblatex}
\begin{document}
\begin{eqnarray}
E = mc^2 \label{eq:emc2}
\end{eqnarray}
The equation (\ref{eq:emc2}) is already known.
\end{document}
I also have the same problem, and the solution of using bibtex does not work, the extension needs to run pdflatex twice and then bibtex
The solution to the problem is to add the line c.LatexConfig.run_times = 3 at the end of the file jupyter_notebook_config.py
Thanks @manmoi01 for the solution. For me c.LatexConfig.run_times = 2 was enough. This should really be mentioned in the README.
@tavin Happy to accept pull requests for improved documentation!
Hi @manmoi01 @tavin for the solution!
@ian-r-rose I created the PR to update documentation, Binder and the sample file to demonstrate equation references working.