Skip to content

Commit

Permalink
binder: Install packages required for Jupyter to PDF convert
Browse files Browse the repository at this point in the history
Per jupyter/nbconvert#1328, these
are the packages needed for Jupyter to be able to convert
to PDF. Without it, you get unfriendly errors like [this]
(2i2c-org/infrastructure#3188 (comment)).

Given that the binder image includes jupyter, and texlive is included
in the base, I hope it would be reasonable for the binder image
to include enough texlive packages for PDF conversion to work.
Otherwise, it works in RStudio but not in Jupyter.
  • Loading branch information
yuvipanda committed Oct 18, 2023
1 parent c6152e1 commit db82bb2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/install_jupyter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ install2.r --error --skipmissing --skipinstalled -n "$NCPUS" remotes
R --quiet -e 'remotes::install_github("IRkernel/IRkernel@*release")'
R --quiet -e 'IRkernel::installspec(user = FALSE)'

# Install tex packages needed for Jupyter's nbconvert to work correctly & convert to PDF
# Sourced from https://github.com/jupyter/nbconvert/issues/1328
tlmgr install adjustbox caption collectbox enumitem environ eurosym etoolbox jknapltx parskip \
pdfcol pgf rsfs tcolorbox titling trimspaces ucs ulem upquote \
ltxcmds infwarerr iftex kvoptions kvsetkeys float geometry amsmath fontspec \
unicode-math fancyvrb grffile hyperref booktabs soul ec

# Clean up
rm -rf /var/lib/apt/lists/*
rm -rf /tmp/downloaded_packages
Expand Down

0 comments on commit db82bb2

Please sign in to comment.