Sphinx extension to support LaTeX infrastructure for Jupyter Book.
This repository is a development project to improve LaTeX support
in Jupyter Book
.
To get started with sphinx-jupyterbook-latex
, first install it through pip
:
pip install sphinx-jupyterbook-latex
then, add sphinx_jupyterbook_latex
to your extensions,
in a Sphinx conf.py
:
extensions = ["sphinx_jupyterbook_latex"]
# autoload the sphinx.ext.imgconverter extension, optional (default is True)
# jblatex_load_imgconverter = True
# turn root level toctree captions into top-level `part` headings, optional (default is to auto-infer)
# jblatex_captions_to_parts = True
OR in the jupyterbook config.yml
:
sphinx:
extra_extensions:
- sphinx_jupyterbook_latex
# config:
# jblatex_load_imgconverter: true
# jblatex_captions_to_parts: true
This extension does not provide an actual Sphinx LaTeX theme, instead it instantiates a number of transforms (for LaTeX builders only) that manipulate the AST into the required format:
latex_engine
-> xelatex
latex_theme
-> jupyterBook
sphinx.ext.imgconverter
(if jblatex_load_imgconverter
)jblatex_captions_to_parts
)A list of issues that need to be addressed:
https://github.com/executablebooks/meta/issues/169
A repository that contains many different project configurations for testing and development is available, along with implementation idea and notes