Issue
I'm running into an error during conversion from Jupyter Notebook to PDF:
nbconvert failed: PDF creating failed
Then I tried running the pdf-converter from the command line and received the following error:
! Missing $ inserted.
<inserted text>
$
l.291 ... Till att börja med har vi \$\frac{1}{2}
?
! Emergency stop.
<inserted text>
$
l.291 ... Till att börja med har vi \$\frac{1}{2}
! ==> Fatal error occurred, no output PDF file produced!
I then get a line of exceptions ending with:
OSError: PDF creating failed
I have looked through the document and I found no unmatched $
anywhere.
Solution
Jupyter converts a notebook to PDF by first converting it to LaTeX, and then using your local latex to convert it to pdf. You get this error because there is an unmatched $
sign in the LaTeX document nbconvert
creates, and the error message you see is actually latex failing because of it.
You could try converting the document in two steps. First run
jupyter nbconvert thenotebook.ipynb --to latex
Then examine the LaTeX file around line 291 to see if there is indeed an unmatched $
. My guess is you will find one. When you found and corrected it, you can do the second step and convert it to pdf with latex
:
latex thenotebook.tex
If you cannot find the $
symbol in the LaTeX document, you should expand the question with the lines surrounding line 291 so that we can help.
Answered By - Martin Stancsics
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.