1

I'm using glosseries to manage my acronyms and added/defined the genitive form of a word using

\glsaddkey*{gen}%key
{\glsentrytext{\glslabel}XXXGEN}% default
{\glsentrygen}% command analogous to \glsentrytext
{\Glsentrygen}% command analogous to \Glsentrytext
{\glsgen}% command analogous to \glstext
{\Glsgen}% command analogous to \Glstext
{\GLSgen}% command analogous to \GLStext

and added an entry:

\newacronym[%
   gen={Signal-Rausch-Verhältnisses},
]{SNR}{SNR}{Signal-Rausch-Verhältnis}

Then I use it in my TeX-file like

… in Abhängigkeit des \glsgen{SNR} …
… für hohe \gls{SNR} …

The problem is as follows: It SHOULD translate to

… in Abhängigkeit des Signal-Rausch-Verhältnisses (SNR) …
… für hohe SNR …

but actually translates to

… in Abhängigkeit des Signal-Rausch-Verhältnisses …
… für hohe Signal-Rausch-Verhältnis (SNR) …

Any ideas how to trigger the acronym-abbrevation / making use of the first-use flag?

When I use the basic form/gls-command everything works like expected. (similar question here but without any answers or examples).

1 Answer 1

1

You can do the test for first use yourself and then act accordingly. And use glsunset to unset first use.

\newcommand{\GENglspostlinkhook}{%
  \ifglsused{\glslabel}{}{ (\glsentryshort{\glslabel})}\glsunset \glslabel}
\newcommand{\glsgenx}[1]{%
  {\let\glspostlinkhook \GENglspostlinkhook\glsgen{#1}}
}

and then use

in Abhängigkeit des \glsgenx{SNR}

Or maybe swap \glsgen and \glsgenx.

If you want the (SNR) to have a hyperlink to the acronym, then use:

\newcommand{\GENglspostlinkhook}{%
  \ifglsused{\glslabel}{}{ (\glshyperlink{\glslabel})}\glsunset \glslabel}
1
  • 1
    I have made a correction for the case when the label and the abbreviation are different (e.g. \newacronym[gen={Signal-Rausch-Verhältnisses}]{snr}{SNR}{Signal-Rausch-Verhältnis}. It should then print (SNR) and not (snr) Jan 1, 2017 at 15:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .