7

I am not sure if this is acceptable typographic convention - but my PhD advisor would like me to expand each acronym for its first use within each chapter of my PhD thesis.

The rationale is that, if the reader (maybe an expert) chooses to skip over the introduction (where a particular acronym was first used) and goes straight to a middle chapter, then it is quite helpful to expand the first use of acronyms in each chapter to be expanded.

How do I achieve this behavior in LaTeX using the glossaries-extra package?

Here is a minimal example demonstrating the scenario. The desired behavior is also explained and highlighted in the resulting output.

\documentclass{report}
\usepackage{glossaries-extra}
\setabbreviationstyle[acronym]{long-short}
\newacronym{tla}{TLA}{three letter acronym}
\newacronym{adc}{adc}{Analog to Digital Converter}

\begin{document}

\chapter{Introduction}
Hello world. We have too many \gls{tla}. The acronym in the previous sentence shall expand.

Note that the second  usage here \gls{tla} will not expand,  and is the expected
(and correct) behavior.

\chapter{Important Stuff}
The \gls{tla} acronym has been expanded  before. But since the reader might read
this chapter first, it is nice to  have its first usage in the previous sentence
expand.

Note that the second  usage here \gls{tla} will not expand,  and is the expected
(and correct) behavior.

\end{document}

The output is

tla_issue

5

The simplest method is to insert \glsresetall at the start of each chapter. Since etoolbox is automatically loaded (by the base glossaries package), you can use etoolbox's \preto command:

\documentclass{report}
\usepackage{glossaries-extra}

\preto\chapter{\glsresetall}

\setabbreviationstyle[acronym]{long-short}
\newacronym{tla}{TLA}{three letter acronym}
\newacronym{adc}{adc}{Analog to Digital Converter}

\begin{document}

\chapter{Introduction}
Hello world. We have too many \gls{tla}. The acronym in the previous sentence shall expand.

Note that the second  usage here \gls{tla} will not expand,  and is the expected
(and correct) behavior.

\chapter{Important Stuff}
The \gls{tla} acronym has been expanded  before. But since the reader might read
this chapter first, it is nice to  have its first usage in the previous sentence
expand.

Note that the second  usage here \gls{tla} will not expand,  and is the expected
(and correct) behavior.

\end{document}

Chapter 1 Introduction Hello world. We have too many three letter acronym (TLA). The acronym in the previous sentence shall expand. Note that the second usage here TLA will not expand, and is the expected (and correct) behavior.

Chapter 2 Important Stuff The three letter acronym (TLA) acronym has been expanded before. But since the reader might read this chapter first, it is nice to have its first usage in the previous sentence expand. Note that the second usage here TLA will not expand, and is the expected (and correct) behavior.

If you use a different class (such as memoir or scrbook) there may be a convenient hook provided that can be used instead. If you want to limit the reset to just a particular glossary type, you can use the optional argument of \glsresetall.

  • Wow. An answer from the package creator itself. Thank you very much. May I request to consider this as a feature request (i.e. an option to the package) for future versions of glossaries-extra? It is not too unusual to expect this type of behavior in long documents such as books or theses? – Krishna Jun 9 '18 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.