Skip to main content

Get rich tool tips in your sphinx book!

Project description

TeachBooks Sphinx extension: Rich hover over tips

Rich tool tips in your TeachBook!

Introduction

Sphinx-tippy allows you to create rich hover over tips as demonstrated here: https://sphinx-tippy.readthedocs.io/en/latest/. This TeachBooks Tippy extension makes it plug-and-play within a TeachBook.

The differences with Sphinx-tippy are:

  • Default inclusion of useful CSS-file.
  • Default activation of sphinx.ext.mathjax.
  • Default loading method of defer changed to None for supporting JavaScript.
  • Default support for TeachBooks Sphinx Grasple such that images are shown (as iframes are not loaded).
  • Limit the showing of tool tips to the <main> anchor of the Sphinx book.
  • Limit the maximum height of a tool tip.
  • Force tool tips to remain with visible document body.
  • No arrow that points from the tool tip to the link.

What does it do?

You can see how the this works in the example book.

Installation

To install TeachBooks-Sphinx-Tippy, follow these steps:

Step 1: Install the Package

Install the teachbooks-sphinx-tippy package using pip:

pip install teachbooks-sphinx-tippy

Step 2: Add to requirements.txt

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

teachbooks-sphinx-tippy

Step 3: Enable in _config.yml

In your _config.yml file, add the extension to the list of Sphinx extra extensions (important: underscore, not dash this time):

sphinx: 
    extra_extensions:
        - teachbooks_sphinx_tippy

Usage

By following the steps above, the extension will be added automatically.

Contribute

This tool's repository is stored on GitHub. The README.md of the branch Manual 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

teachbooks_sphinx_tippy-1.0.12.tar.gz (123.8 kB view details)

Uploaded Source

Built Distribution

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

teachbooks_sphinx_tippy-1.0.12-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file teachbooks_sphinx_tippy-1.0.12.tar.gz.

File metadata

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

File hashes

Hashes for teachbooks_sphinx_tippy-1.0.12.tar.gz
Algorithm Hash digest
SHA256 627cdf3dd9bb569b4654dbbb2cae0c8ab671280a75d34e0b6a527b7d763e6b3b
MD5 f380b8e076e68c96d240d8564c1a6dc6
BLAKE2b-256 f3d634a9d88f7ed3ae5b35c5091e2a9445fd257d368aa5e88fe687617e275ee5

See more details on using hashes here.

Provenance

The following attestation bundles were made for teachbooks_sphinx_tippy-1.0.12.tar.gz:

Publisher: python-publish.yml on TeachBooks/teachbooks-sphinx-tippy

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

File details

Details for the file teachbooks_sphinx_tippy-1.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for teachbooks_sphinx_tippy-1.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 281cf8eda88cd369275fd391fcdecb93f3b4f10ea41cad95c86504d1cb0265e5
MD5 7fbe0cfcd1b33dfe4d2fc34045091155
BLAKE2b-256 9de1ddad5863491f18155839d80fb296978710b594671d8923f7cb9417afe52c

See more details on using hashes here.

Provenance

The following attestation bundles were made for teachbooks_sphinx_tippy-1.0.12-py3-none-any.whl:

Publisher: python-publish.yml on TeachBooks/teachbooks-sphinx-tippy

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