Skip to main content

Latex specific features for jupyter book

Project description

jupyterbook-latex [IN DEVELOPMENT]

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 jupyterbook-latex, first install it through pip:

pip install jupyterbook-latex

then, add jupyterbook_latex to your extensions, in a Sphinx conf.py:

extensions = ["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:
    - 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

jupyterbook_latex-0.3.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

jupyterbook_latex-0.3.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file jupyterbook_latex-0.3.0.tar.gz.

File metadata

  • Download URL: jupyterbook_latex-0.3.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for jupyterbook_latex-0.3.0.tar.gz
Algorithm Hash digest
SHA256 71028d52c26d29b5b32d7157fa1ed28af5f047d2dd04bf59a8fa1a4dfb95cc85
MD5 f8e123dedea762a6ec957bcda0f97f49
BLAKE2b-256 2aae340ca8a871c2da00047099b3fee86f58e56b13043c651f00fb1640c3f815

See more details on using hashes here.

File details

Details for the file jupyterbook_latex-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: jupyterbook_latex-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for jupyterbook_latex-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70411ea46db17c74e301cb6cfb33b0be9e6125cfbf1225faf055298c1e877f8f
MD5 31236bd7e4d3fdb3534cf2d61dc2d86e
BLAKE2b-256 e6ef859d0557fb558a3e8f0960740cea9f8976a51b92332ccbc273f14aff14d4

See more details on using hashes here.

Supported by

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