Reputation: 872
I'm attempting to convert a Jupyter Notebook to a pdf, but it throws this error at me:
nbconvert.exporters.pdf.LatexFailed: PDF creating failed, captured latex output:
Failed to run "xelatex notebook.tex -quiet" command:
notebook.tex:411: Missing $ inserted
notebook.tex:411: Extra }, or forgotten
notebook.tex:412: Missing $ inserted
It works if I take this LaTex out of my notebook:
$ y=\frac{1}{2}x+3 $
I'm not familiar with LaTex that much, but it displays correctly in the .ipynb file, so I'm assuming there is nothing wrong with this syntax. Is this an issue with nbconvert? Thank you!
Upvotes: 1
Views: 3640
Reputation: 872
After playing around a bit, I have solved the problem. It is an issue with LaTeX syntax. I wish jupyter notebooks make it to where the cell would show an error, but it doesn't. The correct syntax is the same as above except no spaces between the dollar signs. After changing that line of code to:
$y=\frac{1}{2}x+3$
nbconvert successfully made the PDF.
Upvotes: 2