You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the glossary directive, it's possible to add grouping keys to entries that share the same name. As a side-effect this provides a form of disambiguation.
Terminology
===========
.. glossary::
t : physics
A variable used to refer to ``time``.
T : ISO
A delimiter symbol used to separate date information from time-of-day information.
These entries currently resolve to a single (and therefore ambiguous at reference-time) entry in the Intersphinx inventory.
I think it would be possible to allow them to be referenced unambiguously -- but if acceptable, we would also need to be careful to do that in a backwards-compatible manner.
How to Reproduce
conf.py
extensions= ['sphinx.ext.intersphinx']
index.rst
.. glossary::
t : physics
A variable used to refer to ``time``.
T : ISO
A delimiter symbol used to separate date information from time-of-day information.
Repro steps (shell commands)
$ sphinx-build -b html index.rst/.. _build
$ python -m sphinx.ext.intersphinx _build/objects.inv | grep -w term
std:term
T : index.html#term-T
t : index.html#term-t
Requested
It could be useful to reference each of the two glossary term definitions (T / t) individually, because the project has defined them as distinct concepts.
Current
It's not possible to reference the items individually using Intersphinx, because the inventory entries' identifiers are the same when compared case-insentively.
It could be useful to reference each of the two glossary term definitions (T / t) individually
It certainly would be and there are plenty of examples in physics where single letter casing can be used to distinguish meanings.
because the inventory entries' identifiers are the same when compared case-insentively.
I'm wondering what could have been the motivation for case-insensitivity in intersphinx? Maybe because intersphinx artifacts could become part of the URL? But in practice they're always part of the query string?!
because the inventory entries' identifiers are the same when compared case-insentively.
I'm wondering what could have been the motivation for case-insensitivity in intersphinx? Maybe because intersphinx artifacts could become part of the URL? But in practice they're always part of the query string?!
I always seem to forget that it's only some Intersphinx entries that are resolved case-insensitively (std:label and std:term specifically).
Intersphinx was, I think (but I'm not 100% sure) originally designed with entirely case-sensitive matching. However: Sphinx would emit warnings when projects defined duplicative terms (and labels?).
However, in contrast, term definitions in Sphinx were case-insensitive -- my best-guess is that that was to make term cross-referencing slightly more convenient.
In :term: referenced via intersphinx is case sensitive #9291, Intersphinx's handling of resolution of term references was reported as inconsistent with Sphinx's internal term resolution -- and so Intersphinx resolution was adjusted to allow case-insensitive resolution.
Describe the bug
When using the
glossary
directive, it's possible to add grouping keys to entries that share the same name. As a side-effect this provides a form of disambiguation.These entries currently resolve to a single (and therefore ambiguous at reference-time) entry in the Intersphinx inventory.
I think it would be possible to allow them to be referenced unambiguously -- but if acceptable, we would also need to be careful to do that in a backwards-compatible manner.
How to Reproduce
conf.py
index.rst
Repro steps (shell commands)
Requested
It could be useful to reference each of the two glossary term definitions (
T
/t
) individually, because the project has defined them as distinct concepts.Current
It's not possible to reference the items individually using Intersphinx, because the inventory entries' identifiers are the same when compared case-insentively.
Environment Information
Sphinx extensions
['sphinx.ext.intersphinx']
Additional context
Discovered during #12699.
The text was updated successfully, but these errors were encountered: