Bug Tracker RSS feed

One or more errors has occurred:

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 150🔗
Submitted by: Nicola Talbot 🦜
Date: 2020-02-11 18:36:19
Status Closed (Fixed)
Category glossaries-extra
Version 1.41
Summary \glsentry... commands in section headings causes an error with undefaction=warn (or record) option

Sign in to subscribe to notifications about this report.

Description

When an entry is undefined, commands like \glsentryname expand to \csname ...\endcsname forms. This can lead to undefined commands in the table of contents (toc) or list of figures/tables (lof/lot) files.
! Undefined control sequence.
<write> ...protect \numberline {1}\glo@lorem@name 
                                                  }{\thepage }\protected@fil...
This isn't an issue with the base glossaries package as it doesn't allow the referencing of undefined entries, and so isn't considered a bug with just glossaries.sty.

With glossaries-extra, the undefaction=warn package option (which is automatically implemented by the record option) allows for the referencing of undefined commands that trigger warnings rather than errors. This is essential with bib2gls as the entries are never defined on the first LaTeX call in the build process.

The glossaries-extra package does actually provide commands that are specifically designed for the use in captions and section headers (\glsfmtname etc) so these should typically be used rather than \glsentry.... However, with undefaction=warn the package should gracefully allow \glsentry... in captions and section headings if there's some particular reason to use them over the equivalent \glsfmt....

MWE

Download (221B)

\documentclass{article}

\usepackage[record]{glossaries-extra}

\GlsXtrLoadResources[src=example-glossaries-brief.bib]

\begin{document}
\section{\glsentryname{lorem}}

\Gls{lorem}.

\printunsrtglossaries
\end{document} 

Evaluation

Fixed in v1.42.

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.

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=150