Sphinx Jupyter Book LaTeX

1.0.0 · active · verified Thu Apr 16

Sphinx Jupyter Book LaTeX is a Sphinx extension designed to enhance LaTeX build capabilities for Jupyter Book projects. It provides a set of transforms and post-transforms that configure Sphinx to correctly handle Jupyter Book's `_toc.yml` structure and produce PDF output that closely mirrors the HTML version. Version 1.0.0 is current, and releases generally align with updates in the broader Jupyter Book ecosystem.

Common errors

Warnings

Install

Imports

Quickstart

To get started, install the package via pip. Then, enable the Sphinx extension by adding 'sphinx_jupyterbook_latex' to your `extensions` list in `conf.py`. Note that ImageMagick is a required system dependency for image processing. If building with Jupyter Book, it often handles much of this configuration automatically.

# 1. Install the library
pip install sphinx-jupyterbook-latex

# 2. Add it to your Sphinx conf.py
# If you're using Jupyter Book, this extension is often enabled by default.
# For a standalone Sphinx project, add:
extensions = [
    'sphinx_jupyterbook_latex',
    # other extensions like 'myst_parser', 'jupyter_book_theme', etc.
]

# 3. Ensure ImageMagick is installed on your system for image conversion
# Example for Debian/Ubuntu:
# sudo apt-get install imagemagick

# 4. Build your book to PDF (example using jupyter-book CLI)
# jupyter-book build --builder latex your_book_folder
# For Sphinx, use: make latexpdf

view raw JSON →