Skip to content
This repository was archived by the owner on Apr 9, 2026. It is now read-only.

Commit 8f19463

Browse files
authored
Restore sphinx-hoverxref extension with Sphinx 8.2.3 (#492)
1 parent bc4a134 commit 8f19463

4 files changed

Lines changed: 24 additions & 2 deletions

File tree

docs/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Updated to use latest compatible versions as of December 2025.
2-
sphinx==9.0.4
2+
sphinx==8.2.3
33
pydata-sphinx-theme
44
readthedocs-sphinx-search
55
sphinx-copybutton
6+
sphinx-hoverxref
67
sphinx-remove-toctrees
78
## for pygment coloring of code snippets using ipython syntax
89
ipython

docs/source/_static/custom.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@ div.admonition-video > p.admonition-title::after {
4040
content: "\f008";
4141
}
4242

43+
/*terms with tooltips*/
44+
45+
a.hxr-hoverxref {
46+
text-decoration: underline;
47+
text-decoration-style: dotted;
48+
text-decoration-thickness: 2px;
49+
text-decoration-color: var(--color-link-underline);
50+
border-bottom: none;
51+
}
52+
53+
a.hxr-hoverxref:hover {
54+
text-decoration-color: var(--color-link-underline--hover);
55+
}
56+
4357
/* second column of API autosummaries should break more and be a bit smaller */
4458
table.autosummary td:nth-child(2) {
4559
FONT-WEIGHT: 300;

docs/source/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4141
# ones.
4242
extensions = [
43-
'glossary_warnings',
43+
'glossary_warnings', 'hoverxref.extension',
4444
'sphinx_copybutton', 'sphinx.ext.autodoc',
4545
'sphinx.ext.autosummary', 'sphinx.ext.mathjax',
4646
'sphinx_remove_toctrees',
@@ -59,6 +59,12 @@
5959
"apidocs/_autosummary/pyopenmssubmodules/pyopenms.plotting.*.rst"]
6060
autodoc_docstring_signature = True
6161

62+
# configure tooltips
63+
hoverxref_roles = ['term', ]
64+
hoverxref_role_types = {'term': 'tooltip', }
65+
# specific for pyopenms documentation
66+
hoverxref_tooltip_lazy = True
67+
6268
# Add any paths that contain templates here, relative to this directory.
6369
templates_path = ['_templates']
6470

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ holoviews
1212
pyviz_comms
1313
jupyter-server-proxy
1414
massql
15+
sphinx-hoverxref
1516

1617

1718
pyopenms

0 commit comments

Comments
 (0)