sphinx-jupyterbook-latex


Namesphinx-jupyterbook-latex JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryLatex specific features for jupyter book
upload_time2023-12-11 15:37:25
maintainer
docs_urlNone
author
requires_python>=3.9
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sphinx-jupyterbook-latex

[![Documentation Status](https://readthedocs.org/projects/sphinx-jupyterbook-latex/badge/?version=latest)](https://sphinx-jupyterbook-latex.readthedocs.io/en/latest/?badge=latest)

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`:

```python
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`:

```yaml
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

2. 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](https://github.com/mmcky/ebp-test-projectstructure)
for testing and development is available, along with implementation
idea and notes


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "sphinx-jupyterbook-latex",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Executable Book Project <jupyter@googlegroups.com>",
    "download_url": "https://files.pythonhosted.org/packages/80/29/18a1fc30e9315e72f068637079169525069a7c0b2fbe51cf689af0576214/sphinx_jupyterbook_latex-1.0.0.tar.gz",
    "platform": null,
    "description": "# sphinx-jupyterbook-latex\n\n[![Documentation Status](https://readthedocs.org/projects/sphinx-jupyterbook-latex/badge/?version=latest)](https://sphinx-jupyterbook-latex.readthedocs.io/en/latest/?badge=latest)\n\nSphinx extension to support LaTeX infrastructure for Jupyter Book.\n\nThis repository is a **development** project to improve LaTeX support\nin `Jupyter Book`.\n\n## Get started\n\nTo get started with `sphinx-jupyterbook-latex`, first install it through `pip`:\n\n```\npip install sphinx-jupyterbook-latex\n```\n\nthen, add `sphinx_jupyterbook_latex` to your extensions,\nin a Sphinx `conf.py`:\n\n```python\nextensions = [\"sphinx_jupyterbook_latex\"]\n\n# autoload the sphinx.ext.imgconverter extension, optional (default is True)\n# jblatex_load_imgconverter = True\n# turn root level toctree captions into top-level `part` headings, optional (default is to auto-infer)\n#  jblatex_captions_to_parts = True\n```\n\nOR in the jupyterbook `config.yml`:\n\n```yaml\nsphinx:\n    extra_extensions:\n    - sphinx_jupyterbook_latex\n    # config:\n    #   jblatex_load_imgconverter: true\n    #   jblatex_captions_to_parts: true\n```\n\n## Extension Details\n\nThis extension does not provide an actual Sphinx LaTeX theme,\ninstead it instantiates a number of transforms (for LaTeX builders only) that manipulate the AST into the required format:\n\n1. Overrides some configuration:\n\n- ``latex_engine`` -> ``xelatex``\n- ``latex_theme`` -> ``jupyterBook``\n- appends necessary LaTeX commands to the preamble\n\n2. When a latex builder is specified:\n\n- Set's up `sphinx.ext.imgconverter` (if `jblatex_load_imgconverter`)\n- Replace sub-headers in the root document\n- Create headings from the root-level toctree captions (if `jblatex_captions_to_parts`)\n- Move bibliographies to the bottom of the document\n\nIssues\n------\n\nA list of issues that need to be addressed:\n\nhttps://github.com/executablebooks/meta/issues/169\n\nDeveloper Notes\n---------------\n\nA [repository that contains many different project configurations](https://github.com/mmcky/ebp-test-projectstructure)\nfor testing and development is available, along with implementation\nidea and notes\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Latex specific features for jupyter book",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://executablebooks.org/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "701f1d4ecaf58b17fe61497644655f40b04d84a88348e41a6f0c6392394d95e4",
                "md5": "f6baa78faad6483558b3477bd486c876",
                "sha256": "e0cd3e9e1c5af69136434e21a533343fdf013475c410a414d5b7b4922b4f3891"
            },
            "downloads": -1,
            "filename": "sphinx_jupyterbook_latex-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f6baa78faad6483558b3477bd486c876",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 13319,
            "upload_time": "2023-12-11T15:37:23",
            "upload_time_iso_8601": "2023-12-11T15:37:23.250477Z",
            "url": "https://files.pythonhosted.org/packages/70/1f/1d4ecaf58b17fe61497644655f40b04d84a88348e41a6f0c6392394d95e4/sphinx_jupyterbook_latex-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "802918a1fc30e9315e72f068637079169525069a7c0b2fbe51cf689af0576214",
                "md5": "41c4d87eb91795c31e93d50fa721a829",
                "sha256": "f54c6674c13f1616f9a93443e98b9b5353f9fdda8e39b6ec552ccf0b3e5ffb62"
            },
            "downloads": -1,
            "filename": "sphinx_jupyterbook_latex-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "41c4d87eb91795c31e93d50fa721a829",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 11945,
            "upload_time": "2023-12-11T15:37:25",
            "upload_time_iso_8601": "2023-12-11T15:37:25.034893Z",
            "url": "https://files.pythonhosted.org/packages/80/29/18a1fc30e9315e72f068637079169525069a7c0b2fbe51cf689af0576214/sphinx_jupyterbook_latex-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-11 15:37:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "sphinx-jupyterbook-latex"
}
        
Elapsed time: 0.14061s