Latest news 2024-10-15: New blog post: Tales for Our Times Book Launch.

Bug Tracker RSS feed

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 193🔗
Submitted by: Nicola Talbot 🦜
Date: 2021-12-01 20:48:20
Last update: 2022-10-19 19:55:28
Status Closed (Fixed)
Category glossaries-extra
Version 1.48
Summary \Glsxtrhiername fails with child entries

Sign in to subscribe to notifications about this report.

Description

Using \Glsxtrhiername with sub-entries causes:
Glossary entry `' has not been defined
This is a result of \glscurrentfieldvalue losing its value in the recursive call. It needs to be expanded first.

Patch:

\renewcommand*{\Glsxtrhiername}[1]{%
  \glsdoifexists{#1}%
  {%
    \glsxtrifhasfield{parent}{#1}%
    {%
      \expandafter\Glsxtrhiername\expandafter
        {\glscurrentfieldvalue}\glsxtrhiernamesep
      \ifglshasshort{#1}{\glsfmttext{#1}}{\glsfmtname{#1}}%
    }%
    {\ifglshasshort{#1}{\Glsfmttext{#1}}{\Glsfmtname{#1}}}%
  }%
}

MWE

Download (296B)

% arara: pdflatex
\documentclass{article}

\usepackage{glossaries-extra}

\newglossaryentry{sample}{name={sample},description={}}
\newglossaryentry{childex}{parent={sample},name={child example},description={}}

\begin{document}
\Glsxtrhiername{sample}.

\glsxtrhiername{childex}.

\end{document}

Evaluation

Fixed in v1.49 (make sure you also update glossaries and mfirstuc as well).

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