drivendataorg / drivendataorg/nbautoexport
Install LaTeX in CI to enable testing PDF export format
- Dominant language
- Python
- Stars
- 87
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
`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](https://github.com/microsoft/LightGBM/blob/e83042f20633d7f74dda0d18624721447a610c8b/.ci/test_r_package.sh#L43-L52), [macos](https://github.com/microsoft/LightGBM/blob/e83042f20633d7f74dda0d18624721447a610c8b/.ci/test_r_package.sh#L57-L61), windows [1](https://github.com/microsoft/LightGBM/blob/e83042f20633d7f74dda0d18624721447a610c8b/.ci/test_r_package_windows.ps1#L15-L30), [2](https://github.com/microsoft/LightGBM/blob/e83042f20633d7f74dda0d18624721447a610c8b/.ci/test_r_package_windows.ps1#L35-L38), [3](https://github.com/microsoft/LightGBM/blob/e83042f20633d7f74dda0d18624721447a610c8b/.ci/test_r_package_windows.ps1#L99-L108)
- [ ] Install [`texlive-core`](https://github.com/conda-forge/texlive-core-feedstock) from conda-forge.
- [X] 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`](https://github.com/conda-forge/tectonic-feedstock), 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` 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`](https://yihui.org/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.
Contributor guide
Assessment
This issue has not been assessed yet.