Feature Request Tracker
ID: | 13 🔗 |
---|---|
Status: | Closed (Implemented) |
Category: | glossaries |
Date: | 2013-08-11 04:02:49 |
Summary: | label in defglsdisplay |
Report
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
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.
Add comment or return to search results.
Watch This Report
If you would like to be notified whenever updates are made to this report, please fill in your email address in the box below and click on "Notify Me of Changes" button. (Please ensure the address is valid.) Your details won't be passed on to third parties in line with this site's Privacy Policy.
If you supply your name, it will be used in the email greeting, which provides a more personal message, otherwise you'll just get a generic greeting. If you have previously supplied your name when signing up for notifications, you don't need to resupply it unless you want to change it.
If you have previously subscribed to notifications for this report, you can unsubscribe by clicking on the "Stop Notification" button.
The "Confirm Topic ID" field helps to protect against spambots. Please enter the feature request ID (which you can find at the top of this page).
To unsubscribe from all notifications use the notifications page.
Comment
You can append a comment to this report using the form below. Comments are checked first before being added. Any spam or offensive content will be removed first according to this site's Terms of Website Use. Please bear in mind that I develop and maintain free software in my spare time. If you want commerical level support then you can hire a TeX consultant.
The "Confirm Feature Request ID" field helps to protect against spambots. Please enter the feature request ID (which you can find at the top of this page).