diff --git a/docs/requirements.txt b/docs/requirements.txt index 9e442f60c..781016e97 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,8 +1,9 @@ # Updated to use latest compatible versions as of December 2025. -sphinx==9.0.4 +sphinx==8.2.3 pydata-sphinx-theme readthedocs-sphinx-search sphinx-copybutton +sphinx-hoverxref sphinx-remove-toctrees ## for pygment coloring of code snippets using ipython syntax ipython diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css index 5fcf0d318..87ea26ec3 100644 --- a/docs/source/_static/custom.css +++ b/docs/source/_static/custom.css @@ -40,6 +40,20 @@ div.admonition-video > p.admonition-title::after { content: "\f008"; } +/*terms with tooltips*/ + +a.hxr-hoverxref { + text-decoration: underline; + text-decoration-style: dotted; + text-decoration-thickness: 2px; + text-decoration-color: var(--color-link-underline); + border-bottom: none; +} + +a.hxr-hoverxref:hover { + text-decoration-color: var(--color-link-underline--hover); +} + /* second column of API autosummaries should break more and be a bit smaller */ table.autosummary td:nth-child(2) { FONT-WEIGHT: 300; diff --git a/docs/source/conf.py b/docs/source/conf.py index 9219f72c3..1669991ec 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -40,7 +40,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'glossary_warnings', + 'glossary_warnings', 'hoverxref.extension', 'sphinx_copybutton', 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.mathjax', 'sphinx_remove_toctrees', @@ -59,6 +59,12 @@ "apidocs/_autosummary/pyopenmssubmodules/pyopenms.plotting.*.rst"] autodoc_docstring_signature = True +# configure tooltips +hoverxref_roles = ['term', ] +hoverxref_role_types = {'term': 'tooltip', } +# specific for pyopenms documentation +hoverxref_tooltip_lazy = True + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/requirements.txt b/requirements.txt index d05d489c9..8b58c040b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,7 @@ holoviews pyviz_comms jupyter-server-proxy massql +sphinx-hoverxref pyopenms