Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install LaTeX in CI to enable testing PDF export format #35

Open
3 of 10 tasks
jayqi opened this issue Jul 2, 2020 · 2 comments
Open
3 of 10 tasks

Install LaTeX in CI to enable testing PDF export format #35

jayqi opened this issue Jul 2, 2020 · 2 comments

Comments

@jayqi
Copy link
Member

jayqi commented Jul 2, 2020

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).
    • Will require different conditional pipeline steps, which adds complexity to the pipeline. Example of install scripts from LightGBM: ubuntu, macos, windows 1, 2, 3
  • Install texlive-core from conda-forge.
    • Out of box: does not work. nbconvert uses xelatex but this installation only has pdflatex.
    • Hack it by symlinking xelatex to pdflatex
    • Set nbconvert configuration to use pdflatex instead of xelatex
  • Install tectonic, a different TeX distribution that's available cross-platform from conda-forge
    • Out of box: does not work. This gives a CLI program named tectonic
    • Hack it by symlinking xelatex to tectonic: Does not work. nbconvert passes a --quiet flag that tectonic does not support.
    • Set nbconvert configuration to use tectonic instead of xelatex (and with appropriate CLI flags)
  • 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.
@jayqi
Copy link
Member Author

jayqi commented Jul 26, 2020

TinyTeX actually worked and seems like the way to go. There is an implementation here: #41

Unfortunately, there is a bug with nbconvert in Windows that causes the PDF generation to fail. jupyter/nbconvert#974

@jayqi
Copy link
Member Author

jayqi commented Sep 18, 2020

The Windows xelatex bug was fixed and the change was part of the nbconvert v6.0.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant