Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to run "xelatex .\notebook.tex -quiet" command when trying to download Jupyter Notebook as PDF

I have spent the last few hours trying to figure out how to download my Jupyter Notebook as a pdf. I have downloaded MiKTeX as well as reinstalled anaconda. Full Error below

500 : Internal Server Error
The error was:
nbconvert failed: PDF creating failed, captured latex output:
Failed to run "xelatex .\notebook.tex -quiet" command:
Making rsfs10.tfm from "C:\Users\Spenc\AppData\Local\Programs\MiKTeX 2.9\fonts/source/public/rsfs\rsfs10.mf"...
Running miktex-mf.exe...
This is METAFONT, Version 2.7182818 (MiKTeX 2.9.7440 64-bit)

(C:\Users\Spenc\AppData\Local\Programs\MiKTeX 2.9\fonts/source/public/rsfs\rsfs

10.mf

(C:\Users\Spenc\AppData\Local\Programs\MiKTeX 2.9\fonts/source/public/cm\cmbase

.mf)

(C:\Users\Spenc\AppData\Local\Programs\MiKTeX 2.9\fonts/source/public/rsfs\scri

pt.mf

(C:\Users\Spenc\AppData\Local\Programs\MiKTeX 2.9\fonts/source/public/rsfs\scri

ptu.mf [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77]

[78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [127]) ) )

Font metrics written on rsfs10.tfm.

Output written on rsfs10.600gf (27 characters, 9120 bytes).

Transcript written on rsfs10.log.

Installing C:\Users\Spenc\AppData\Local\MiKTeX\2.9\fonts/tfm/public/rsfs\rsfs10.tfm...
Making rsfs5.tfm from "C:\Users\Spenc\AppData\Local\Programs\MiKTeX 2.9\fonts/source/public/rsfs\rsfs5.mf"...
Running miktex-mf.exe...
This is METAFONT, Version 2.7182818 (MiKTeX 2.9.7440 64-bit)

(C:\Users\Spenc\AppData\Local\Programs\MiKTeX 2.9\fonts/source/public/rsfs\rsfs

5.mf

(C:\Users\Spenc\AppData\Local\Programs\MiKTeX 2.9\fonts/source/public/cm\cmbase

.mf)

(C:\Users\Spenc\AppData\Local\Programs\MiKTeX 2.9\fonts/source/public/rsfs\scri

pt.mf

(C:\Users\Spenc\AppData\Local\Programs\MiKTeX 2.9\fonts/source/public/rsfs\scri

ptu.mf [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77]

[78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [127]) ) )

Font metrics written on rsfs5.tfm.

Output written on rsfs5.600gf (27 characters, 4704 bytes).

Transcript written on rsfs5.log.

Installing C:\Users\Spenc\AppData\Local\MiKTeX\2.9\fonts/tfm/public/rsfs\rsfs5.tfm...
notebook.tex:384:
notebook.tex:387:

like image 234
ZεԺ Avatar asked Jun 13 '20 01:06

ZεԺ


2 Answers

I had effectively the same error, so I will add a bit of generality to zεԺ’s advice.

These errors appear to be created due to LaTeX processing errors. Note, however, that the errors were shown neither in the jupyter notebook nor in the LaTeX-typeset pdf, but they did cause a failure during the nbconvert processing (despite finding the correct LaTeX, eg. xelatex, engine).

I would advise, therefore to check your LaTeX code carefully based on the errors nbconvert sends to stdout. For me, I had to change the following math-mode obstacles for the nbconvert processing to flow and complete smoothly:

  • $1$ 1 — (added a space; suspected conflict with shell processing)
  • $ \\Delta [...]$\\Delta [...] — (removed a space; suspected conflict with shell processing)
like image 97
TransferOrbit Avatar answered Nov 01 '22 22:11

TransferOrbit


Solved my problem!

Within the latex I had in my Jupiter notebook, I was using the tag? command? (idk what you call it) of \begin{align} and \end{align} in order to have some equations I made line up nicely with their equal signs all stacked. Turns out for some reason this was causing all my errors. I simply replaced {align} with {split} (ie. using \begin{split} and \end{split}) from amsmath and it worked perfectly. Equations look the same as before and it creates a perfect pdf document. No clue why but maybe this solution will help someone with the problem.

like image 3
ZεԺ Avatar answered Nov 01 '22 21:11

ZεԺ