I have been experimenting with pymarkdown and other stuff in jupyter. It has been working fine but suddenly nbconvert began to have problems when exporting to PDF. Then, I uninstalled and re-installed with pip install nbconvert. Still does not work.
So I am trying to convert a simple file as a test:
x = 1
Markdown : While $ beta = 1 = x $ then x is {{x}}
This works just fine on notebook. First, I did jupyter nbconvert --to html try.ipynb. It looks great! But when I do jupyter nbconvert --to pdf try.ipynb I get some huge troubleshooting. cmd does not allow me to copy such a huge output, but in the notebook it looks like this:
500 : Internal Server Error
The error was:
nbconvert failed: PDF creating failed, captured latex output:
This is XeTeX, Version 3.14159265-2.6-0.99991 (MiKTeX 2.9 64-bit)
entering extended mode
(notebook.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 68 languages loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size11.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def"))
("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\mathpazo.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")
("C:\Program Files\MiKTeX 2.9\tex\xelatex\xetex-def\xetex.def")))
("C:\Program Files\MiKTeX 2.9\tex\latex\caption\caption.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\caption\caption3.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\adjustbox\adjustbox.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\xkeyval\xkeyval.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\xkeyval.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\xkvutils.tex")))
("C:\Program Files\MiKTeX 2.9\tex\latex\adjustbox\adjcalc.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\adjustbox\trimclip.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\collectbox\collectbox.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\adjustbox\tc-xetex.def"))
("C:\Program Files\MiKTeX 2.9\tex\latex\ifoddpage\ifoddpage.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\ltxmisc\varwidth.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\xcolor\xcolor.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\color.cfg"))
("C:\Program Files\MiKTeX 2.9\tex\latex\tools\enumerate.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\geometry\geometry.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty")
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifvtex.sty")
("C:\Program Files\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")
("C:\Program Files\MiKTeX 2.9\tex\xelatex\xetexconfig\geometry.cfg"))
("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsmath.sty"
For additional information on amsmath, use the `?' option.
("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amstext.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsopn.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\textcomp.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\ts1enc.def"))
("C:\Program Files\MiKTeX 2.9\tex\latex\upquote\upquote.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\eurosym\eurosym.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\ucs\ucs.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\ucs\uni-global.def"))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\inputenc.sty"
Package inputenc Warning: inputenc package ignored with utf8 based engines.
) ("C:\Program Files\MiKTeX 2.9\tex\latex\fancyvrb\fancyvrb.sty"
Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix
<2008/02/07> (tvz)) ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\grffile.st
y" ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty")
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\kvsetkeys.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty"))))
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\pdftexcmds.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\auxhook.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")
("C:\Program Files\MiKTeX 2.9\tex\latex\url\url.sty"))
Package hyperref Message: Driver (autodetected): hxetex.
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hxetex.def"
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\puenc.def")
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\stringenc.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\tools\longtable.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\booktabs\booktabs.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\enumitem\enumitem.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\ulem\ulem.sty")
No file notebook.aux.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\ts1cmr.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\t1ppl.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\caption\ltcaption.sty")
*geometry* detected driver: pdftex
*geometry* verbose mode - [ preamble ] result:
* driver: pdftex
* paper: <default>
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes:
* h-part:(L,W,R)=(72.26999pt, 469.75502pt, 72.26999pt)
* v-part:(T,H,B)=(72.26999pt, 650.43001pt, 72.26999pt)
* \paperwidth=614.295pt
* \paperheight=794.96999pt
* \textwidth=469.75502pt
* \textheight=650.43001pt
* \oddsidemargin=0.0pt
* \evensidemargin=0.0pt
* \topmargin=-37.0pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
("C:\Program Files\MiKTeX 2.9\tex\latex\ucs\ucsencs.def")
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))
Package hyperref Warning: Rerun to get /PageLabels entry.
("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\ot1ppl.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\omlzplm.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\omszplm.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\omxzplm.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\ot1zplm.fd")
LaTeX Warning: No \author given.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1cmtt.fd")
! Missing $ inserted.
<inserted text>
$
l.288 While \$ \beta
= 1.2 = x \$ then x is \{\{ x \}\}
?
! Emergency stop.
<inserted text>
$
l.288 While \$ \beta
= 1.2 = x \$ then x is \{\{ x \}\}
No pages of output.
Transcript written on notebook.log.
Afterwards I tried to jupyter nbconvert --to latex try.ipynb. It works but (just like the error says) it can't transform to pdf because it does this with the math:
While \$ \beta = 1.2 = x \$ then x is 1.2
How can i fix those extra \?
Not sure whether that was intended to be in a markdown or a code cell…
But, you can try removing the space after the first $ and before the second. It might be a parsing issue.
I also don't know why it wouldn't need you to have a \ before the beta… it shouldn't be automatically adding that since it doesn't know that it's a special character.
So dumb!! Thank you. Deleting the spaces works.
Most helpful comment
Not sure whether that was intended to be in a markdown or a code cell…
But, you can try removing the space after the first
$and before the second. It might be a parsing issue.