Skip to main content

sphinx-jupyterbook-latex

Documentation Status

Sphinx extension to support LaTeX infrastructure for Jupyter Book.

This repository is a development project to improve LaTeX support in Jupyter Book.

Get started

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

Extension Details

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:

  1. Overrides some configuration:
  • latex_engine -> xelatex
  • latex_theme -> jupyterBook
  • appends necessary LaTeX commands to the preamble
  1. When a latex builder is specified:
  • Set's up sphinx.ext.imgconverter (if jblatex_load_imgconverter)
  • Replace sub-headers in the root document
  • Create headings from the root-level toctree captions (if jblatex_captions_to_parts)
  • Move bibliographies to the bottom of the document

Issues

A list of issues that need to be addressed:

https://github.com/executablebooks/meta/issues/169

Developer Notes

A repository that contains many different project configurations for testing and development is available, along with implementation idea and notes

Release files for sphinx-jupyterbook-latex 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-jupyterbook-latex 1.0.0
File Size Uploaded
sphinx_jupyterbook_latex-1.0.0.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-jupyterbook-latex 1.0.0
File Interpreter ABI Platform
sphinx_jupyterbook_latex-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.3 kB

Release files / sphinx_jupyterbook_latex-1.0.0.tar.gz

Download URL sphinx_jupyterbook_latex-1.0.0.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f54c6674c13f1616f9a93443e98b9b5353f9fdda8e39b6ec552ccf0b3e5ffb62
BLAKE2b-256 checksum
How to use checksums
802918a1fc30e9315e72f068637079169525069a7c0b2fbe51cf689af0576214
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.17

Release files / sphinx_jupyterbook_latex-1.0.0-py3-none-any.whl

Download URL sphinx_jupyterbook_latex-1.0.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0cd3e9e1c5af69136434e21a533343fdf013475c410a414d5b7b4922b4f3891
BLAKE2b-256 checksum
How to use checksums
701f1d4ecaf58b17fe61497644655f40b04d84a88348e41a6f0c6392394d95e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.17

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page