Feature Tracker
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 | 10🔗 |
---|---|
Date: | 2013-04-30 08:40:08 |
Status | Closed (Implemented) Sign in if you want to like this report. |
Category | glossaries |
Summary | Variable pronoun |
Sign in to subscribe to notifications about this report.
Description
I am using glossaries to define recurring acronyms and link them to a glossary section.One of my acronyms is the following:
\newacronym[longplural=Markov decision processes]{mdp}{MDP}{Markov decision process}The indeterminate pronoun to use with this construction depends if the acronym is used (an MDP) or not (a Markov decision process). Would it be possible to have this encoded in glossaries, the same way that long plurals are defined?
Thanks in advance,
Nicolas
MWE
No mwe.tex
Evaluation
In experimental version 3.14a, I've add a new package glossaries-prefix that is a more generic approach. When the version has stabilized it will be uploaded to CTAN as version 4.0.
Update 2013-11-14
I've now uploaded glossaries version 4.0 to CTAN.
Comments
5 comments.
Date: 2013-09-24 18:23:49
This unfortunately cannot work. The macro `\agls` does not differentiate between the four possible cases: (a, a), (a, an), (an, a), (an, an). The two components of a tuble being (abbreviated, non abbreviated).
Date: 2013-09-24 12:42:45
The closest I could get to a desirable result is:
\newacronym[longplural=Markov decision processes, user1=an, user2=a, user3=An, user4=A]{mdp}{MDP}{Markov decision process} \newcommand{\agls}[2][]{\ifglsused{#2}{\glsuseri{#2} \gls[#1]{#2}}{\glsuserii{#2} \gls[#1]{#2}}} \newcommand{\Agls}[2][]{\ifglsused{#2}{\glsuseriii{#2} \gls[#1]{#2}}{\glsuseriv{#2} \gls[#1]{#2}}}I will look into adding some news keys to my glossary entries.
Date: 2013-10-01 17:14:56
I have a working implementation at the following address https://gist.github.com/dudebout/648241fe7b8cc3fb0b30
The new code is only the first 40 lines. I had to redefine \newglossaryentry
only in two locations to plug in my new keys.
I think that this case of indefinite article is very similar to specific plurals. I would gladly rework any part you want if that helps with merging it upstream.
By the way, as I wrote this I saw some code redundancy. For example, in the definition of \Glsuseri
(more specifically @Glsuseri
) you duplicate the macro \Glsentryuseri
. This is done in all the user variables as far as I can tell.
Let me know your thoughts.
Date: 2013-10-01 17:14:56
I have deleted the gist and created a new repository for my extension: https://github.com/dudebout/latex_ddbglossaries
If you want to continue discussion please open an issue there as I do not get any notifications from dickimaw-books.com.
Add Comment
Page permalink: https://www.dickimaw-books.com/featuretracker.php?key=10
Date: 2013-09-23 00:00:00
I suggest defining commands like the following:
Unfortunately there are too many different variations of grammar and languages to accommodate all constructs without adding extra overhead to the package.