Skip to content

Jupyter: File --> Download As --> PDF should show a useful message about the potential of latex bugs preventing nbconvert from converting the document fully, and how to work around them (or at least a troubleshooting link) #3559

Open
@williamstein

Description

@williamstein

Harald wrote this very good answer to a support question:

The overall process here is that in the first step, the notebook is translated to LaTeX (a typesetting language, which is famous for supporting formulas, but behaves like a programming language). Then, it is used to generate the PDF output.

If there are problematic commands in LaTeX, the interpretation of the document stops and you end up with a partial result. Unfortunately, such a half-half converted situation doesn't even show up as an error...

To fix this, I translated to latex (ending in *.tex, above PDF in the notebook) and clicked on it to open up CoCalc's latex editor. There, it pointed me to an error in line 484! There are missing dollar signs, which work in markdown but not in latex. I changed that line to $$\begin{bmatrix} 1 & 0 \ 0 & 1 \end{bmatrix}$$

After that, all pages show up. Attached is a screenshot to clarify what I did.


Basically, we should make this text (or at least a reference to it) visible right after exporting to pdf...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions