Bug Tracker 
ID | 298🔗 |
---|---|
Date: | 2025-03-19 09:20:57 |
Last update: | 2025-04-03 15:30:33 |
Status | Closed (Fixed) |
Category | glossaries-extra |
Version | 1.57 |
Summary | paragraphs break inside description of \longnewglossaryentry when using topic style |
Sign in to subscribe to notifications about this report.
Description
Using thetopic
style (and stylemod) and defining a glossary entry using \longnewglossaryentry
that has a description with more than one paragraph causes an error in compilation.The compilation error appears on line 5 of main.gls
:
\glossarysection[\glossarytoctitle]{\glossarytitle}\glossarypreamble \begin{theglossary}\glossaryheader \glsgroupheading{L}\relax \glsresetentrylist % \glossentry{long}{\glossaryentrynumbers{\relax \setentrycounter[]{page}\glsnumberformat{1}}}\glsgroupskip \glsgroupheading{S}\relax \glsresetentrylist % \glossentry{short}{\glossaryentrynumbers{\relax \setentrycounter[]{page}\glsnumberformat{1}}}% \end{theglossary}\glossarypostambleWith the errors being:
-
Paragraph ended before \glsmakefirstuc was complete. <to be read again>
- Extra }, or forgotten \endgroup. <argument> ...r line 3\glsxtrpostlongdescription }
The issue appears to be to do with how the topic
style uses a different structure and potentially redefines things, leading to \longnewglossaryentry
breaking by not being able to finish.
I have posted this on stackexchange ([TeX.SX Link]) but not received any responses yet.
MWE
Download (355B)
\documentclass{article} \usepackage[automake,style=topic,stylemods={topic}]{glossaries-extra} \makeglossaries \newglossaryentry{short}{ name={short}, description={short test description} } \longnewglossaryentry{long}{ name={long} }{line 1 line 2 line 3} \begin{document} \glsaddall test \printglossaries \end{document}
Evaluation
The topic style displays the description with \glstopicDesc
which is defined as:
\newcommand*{\glstopicDesc}[1]{\Glossentrydesc{#1}\glspostdescription}This uses the sentence-case command
\Glossentrydesc
which internally uses \glsmakefirstuc
which doesn't allow a paragraph break.
A workaround is to redefine \glstopicDesc
to omit the case-change and ensure that you have the appropriate casing when you define the description:
\renewcommand*{\glstopicDesc}[1]{\glossentrydesc{#1}\glspostdescription}Alternatively, redefine
\glsmakefirstuc
for example:
\renewcommand{\glsmakefirstuc}[1]{\MFUsentencecase{\unexpanded{#1}}}
Note that it's actually mfirstuc that defines \glsmakefirstuc
so it's mfirstuc that needs changing. However, the base glossaries package has an option (mfirstuc
) that redefines \glsmakefirstuc
so as from glossaries v4.58, that option will use a long definition instead. So with glossaries v4.58, another workaround is:
\usepackage[automake,style=topic,stylemods={topic},mfirstuc=unexpanded]{glossaries-extra}
Update 2025-04-03: mfirstuc v2.09 now defines \glsmakefirstuc
as a long command. Please allow a few days for the new version to reach your TeX distribution.
Comments
0 comments.
Add Comment
Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=298