When using a recent version of Jupyter with the Python2 kernel, I am running into an issue savings PDFs for notebooks using relative image filepaths.
Using the relative path causes the image to render fine in the notebook, but when going to export to PDF, the following error is encountered:
nbconvert failed: PDF creating failed
And on the shell:
...
LaTeX Warning: File `image/matplotlib_gallery_small.png' not found on input lin
e 1116.
! Package pdftex.def Error: File `image/matplotlib_gallery_small.png' not found
.
See the pdftex.def package documentation for explanation.
Type H <return> for immediate help.
...
l.1116 ...hics{image/matplotlib_gallery_small.png}
?
! Emergency stop.
...
l.1116 ...hics{image/matplotlib_gallery_small.png}
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on notebook.log.
Changing to absolute filepaths on the other hand breaks the image rendering in the notebook, but causes the PDF to work again.
System info
Currently pdflatex is running in a temporary directory, so locally referenced files are not found. Should be fixed in PR #132.
Sounds good. Thanks for the explanation!
This is still an issue in Jupyter Notebook 5.0.0 / nbconvert 5.1.1 ...
nbconvert failed: PDF creating failed, captured latex output:
(...)
! Unable to load picture or PDF file 'image.png'.
While the image is shown fine in the regular view. If I change the image path to be absolute, the PDF exports fine.
Still a problem with nbconvert 5.3.1.
jupyter nbconvert --version
5.3.1
! Unable to load picture or PDF file '../images/eqs1.png'.
I am also experiencing this issue.
I also seem to be affected by this issue.
using:

results in:
LaTeX Warning: File `diag_4.gif' not found on input line 303.
! Unable to load picture or PDF file 'diag_4.gif'.
<to be read again>
}
l.303 \includegraphics{diag_4.gif}
?
! Emergency stop.
<to be read again>
}
l.303 \includegraphics{diag_4.gif}
I'm experiencing this issue as well, running 5.3.1
I can no longer reproduce this with 5.3.1 or 5.4.0: relative images now export fine. Perhaps it was some other component update that fixed it? (I'm using Pandoc 2.5, not sure if that's relevant)
I'm still seeing this error with 5.5.0 and pandoc 2.7.2. In my case the images are in "../images" relative to the notebook and I've tried building both from the common parent director and from the directory containing the notebook itself.
Update:
If I move the images so they're in images/ rather than ../images it will generate, but this breaks sharing the images among notebooks in different directories.
There's a PR to address all the known pathing issues: https://github.com/jupyter/nbconvert/pull/986 but it needed more work and could fit into the 5.5 release. We'll likely do a 5.5.1 once this is resolved.
@juhasch Currently
pdflatexis running in a temporary directory, so locally referenced files are not found. Should be fixed in PR #132.
Thanks. I convert to Latex first, then build by another Latex program.
jupyter nbconvert /path/to/mynotebook.ipynb --to latex
This is giving me problems on version 6.0.7.




All 4 of the above give me the following:
notebook.tex:517: Unable to load picture or PDF file '
Edit: Looks like #552 is more relevant.
Most helpful comment
This is still an issue in Jupyter Notebook 5.0.0 / nbconvert 5.1.1 ...
While the image is shown fine in the regular view. If I change the image path to be absolute, the PDF exports fine.