chrisjsewell / ipypublish

A workflow for creating and editing publication ready scientific reports and presentations, from one or more Jupyter Notebooks, without leaving the browser!
http://ipypublish.readthedocs.io
BSD 3-Clause "New" or "Revised" License
224 stars 37 forks source link

Weird behavior with logo upon building pdf #74

Open Benfeitas opened 5 years ago

Benfeitas commented 5 years ago

I have defined the path to my own logo as ./path/to/myown-logo.jpg

Upon building the pdf from Example.ipynb, I keep getting the error

INFO:pdf-export:latexmk: !pdfTeX error: pdflatex (file ./Example_files/myown-logo.jpg): reading JPEG image failed (no JPEG header found)

This is weird as it seems that it is reading my logo's file name (myown-logo.jpg) but not its path.

Going through the file Example.log, I see the following:

LaTeX Warning: File Example_files/logo_example.png' not found on input line 43 2. ! Package pdftex.def Error: FileExample_files/logo_example.png' not found: us ing draft setting.

See the pdftex.def package documentation for explanation. Type H for immediate help. ...

l.432 ...extwidth]{Example_files/logo_example.png}
? ! Emergency stop.

From what I understand, this is the default filepath and logoname. How can I fix this?

...

l.432 ...extwidth]{Example_files/logo_example.png}

Edit: providing the full path (/Users/myself/path/to/myown-logo.jpg) doesn't solve the issue.

chrisjsewell commented 5 years ago

Hey @RBenRocks would you be able to provide your notebook for me to have a look at, or a minimal working example that reproduces the error. The simplest way to do this is to clear all the outputs (Cell -> All Output -> Clear), save, rename the file with a .txt extension (e.g. Example.ipynb.txt), then drag and drop it into a comment here.

Benfeitas commented 5 years ago

Hi @chrisjsewell , thanks a lot. I have now uploaded it. Hope this is helpful

toupload.ipynb.txt

chrisjsewell commented 5 years ago

@RBenRocks sorry for the delay, but I can't replicate your issue.

INFO:pdf-export:latexmk: !pdfTeX error: pdflatex (file ./Example_files/myown-logo.jpg): reading JPEG image failed (no JPEG header found)

This I think is an issue with your image file (see https://tex.stackexchange.com/a/166729/107738). Have you tried a different image?

I didn't see any incidences of default filepath and logoname in the log files (attached):

mytest.nbpub.log mytest.log

are you sure these log files weren't old, have you tried completely deleting the converted folder?