Feature 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 13🔗
Date: 2013-08-11 04:02:49
Status Closed (Implemented)
Category glossaries
Summary label in defglsdisplay

Sign in to subscribe to notifications about this report.

Description

Dear Nicola,

I have tried to answer a question on tex.stackexchange (How can I add every glossary entry to the index?) and found the \defglsdisplay(first) command quite usefull. However I find it is quite limited, that one can only access two keys of the glossary entry (description and symbol), the actual entry text comes preformated. To lift this limitation I suggest passing the label and a flag for what form is used (plural, case, Upcase, UPPERCASE) in addition. This would allow to access other keys, like userfields or the general display form.

The actual usecase for the question would be to add acronyms to the index on their first use. Right now I can only access "An Acronym Example (AAE)" and "An Acronym Example" and the symbol from \glsdisplay(first).

please drop me a line what you think. And thank you for all your hard work on the glossaries package.

Kind regards
ted

P.S.: If one would supply commands of the form \glsFlags{plural}{casing}[flags]{label} that forward to the proper existing macros (\gls, \Gls \GLS,...) one could omit passing those things to the display macros.

ted

MWE

No mwe.tex

Evaluation

You can use \glslabel within \defglsdisplay and \defglsdisplayfirst to access the entry label, so you can use commands like \glsentryuseri{\glslabel} etc to access the other fields. I can't make any changes that would break compatibility with earlier versions, but I maybe I could add a flag that would let you know which form has been used (first, plural etc). I'll look into it when I next update the package.

Update 2013-10-15

I realise that in some instances \glslabel wasn't properly set. I've fixed this in experimental version 3.11a and obsoleted \glsdisplay, \glsdisplayfirst, \defglsdisplay and \defglsdisplayfirst. These have been replaced with \glsentryfmt and \defglsentryfmt.

\glsentryfmt doesn't take any arguments. Instead you can use the following commands to access information: \glslabel, \ifglsused{true part}{false part}, \glsifplural{true part}{false part}, \glscapscase{no case change}{first upper case}{all caps}, \glsinsert (text inserted using the final optional argument in commands like \gls) and \glscustomtext (text provided by user in \glsdisp or empty if one of the other commands, such as \gls has been used).

Update 2013-11-14

I've now uploaded glossaries version 4.0 to CTAN.

Comments

0 comments.


Add Comment

Name (optional):

Are you human? Please confirm the feature request 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/featuretracker.php?key=13