Feature Tracker RSS feed

One or more errors has occurred:

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)
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.

🔗Comment from Nicola Talbot 🦜
Date: 2013-09-23 00:00:00

I suggest defining commands like the following:

\newcommand{\agls}[2][]{\ifglsused{#2}{an \gls[#1]{#2}}{a \gls[#1]{#2}}}
\newcommand{\Agls}[2][]{\ifglsused{#2}{An \gls[#1]{#2}}{A \gls[#1]{#2}}}
Unfortunately there are too many different variations of grammar and languages to accommodate all constructs without adding extra overhead to the package.
Replying to Comment #3:

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.

🔗Comment from Nicolas
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).

Replying to Comment #4:

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.

🔗Comment from anonymous
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.
Replying to Comment #5:

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.

🔗Comment from Nicolas Dudebout
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.

Replying to Comment #6:

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.

🔗Comment from Nicolas Dudebout
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.

Replying to Comment #7:

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.


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