This package contains a Sphinx extension to support LaTeX builds for jupyter-book projects.


It is enabled by default through the jupyter-book project so the setup is only required if you are using this extension in a sphinx project.

This extension primarily works to apply transforms and post-transforms to configure sphinx so that it:

  1. accommodate’s the jupyter-book table of contents structures defined in _toc.yml, and

  2. produces pdf output that is similar in structure as html output

Adjustments and Features#

  1. Handling of toctree structures for jupyter-book

  2. Content contained in the masterdoc is treated as frontmatter in LaTeX

  3. Implement support for code-cell for LaTeX output

  4. Handling conversion of png and gif images using sphinx.ext.imgconverter

  5. Configure fonts to support Unicode and Math Characters

  6. Ensure myst-parser is configured with amsmath

  7. Ensure xelatex is used to compile the LaTeX to PDF


While this extension is primarily setup to be used by jupyter-book it can be used by any Sphinx based project. This documentation site will primarily focus on the jupyter-book use case so many examples are written in myst:md