nbautoexport
nbautoexport copied to clipboard
Install LaTeX in CI to enable testing PDF export format
nbconvert
requires a LaTeX engine to convert to pdf
. We need to figure out the best way to install this in our CI pipeline so we can test the pdf
export format in our unit tests.
Some strategies and notes about them:
- [ ] Install standard TeX distributions per operating system (TeX Live, MacTeX, MikTeX).
- [ ] Install
texlive-core
from conda-forge.- [X] Out of box: does not work.
nbconvert
usesxelatex
but this installation only haspdflatex
. - [ ] Hack it by symlinking
xelatex
topdflatex
- [ ] Set
nbconvert
configuration to usepdflatex
instead ofxelatex
- [X] Out of box: does not work.
- [ ] Install
tectonic
, a different TeX distribution that's available cross-platform from conda-forge- [X] Out of box: does not work. This gives a CLI program named
tectonic
- [X] Hack it by symlinking
xelatex
totectonic
: Does not work.nbconvert
passes a--quiet
flag thattectonic
does not support. - [ ] Set
nbconvert
configuration to usetectonic
instead ofxelatex
(and with appropriate CLI flags)
- [X] Out of box: does not work. This gives a CLI program named
- [ ] Install
tinytex
. Has install scripts for different OSes. Will need different conditional pipeline steps, which adds complexity to the pipeline, but scripts hopefully work out of the box.
TinyTeX actually worked and seems like the way to go. There is an implementation here: https://github.com/drivendataorg/nbautoexport/pull/41
Unfortunately, there is a bug with nbconvert in Windows that causes the PDF generation to fail. https://github.com/jupyter/nbconvert/issues/974
The Windows xelatex bug was fixed and the change was part of the nbconvert v6.0.0 release.