Bug Tracker
I’m currently working on a major new version of the datatool package. This may take a while. Please be patient. (Experimental version available for testing.)
ID | 274🔗 |
---|---|
Submitted by: | Denis Bitouzé |
Date: | 2024-05-23 13:44:55 |
Last update: | 2024-05-23 19:14:31 |
Status | Open Sign in if you want to bump this report. |
Category | glossaries |
Version | 4.54 |
Summary | Wrong short form produced by the first occurrence of \gls for an acronym containing a nested acronym |
Sign in to subscribe to notifications about this report.
Description
For an acronym containing a nested acronym, the short form of the full form produced by the first occurrence of\gls{⟨label⟩}
is wrong. More precisely, with:
\newacronym{lid} {LID} {lorem ipsum dolor} \newacronym{lidsa}{LIDSA}{\acrshort{lid} sit amet}the first occurrence of
\gls{lidsa}
should display:
LID sit amet (LIDSA)but it displays (note the missing “SA”):
LID sit amet (LID)The short forms displayed by the subsequent occurrences of
\gls{lidsa}
are okay.As a workaround, one could put the nested acronym between curly braces:
\newacronym{lidsa}{LIDSA}{{\acrshort{lid}} sit amet}But I guess there's something wrong here.
MWE
Download (1.27K)
\listfiles \documentclass{standalone} \usepackage{glossaries} \makeglossaries \newacronym{lid} {LID} {lorem ipsum dolor} \newacronym{lidsa} {LIDSA} { \acrshort{lid} sit amet} \newacronym{lidsabis}{LIDSABIS}{{\acrshort{lid}} sit amet} % ^ ^ \begin{document} \begin{tabular}{@{}llll} Definition of the acronym (\verb|\newacronym{label}{short}{long}|) & Comment & Command & Result \\\hline \verb|\newacronym{lid} {LID} {lorem ipsum dolor}| & Acronym & \verb|\gls{lid}| & \gls{lid} \\ \verb|\newacronym{lidsa} {LIDSA} { \acrshort{lid} sit amet}| & Nested acronym without braces & \verb|\gls{lidsa}| & \gls{lidsa} \\ \verb| ^ ^| & & \verb|\gls{lidsa}| & \gls{lidsa} \\ \verb|\newacronym{lidsabis}{LIDSABIS}{{\acrshort{lid}} sit amet}| & Nested acronym with\phantom{out} braces & \verb|\gls{lidsabis}| & \gls{lidsabis} \\ \verb| ^ ^| & & \verb|\gls{lidsabis}| & \gls{lidsabis} \\ \end{tabular} \end{document}
Evaluation
The glossaries manual does say "Avoid nested definitions" in a red box in section 6. If you must use them then grouping is the only way to avoid the problem with just the base glossaries package. There's more information in 5.4. "Nested Links" of the glossaries-extra manual, which provides extra workarounds.
Comments
2 comments.
Date: 2024-05-23 19:14:31
Repying to: Denis Bitouzé 2024-05-23 19:06:27
I think I need to move the note to a more prominent location in the manual. I'm sorry I can't link to the relevant sections at the moment as CTAN seems to be down.
Add Comment
Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=274
Date: 2024-05-23 19:06:27
OK, I missed that. Thanks.