Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convertion to pdf with LaTeX fails when bibliography is added at the end of the file #38

Open
baggiponte opened this issue Nov 7, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@baggiponte
Copy link

Description

When I export a notebook with bibliography (inserted with alt + B) the conversion fails.

Reproduce

Screen.Recording.2021-11-07.at.14.44.41.mov

Error Message

See the attached file

notebook.log

Other Attempts

  • I tried to convert using jupyter nbcovnert --to pdf and obtained the same error
  • I converted the file to HTML using jupyter nbconverter with no problems
    • However, when I use pandoc to convert it to pdf it fails again:
$ pandoc 01-introduction.html -t pdf
Error producing PDF.
! Package inputenc Error: Unicode character   (U+2009)
(inputenc)                not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.238 transport is not available, between 22:00

Try running pandoc with --pdf-engine=xelatex.

$ pandoc 01-introduction.html -o 01-introduction.pdf --pdf-engine=xelatex
[WARNING] Missing character: There is no   (U+2009) (U+2009) in font [lmroman10-regular]:mapping=t

Context

  • Operating System and version: macOS Darwin Kernel Version 21.1.0
  • Browser and version: Brave Browser Version 1.31.88 Chromium: 95.0.4638.69
  • JupyterLab version: 3.2.2
@krassowski
Copy link
Owner

krassowski commented Nov 28, 2021

Hi @baggiponte this one looks like an issue with nbconvert. What version are you using? If you just want to have a PDF, you can upgrade to nbconvert version 6 or newer (current version is 6.3.0) and use webpdf instead.

To update and install webpdf dependencies run:

pip install -U nbconvert[webpdf]
# you may (or may not) also need:
python3 -m nbconvert some_notebook.ipynb --to webpdf --allow-chromium-download

Screenshot from 2021-11-28 16-37-43

However, if you need LaTeX as intermediary, #42 brought proper support for LaTeX - please see Exporting to LaTeX in README.md; this is a very fresh addition so please let me know of any problems.

Edit: this will be available in version 0.2.0 to be released today.

@krassowski
Copy link
Owner

This was included in release 0.2.0 now available on PyPI. Please let me know if either of the three solutions proposed:

  1. updating nbconvert,
  2. using webpdf
  3. using LaTeX support

works well for you. Please feel welcome to add any further suggestions :)

@krassowski
Copy link
Owner

Hi @baggiponte just checking if we can close this one. Did any of the proposed solution help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants