Bug Tracker RSS feed

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

Return to Search Results

Sign in to subscribe to notifications about this report.

Description

Using the topic 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}\glossarypostamble
With 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

Name (optional):

Are you human? Please confirm the bug report ID (which can be found at the top of this page) or login if you have an account. All guest comments have to be manually checked before they appear on the page. There are too many bots trying to spam the site to allow unauthenticated users to post without verification.

Comment:


You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

You can use the Preview button to review your message formatting before submitting.

Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=298

Return to Search Results