jupyterlab-latex
jupyterlab-latex copied to clipboard
pdf build fails with BibTeX error
Attempting to buld a simple latex
file :
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\title{Introduction to \LaTeX{}}
\author{Author's Name}
\maketitle
\begin{abstract}
The abstract text goes here.
\end{abstract}
\section{Introduction}
Here is the text of your introduction.
\begin{equation}
\label{simple_equation}
\alpha = \sqrt{ \beta }
\end{equation}
\subsection{Subsection Heading Here}
Write your subsection text here.
\begin{figure}
\centering
\includegraphics[width=3.0in]{f1.png}
\caption{Simulation Results}
\label{simulationfigure}
\end{figure}
\section{Conclusion}
Write your conclusion here.
\end{document}
I got this log in the jupyterlab
LaTex error page:
This is BibTeX, Version 0.99d (TeX Live 2015/Debian)
The top-level auxiliary file: test.aux
I found no \citation commands---while reading file test.aux
I found no \bibdata command---while reading file test.aux
I found no \bibstyle command---while reading file test.aux
(There were 3 error messages)
On the server side I had this printed in the shell logs:
[E 22:11:08.462 LabApp] 500 GET /latex/Geoscience_250279/test.tex?1517346661474 (24.60.210.45) 6748.27ms referer=http://localhost.com:8888/lab?
[E 22:11:15.299 LabApp] LaTeX command `bibtex test` errored with code: 2
[E 22:11:15.300 LabApp] {
"Host": "localhost:8888",
"Connection": "keep-alive",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
"Authorization": "token 61a9550d5582b66719ad3d0182eff3f073044bcbc98e175b",
"Content-Type": "application/json",
"Accept": "*/*",
"Referer": "http://localhost.com:8888/lab?",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "en-US,en;q=0.9,it;q=0.8",
"Cookie": "_xsrf=2|0b5c6cb6|ca94c1b60c2d87a63763bb86543ebd5e|1515963402; username-epinux-com-7777=\"2|1:0|10:1515986637|24:username-epinux-com-7777|44:ZGNmZThiZWRkMTk1NDM1OWEzYmEwZTc1NzU4YmFhYTM=|063e5c9ce720c0d41be769861981f393a24732b7b2fa0bb6b090f05303eeee48\"; G_ENABLED_IDPS=google; username-epinux-com-8888=\"2|1:0|10:1517346668|24:username-epinux-com-8888|44:M2U0NzhhMjBhYjFkNGQ5N2FkYmI0NGU4NjcyNWRmZmQ=|c1016701feba63f47a89022f5470618fec41aede7153c1c731457aae9bea778e\""
}
[E 22:11:15.300 LabApp] 500 GET /latex/Geoscience_250279/test.tex?1517346668437 (24.60.210.45) 6787.85ms referer=http://localhost:8888/lab?
Did you already have an test.aux
file before running show LaTeX preview? If so, does deleting that and retrying fix it?
I checked, there is no test.aux
. (I'm running git master for both jupyterlab
and LaTex
extension.
OH! i see what's happening. you have a .bib file in the same directory and we're using that as a current proxy for you wanting to run bibtex. We'll need a smarter check for whether someone is using a bibfile in https://github.com/jupyterlab/jupyterlab-latex/blob/b52ffaa8bd460c87491bc9520ea2ef66f6194d40/jupyterlab_latex/init.py#L142-L151
We were trying to avoid parsing the file as a first pass… but i think we may need to do so…
@ian-r-rose, does that sound right to you?
Yes, that sounds correct. Does it fix the problem to temporarily remove the .bib
file?
I confirm, removing the .bib
files the pdf is generated correctly. No LaTex
errors, but the pdf preview window do not render the pdf (spinning jupyter logo ). The built pdf is 2.5 Mb in total size and has one image. If I double-click on the pdf file from the jupyterlab file list, it takes a very long time, but eventually, gets rendered.
That sounds like an issue with pdf.js… @ian-r-rose, any reason why pdf.js would timeout?
@epifanio do you have a link to these resources publicly anywhere that we could test and investigate?
I can add a temporary unix user on jupyterhub for you to investigate the issue.
I have the same issue. I see the problem had been identified. It shouldn't be too hard to parse the tex file for any reference to the bib package right? Maybe also parse the included tex files...
This is a really cool addition to Jupyter!