Skip to main content

Latex specific features for jupyter book

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_jupyterbook_latex-0.5.1.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_jupyterbook_latex-0.5.1-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_jupyterbook_latex-0.5.1.tar.gz.

File metadata

File hashes

Hashes for sphinx_jupyterbook_latex-0.5.1.tar.gz
Algorithm Hash digest
SHA256 404ad2129a254849096902f37dc174a0396e80484de58f7f2b05700b62249cb6
MD5 3489d89288f562a1415c1a7a7dc01913
BLAKE2b-256 0b0da22c259e67fa04158d07da9c36d55b975b413645a35b3acd591c60d2b9ad

See more details on using hashes here.

File details

Details for the file sphinx_jupyterbook_latex-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_jupyterbook_latex-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17714b299e73963d7d5d0287322b4f629f41a2a3b41b10f3a7dc15dd72202523
MD5 30a59cc7238e66c65de18cf077bf97eb
BLAKE2b-256 5e76a8d5d620f99cf07a95a7d241a3dc6970719da184a592920dc2da6ca1f687

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page