glossaries: Two abbreviations with identical short form deduplicated
Brought to you by:
jschrod
It may happen that we would like to define ambiguous abbreviations, i.e., abbreviations with identical short forms but different long forms, depending on the context. For instance, in my case I have this minimum example:
\documentclass{article}
\usepackage[xindy]{glossaries-extra}
\newabbreviation[description=random access machine (computing model)]{ram-cm}{RAM}{random access machine}
\newabbreviation[description=random access memory (memory type)]{ram-mem}{RAM}{random access memory}
\makeglossaries
\begin{document}
A test with the computing model \gls{ram-cm} and the memory technology
\gls{ram-mem}, and again with \gls{ram-cm} and \gls{ram-mem}.
\printglossary[type=\acronymtype, title=Abbreviations, style=long]
\end{document}
They will be expanded as expected on first use with their respective long form, i.e. \gls{ram-cm}
will show "random access machine (RAM)" and \gls{ram-mem}
will show "random access memory (RAM)". However, \printgloassaries
will only show one entry for "RAM". However, when I remove the "xindy" option from glossaries-extra then two entries show up as expected.
I suspect xindy to be responsible for this undesired deduplication, which appears to happen on the basis of the short form, not on the label.