Skip to content

LaTeX conversion error, when converting the Python Notebook to the PDF #9

@dxL1nus

Description

@dxL1nus

When running the provided command to convert to the Python Notebook to a PDF:

jupyter nbconvert --to pdf --no-input --no-prompt --execute --LatexExporter.template_file nbconvert_template.tex.j2 codecheck.ipynb

I get the following Error Message:

nbconvert.exporters.pdf.LatexFailed: PDF creating failed, captured latex output:
Failed to run "['xelatex', 'notebook.tex', '-quiet']" command:
This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2022/dev/Debian) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./notebook.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-01-21>
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2021/11/13 v3.35 KOMA-Script document class (article)
...
(/usr/share/texmf/tex/latex/lm/lmodern.sty)
No file notebook.aux.
(/usr/share/texlive/texmf-dist/tex/latex/caption/ltcaption.sty)
*geometry* driver: auto-detecting
*geometry* detected driver: xetex

LaTeX Font Warning: Font shape `T1/latinmodern-math.otf(0)/m/n' undefined
(Font)              using `T1/cmr/m/n' instead on input line 225.

Package unicode-math Warning: The first font loaded by unicode-math must be an
(unicode-math)                OpenType Math font (with script=math). If you
(unicode-math)                simply want ‘the default’ before loading
(unicode-math)                supplementary fonts over the top for certain
(unicode-math)                ranges, use:
(unicode-math)                  \setmathfont{latinmodern-math.otf}

LaTeX Font Warning: Font shape `T1/latinmodern-math.otf(1)/m/n' undefined
(Font)              using `T1/cmr/m/n' instead on input line 225.

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty)
(/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty))

Package hyperref Warning: Rerun to get /PageLabels entry.

(/usr/share/texlive/texmf-dist/tex/latex/bookmark/bookmark.sty
(/usr/share/texlive/texmf-dist/tex/latex/bookmark/bkm-dvipdfm.def))
(/usr/share/texmf/tex/latex/lm/t1lmss.fd)

! LaTeX Error: No counter 'none' defined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.253 ...width - 2\tabcolsep) * \real{0.5556}}@{}}

?
! Emergency stop.
 ...

l.253 ...width - 2\tabcolsep) * \real{0.5556}}@{}}

No pages of output.
Transcript written on notebook.log.

It however doesn't seem to be a conversion error to .tex, but rather from .tex to .pdf, because when running:

jupyter nbconvert --to latex --no-input --no-prompt --execute --LatexExporter.template_file nbconvert_template.tex.j2 codecheck.ipynb

I then get a perfect working .tex file, that I can then load in another LaTeX editor like Overleaf and convert there normally as expected (and without errors).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions