[Tex/LaTex] Jupyter: downloading notebook as PDF via LaTeX


I am using Jupyter for the first time. I am trying to download a notebook "as PDF via LaTeX". However, messages pop up indicating that the required files

tex\xelatex\xetex-def\xetex.def (part of the xetex-def package)


tex\xelatex\xetexurl\url.sty (part of the xetexurl package)

are missing. The problem is that neither package seems to be available at


Using the MiKTeX Package Manager (which I have synchronized), I have installed the graphics-def package, which apparently includes the xetex.def file. But the downloading process is still not working.

Any help would be greatly appreciated.

Best Answer

I know it is not exactly what you want but have you tried to print it to pdf using your browser (ctrl+p)? It is simple and the "you print what you see" approach is great to share a reports/analysis with people that do not code or use the jupyter enviroment. Not publication ready by any means but gets the job done. Just make sure your plots and figures are not on interactive mode otherwise they will not be displayed.

Use this to hide your code from the pdf or explore these extensions to improve your jupyter documents. If you really want to make your publications from inside jupyter, this tutorial attempts that and has some great tips.

I always had trouble with exporting my jupyter nb to pdf through latex. Quick search and you see that A LOT of people do. I could get some stuff worked out but the formatting was lackluster with code and plots not displayed the way I wanted. I eventually accepted that the jupyter notebook could not produce "publish-ready" pdfs easily. When I want that, I generate plots/figures/code on jupyter and call them on a latex file.

Related Question