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 275🔗
Date: 2024-06-27 13:41:08
Last update: 2024-06-27 15:44:19
Status Closed (Not a Bug)
Category glossaries
Version 4.53
Summary unable to define newentry by using math symbols as the label

Sign in to subscribe to notifications about this report.

Description

I want to generate a symbol list using the orignial math symbol as the label to define entries, but some symbols will cause errors. In the following example, the first entry is all right, but the second entry does not work.

\documentclass{article}
\usepackage{glossaries}


\makeglossaries

\newglossaryentry{$L_c$}{name={$L_c$},description={Transportation fixed costs}}
%\newglossaryentry{$\mathbf{I}$}{name={$\mathbf{I}$},description={Information set space}}

\begin{document}

\gls{$L_c$}

\printglossaries


\end{document} 

How can I make it work?

MWE

Download (303B)

\documentclass{article}
\usepackage{glossaries}


\makeglossaries

\newglossaryentry{$L_c$}{name={$L_c$},description={Transportation fixed costs}}
\newglossaryentry{$\mathbf{I}$}{name={$\mathbf{I}$},description={Information set space}}

\begin{document}

\gls{$L_c$}

\printglossaries


\end{document} 

Evaluation

Labels can't contain any content that is unable to expand to a simple string as labels are used to form internal control sequences that store the entry data.

Bear in mind that you also can't do \label{$\mathbf{I}$} which is essentially the same type of thing.

I'm closing this as not a bug as the manual states that labels must be expandable. There is no workaround.

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