Latest news 2024-02-16: Experimental (unstable) datatool v2.49a available for testing. Download from the experimental page if you would like to try it out.

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 218🔗
Date: 2023-02-22 15:17:50
Last update: 2023-02-22 16:22:50
Status Closed (Not a Bug)
Category glossaries-extra
Version 1.48
Summary \glssetcategoryattribute not working with multiple comma separated attributes

Sign in to subscribe to notifications about this report.

Description

Expected behavior of
\glssetcategoryattribute{general,common}{nohyper}{true}
should be equivalent to
\glssetcategoryattribute{general}{nohyper}{true}
\glssetcategoryattribute{common}{nohyper}{true}
but is not. It seems the {nohyper}{true} never does anything with a comma separated attribute argument to \glssetcategoryattribute.

MWE

Download (1.17K)

\documentclass{article}

\usepackage[colorlinks]{hyperref}

\usepackage[automake]{glossaries-extra}
\makeglossaries

\glssetcategoryattribute{general,common}{nohyper}{true} %this doesn't do anyhting?

%\glssetcategoryattribute{general}{nohyper}{true}
%\glssetcategoryattribute{common}{nohyper}{true} %These lines produces the expected behaivor of \glssetcategoryattribute{general,common}{nohyper}{true}

% dummy entries copied from example-glossaries-brief.tex

\newglossaryentry{lorem}{name={lorem},description={ipsum}}

\newglossaryentry{dolor}{name={dolor},description={sit},category={common}}

\newglossaryentry{amet}{name={amet},description={consectetuer},category={common}}

\newglossaryentry{adipiscing}{name={adipiscing},description={elit}}

\newglossaryentry{ut}{name={ut},description={purus},category={common}}

\newglossaryentry{elit}{name={elit},description={vestibulum}}

\begin{document}
	
	Use the entries: \gls{lorem}, \gls{dolor}, \gls{amet},
	\gls{adipiscing}, \gls{ut}, \gls{elit}.
	
	Use the entries again: \gls{lorem}, \gls{dolor}, \gls{amet},
	\gls{adipiscing}, \gls{ut}, \gls{elit}.
	
	Force the hyperlink on: \gls+{ut} or \gls+{dolor}.
	
	\printglossaries
	
\end{document}

Evaluation

The \glssetcategoryattribute command only allows a single category and single attribute in the arguments. There are four related commands:

  1. \glssetcategoryattribute{category}{attribute}{value} (single values only) this is simply implemented with an internal definition;
  2. \glssetcategoriesattribute{category list}{attribute}{value} (first argument is a comma-separated list of labels, the second argument is a single attribute label) this is implemented with a single internal loop;
  3. \glssetcategoryattributes{category}{attribute list}{value} (first argument is a single category label, the second argument is a comma-separated list of attribute labels) this is implemented with a single internal loop;
  4. \glssetcategoriesattributes{category list}{attribute list}{value} (first argument is a comma-separated list of category labels, the second argument is a comma-separated list of attribute labels) this is implemented with a nested internal loop.
So your code needs to use either \glssetcategoriesattribute or \glssetcategoriesattributes.

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