Install the package
pip install --pre sphinx-hoverxref
pip install git+https://github.com/readthedocs/sphinx-hoverxref@master
Once we have the package installed,
we have to configure it on our Sphinx documentation.
To do this, add this extension to your Sphinx’s extensions in the
# conf.py extensions = [ # ... other extensions here 'hoverxref.extension', ]
After installing the package and adding the extension in the
you can use
:hoverxref: role to show a tooltip 1 when hovering with the mouse.
This extension requires a backend server to retrieve the tooltip content. Currently only Read the Docs is supported, so it will only work if your documentation is hosted on Read the Docs.
If you prefer to apply this behavior to all your
:ref: in your documentation,
you can use the config
we use tooltips as a generic word, but we refer to both, tooltips and modal dialogues