1

Whenever an acronym is mentioned in my document, it will be defined in the list of acronyms but not in the main text. I tried changing setabbreviationstyle but nothing seems to work. Here's an example code:

\documentclass[twocolumn]{svjour3}

\usepackage[hidelinks]{hyperref}
\usepackage[acronym,nopostdot,style=index,nonumberlist,nogroupskip,nomain]{glossaries-extra}% these options are here because I'm writing a journal paper and I need to format the list of acronyms in a particular way

\makeglossaries

\newacronym{am}{AM}{Additive Manufacturing}
\newacronym{sla}{SLA}{StereoLithography Apparatus}

\setabbreviationstyle[acronym]{long-short}

\GlsXtrEnableEntryCounting
{acronym}% list of categories to use entry counting
{2}% I have A LOT of acronyms and some I only use once so I don't need them on the list

\begin{document}

\printglossaries

The 1980's saw the development of an early form of \gls{sla}, a form of \gls{am}, for producing plastic prototypes to help visualization of parts during development. \gls{sla} has one of the best surface finished of all the \gls{am} tenchniques.

\end{document}

What I get (apart from the list of acronyms) is

"The 1980's saw the development of an early form of SLA, a form of AM, for producing plastic prototypes to help visualization of parts during development. SLA has one of the best surface finished of all the AM tenchniques."

instead of

"The 1980's saw the development of an early form of StereoLithography Apparatus (SLA), a form of Additive Manufacturing (AM), for producing plastic prototypes to help visualization of parts during development. SLA has one of the best surface finished of all the AM tenchniques."

I read that I can use the \glsunsetall to reset the first time use flag of the acronyms for the glossaries package but using it after the \GlsXtrEnableEntryCounting command still makes no difference.

EDIT: I tried \GlsXtrEnableLinkCounting which returned an error and I tried removing the \GlsXtrEnableEntryCounting command but it made no difference to the acronyms in the main text.

enea19
  • 107
  • You need to set the style before you define the acronyms. So just move \setabbreviationstyle[acronym]{long-short} before the first instance of \newacronym. – Nicola Talbot Jun 21 '18 at 13:29

1 Answers1

1

The abbreviation style must be set before \newacronym (or \newabbreviation) otherwise it will use the default setting (which for \newacronym is the short style).

There should be a warning message in the transcript:

Package glossaries Warning: Abbreviation style has been switched 
(glossaries)                for category `acronym', 
(glossaries)                but there have already been entries 
(glossaries)                defined for this category. Unwanted 
(glossaries)                side-effects may result on input line 11.

This just means that you need to move

\setabbreviationstyle[acronym]{long-short}

before the first instance of \newacronym:

\makeglossaries

\setabbreviationstyle[acronym]{long-short}

\newacronym{am}{AM}{Additive Manufacturing}
\newacronym{sla}{SLA}{StereoLithography Apparatus}
Nicola Talbot
  • 41,153