0

I know that this is not the intended behavior given the user guide.

Background: There are cases where I absolutely need the full form (and I want to enforce that - in case I accidentally copy a text part where the acronym is used earlier in the text). I want to make sure that afterwards, the correct abbreviation is used.

Are there any tricks? I just want that \glsfirst counts as actual usage.

Code:

\documentclass{article}
\usepackage[acronym]{glossaries}

\makeglossaries

\newacronym{di}{DI}{data integration}

\begin{document}

Here, I absolutely need the full acronym: \glsfirst{di}.

Now, I do not really care: \gls{di}

\clearpage

\printglossary[type=\acronymtype]

\end{document}

1 Answer 1

1

From what I understand, you want an acronym everywhere except where you explicitly mention \glsfirst. This can be achieved with \glsunset{<label>} or (for every labels) with \glsunsetall.

\documentclass{article}
\usepackage[acronym]{glossaries}

\makeglossaries

\newacronym{di}{DI}{data integration}

\begin{document}
  \glsunsetall
  Now, I do not really care: \gls{di}
  
  Here, I absolutely need the full acronym: \glsfirst{di}.
  
  Now, I do not really care: \gls{di}
  
\end{document}

enter image description here

1
  • Great answer, this solves my problem. I was not aware of the glsunset commands; \glsunset{<label>} is also very helpful in case someone wants to be more selectively.
    – Janothan
    May 23, 2022 at 10:05

You must log in to answer this question.

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