Skip to content

Cannot export notebook with images to PDF #2189

Closed
@davidvandebunte

Description

@davidvandebunte

What docker image(s) are you using?

datascience-notebook

Host OS system

Ubuntu 24.04

Host architecture

x86_64

What Docker command are you running?

docker run --rm \                                                                      
    -p "$JPORT":"$JPORT" \                                                             
    --env JUPYTER_ENABLE_LAB=yes \                                                     
    --env NB_USER="$USER" \                                                            
    --env NB_GID=1000 \                                                                
    --volume "$HOME":"$HOME" \                                                         
    --volume $(pwd):$(pwd) \                                                           
    --user root \                                                                      
    --workdir $(pwd) \                                                                 
    quay.io/jupyter/datascience-notebook \
    start.sh jupyter lab \                                                             
    --port "$JPORT" \                                                                  
    --notebook-dir $(pwd)

How to Reproduce the problem?

With a .md or .ipynb notebook that includes images open, select "File -> Save and Export Notebook As" and then the "PDF" option.

Command output

! Undefined control sequence.
l.450 \pandocbounded
{\includesvg[keepaspectratio]{KeychainLabels.svg}}

Expected behavior

A PDF file is produced.

Actual behavior

The JupyterLab server errors out.

Anything else?

See Pandoc 3.2.1 introduced new LaTex macro \pandocbounded · Issue #391 · Wandmalfarbe/pandoc-latex-template. It looks like the solution to this issue is to update to v2.5.0 of this package. It's possible that nbconvert needs an update first, see Incompatibility issue with latest version of pandoc · Issue #2173 · jupyter/nbconvert (which looks unresolved).

Latest Docker version

  • I've updated my Docker version to the latest available, and the issue persists

Metadata

Metadata

Assignees

No one assigned

    Labels

    tag:UpstreamA problem with one of the upstream packages installed in the docker imagestype:BugA problem with the definition of one of the docker images maintained here

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions