Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Plural form of acronyms in glossaries package

11,471 views
Skip to first unread message

Mathias Lindner

unread,
Jun 12, 2009, 4:30:33 AM6/12/09
to
Hi

I've tried to add a plural form to an acronym entry in glossaries. See
the example below for detailed information.
The problem is the first appearance in the document. Whereas a singular
entry ('pmm' in the example below) shows "description (acronym)" a
plural form ('pm' in the example) shows "regular plural with s
(irregular manual defined plural)". You will see what I mean when you
compile the example.
However, I just want those two commands behaving the same. Thus, the
\glspl command should output "manual defined plural (acronym)".

Thanks for your ideas!

Regards,
Mathias


\documentclass{scrreprt}

\usepackage[acronym]{glossaries}
\makeglossaries
\newacronym[plural={Permanentmagnete}]{pm}{PM}{Permanentmagnet}
\newacronym[plural={Permanentmagnete}]{pmm}{PM}{Permanentmagnet}

\begin{document}
\glspl{pm}

\gls{pmm}
\end{document}

Nicola Talbot

unread,
Jun 12, 2009, 1:26:21 PM6/12/09
to
On Jun 12, 9:30 am, Mathias Lindner <mathias.lind...@web.de> wrote:
> \newacronym[plural={Permanentmagnete}]{pm}{PM}{Permanentmagnet}
> \newacronym[plural={Permanentmagnete}]{pmm}{PM}{Permanentmagnet}

Don't use the plural key for acronyms. Use \glslongpluralkey or
\glsshortpluralkey instead:

\newacronym[\glslongpluralkey={Permanentmagnete}]{pm}{PM}
{Permanentmagnet}

Regards
Nicola Talbot

Mathias Lindner

unread,
Jun 15, 2009, 3:31:25 AM6/15/09
to
Nicola Talbot schrieb:

Thank you, this is perfectly working! Strange, I have read the whole
section about acronyms in the manual but didn't notice that. Last week
was demanding ;)

One idea in this context: Many languages apart from English have
different cases for nouns that require different final syllables.
Although I understand that it would be hard to implement keys for all
cases in all languages you maybe could add 6 user-defines keys each for
singular, plural, short and long form? Thus, if one needs e.g. the
dative case it's no pain to define the resp. word formations into those.
One suggestion how to define them:

\newacronym[
\glslongpluralkey={Hunde},
\glshortpluralkay={H},
\glslonguser1={Hundes}, %genitive
\glslongpluraluser1={Hunde},
\glslonguser2={Hunde}, %dative
\glslongpluraluser2={Hunden}
]{hund}{H}{Hund}

And how to use them:

Genitiv des \gls[user1]{hund}, Genitiv der \gls[pluraluser1]{hund}.

Implementing something like this would be really really great for German
users. And I guess other languages will profit too. I made up the number
of 6 user-defines keys because of the 6 Russian cases I know of. Of
cause languages as Finnish have much more cases (19?) but I can't
imagine they will need all of them in one text, do they?

Cheers,
Mathias

Nicola Talbot

unread,
Jun 15, 2009, 6:01:07 AM6/15/09
to

Unfortunately I don't have the time to do such a major change to the
package right now, but you can always do \glslink{hund}{Hunde} or
\glsdisp{hund}{Hunde}.

Regards
Nicola Talbot
--
Home: http://theoval.cmp.uea.ac.uk/~nlct/
LaTeX Related Information: http://theoval.cmp.uea.ac.uk/~nlct/latex/
Creating a LaTeX Minimal Example:
http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/

Tchiller

unread,
Nov 27, 2012, 7:53:58 AM11/27/12
to
Hello,

I'm trying to solve that problem for my document as well. I am having some problems with genitive and dative cases. I would be glad, if you could answer some questions, I'm having with the \newacronym{} expression.

1. What is the difference between \glsdisp{} and \glslink{} (looks the same, when I'm using it?

I want to have the first acronym displayed and not linked:

2. How do I use \glsdisp{} for a genitive but stop the display, if the acronym appears earlier ?

3. How do I suppress the linkreference for the first appearance if I use \glsdisp{} or \glslink{}?

4. How can I display the first appearance like "Acronym (acr.)" when using \glsdisp{}? Until now it's just showing the descriptive text.

There are two more questions I got while working with glossaries:

5. Is there a possibility to give further instructions directly at the use of \gls{}? Something like "\gls[footnote]{acr.}". It would be even nicer, if that would override the global options. If my above example would be the first appearance, it would set a footnote explanation but not the normal "display".

6. How can I teach hibernation to words within the descriptive text? E. g. \newacronym{acr.}{acr.}{acronym"=usage}
The output at first usage would be: "I'm testing the acronym-usage (acr.) of the glossaries package. This package makes acr. very easy."

Thank you very much for your help and time!

Nicola Talbot

unread,
Dec 1, 2012, 7:27:47 AM12/1/12
to
On 27/11/12 12:53, Tchiller wrote:
> Hello,
>
> I'm trying to solve that problem for my document as well. I am having some problems
> with genitive and dative cases. I would be glad, if you could answer some questions,
> I'm having with the \newacronym{} expression.
>
> 1. What is the difference between \glsdisp{} and \glslink{} (looks the same, when I'm using it?

\glsdisp affects the first use flag, \glslink doesn't. (See page 56 of
glossaries-user.pdf v3.04) You can see the difference with the following:

\documentclass{article}

\usepackage[colorlinks]{hyperref}
\usepackage{glossaries}

\makeglossaries

\newacronym{asa}{ASA}{a sample acronym}

\begin{document}

\glsdisp{asa}{sample} \gls{asa}.

\end{document}

Try reruning with \glslink instead of \glsdisp and you'll notice the
difference.

>
> I want to have the first acronym displayed and not linked:

Use package option hyperfirst=false (See page 32 of glossaries-user.pdf)

>
> 2. How do I use \glsdisp{} for a genitive but stop the display,
> if the acronym appears earlier ?

You can test if the acronym has already been used with \ifglsused (see
page 106 of glossaries-user.pdf)

>
> 3. How do I suppress the linkreference for the first appearance
> if I use \glsdisp{} or \glslink{}?

The hyperfirst=false option affects \glsdisp as well as \gls. With
\glslink, you'll have to use the starred version \glslink* for the first
appearance.

>
> 4. How can I display the first appearance like "Acronym (acr.)" when using \glsdisp{}?
> Until now it's just showing the descriptive text.

\glsdisp{label}{text} just displays the text given in the second
argument. If it's not doing this, please give a minimal example showing
the problem.

>
> There are two more questions I got while working with glossaries:
>
> 5. Is there a possibility to give further instructions directly at the use of \gls{}?
> Something like "\gls[footnote]{acr.}".
> It would be even nicer, if that would override the global options. If
> my above example would be the first appearance, it would set a
> footnote explanation but not the normal "display".
>

No, that needs to be set up before the acronyms are defined. If you want
to override the format for a specific instance, use \glslink or \glsdisp
instead of \gls.

> 6. How can I teach hibernation to words within the descriptive text?
> E. g. \newacronym{acr.}{acr.}{acronym"=usage}
> The output at first usage would be: "I'm testing the acronym-usage (acr.)
> of the glossaries package. This package makes acr. very easy."

The default output on first usage is "long (short)". Can you clarify
what you want.

Regards
Nicola Talbot
--
Home: http://www.dickimaw-books.com/
0 new messages