Skip to main content

A collection of useful Jupyter Book patches.

Project description

Sphinx extension: JupyterBook-Patches

DOI

This Sphinx extension fixes:

  • with a layout patch:
    • an issue where drop down menus would still take up space after being minimized, and the patch fixes it through some css.
    • an issue where in drop down code cells the shown summary remained lightgray instead of turning darkgrey. Fix through css.
    • an issue where the size of code in a header is not the correct font size. Fix through css.
    • an issue where the sidebar shows a scrollbar even if that's not needed
    • an issue where the margin causes a scroll bar for a window between 992 and 1200px.
    • an issue where the caption text of a figure is aligned on the left for multi-line caption text
  • with a button patch:
    • an issue where two buttons for interactive matplotlib widget do not appear.
  • with a mathjax patch:
    • an issue where in the Firefox browser the CHTML renderer of MathJax does not render thin lines consistently. Fixed by selecting the SVG renderer only for the Firefox browser.

Installation

To install the Sphinx-JupyterBook-Patches, follow these steps:

Step 1: Install the Package

Install the jupyterbook_patches package using pip:

pip install jupyterbook_patches

Step 2: Add to requirements.txt

Make sure that the package is included in your project's requirements.txt to track the dependency:

jupyterbook_patches

Step 3: Enable in _config.yml

In your _config.yml file, add the extension to the list of Sphinx extra extensions:

sphinx: 
    extra_extensions:
        - jupyterbook_patches

Step 4 (optional): Disable patches in _config.yml

In your _config.yml file, add disable patches you do not wish:

sphinx: 
    config:
        patch_config:
            disabled-patches: []

Replace [] by a list of strings to disable patches. Use the patch name as indicated at the top of this document.

For example, to disable the mathjax patch:

sphinx: 
    config:
        patch_config:
            disabled-patches: ["mathjax"]

For example, to disable the layout and button patches:

sphinx: 
    config:
        patch_config:
            disabled-patches: ["button","layout"]

Contribute

This tool's repository is stored on GitHub. The README.md of the branch manual_docs is also part of the TeachBooks manual as a submodule. If you'd like to contribute, you can create a fork and open a pull request on the GitHub repository. To update the README.md shown in the TeachBooks manual, create a fork and open a merge request for the GitHub repository of the manual. If you intent to clone the manual including its submodules, clone using: git clone --recurse-submodulesgit@github.com:TeachBooks/manual.git.

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_patches-1.7.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

jupyterbook_patches-1.7.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file jupyterbook_patches-1.7.0.tar.gz.

File metadata

  • Download URL: jupyterbook_patches-1.7.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for jupyterbook_patches-1.7.0.tar.gz
Algorithm Hash digest
SHA256 2feb79a4d9b05fb6cfde3b4eb31db0d566c7683de6a38cf25b1ab13bc44a0d56
MD5 d98bf39704de03411c25895f49c1ab87
BLAKE2b-256 522d6129266dabe47dca49868e3eb79a308609c3108211c7ad3dbb2c560c04a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for jupyterbook_patches-1.7.0.tar.gz:

Publisher: python-publish.yml on TeachBooks/JupyterBook-Patches

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jupyterbook_patches-1.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterbook_patches-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4414532f2c5751494fef4d37d9f7fc440e2137442a46fb151791f4ded7e01ad
MD5 9c92e9499562d398e6111f2fe419a55a
BLAKE2b-256 7f37067859a1e45b5a4d87a833f5338ed2306fe89c99ddc81f484ebeab22eb60

See more details on using hashes here.

Provenance

The following attestation bundles were made for jupyterbook_patches-1.7.0-py3-none-any.whl:

Publisher: python-publish.yml on TeachBooks/JupyterBook-Patches

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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