Failed to convert the ipynb to PDF

Viewed 3007

Today when I tried to convert my ipynb file to PDF, an error occured as follows:

nbconvert failed: PDF creating failed, captured latex output:
Failed to run "xelatex .\notebook.tex -quiet" command:
This is XeTeX, Version 3.14159265-2.6-0.999991 (TeX Live 2019/W32TeX) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
! Undefined control sequence.
<*> .\notebook
              .tex -quiet
? 
! Emergency stop.
<*> .\notebook
              .tex -quiet
No pages of output.
Transcript written on ?.

I had tried the simplest ipynb file without latex, but it still had the same error

By the way, I have pandoc and tex live 2019 in my PATH

It seems that it was because of the latex, but I have no idea

Thanks for solving my problem !

1 Answers

Export the ipynb file to HTML file. Then export HTML (on your server) to PDF. This way retains all the numerical and image outputs in your ipynb file

Related