ipypublish icon indicating copy to clipboard operation
ipypublish copied to clipboard

Weird behavior with logo upon building pdf

Open Benfeitas opened this issue 5 years ago • 3 comments

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: File Example_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.

Benfeitas avatar Apr 18 '19 14:04 Benfeitas

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.

chrisjsewell avatar Apr 19 '19 14:04 chrisjsewell

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

toupload.ipynb.txt

Benfeitas avatar Apr 23 '19 08:04 Benfeitas

@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?

chrisjsewell avatar May 17 '19 14:05 chrisjsewell