Abbreviations
Acronyms via \gls: the long form on first use, the short form afterwards, plus an auto-built list.
- Example
- Definitions
- Preamble
At the first pass, the \gls{er} was 5.
At the second pass was \gls{er} 3.
The plural form can be seen here: \glspl{er}.
To demonstrate what the list of abbreviations looks like for longer description texts, \glspl{rdbms} must be mentioned here.
\gls{dante} is a local \TeX\ user group.
The German-speaking local \TeX\ user group is \gls{dante}.
A \gls{gp} is a medical doctor.
I went to my surgery to see the \gls{gp}.
% Note the difference between "acronym" and "abbreviation": https://english.stackexchange.com/q/3755/66058
% We regard abbreviation as superset of acronym
% `er` is used by the English example, `fr` by the German one. Both are defined in
% both abbreviation lists because the template ships a single abbreviations.tex that
% every main file (English and German) loads -- an undefined entry breaks the build.
\newabbreviation{er}{ER}{error rate}
\newabbreviation{fr}{FR}{Fehlerrate}
\newabbreviation[shortplural={RDBMS},longplural={Relational Database Management Systems}]{rdbms}{RDBMS}{Relational Database Management System}
\newabbreviation[category=abbreviationdot]{dante}{DANTE e.V.}{Deutschsprachige Anwendervereinigung \TeX\ e.V.}
\newabbreviation{gp}{G.P.}{General Practitioner}
% Source: https://tex.stackexchange.com/a/154566/9075
\newabbreviation{html}{HTML}{hypertext markup language}
\newacronym{nato}{NATO}{North Atlantic Treaty Organization}
\usepackage[
translate=babel,
abbreviations, % create "abbreviations" glossary
nomain, % don't create "main" glossary
stylemods % do the adjustments for the glossary styles
]{glossaries-extra}
\setglossarystyle{index}
% Hint by https://tex.stackexchange.com/a/463188/9075
% \usepackage{glossary-longextra}
% The list is sorted by TeX itself (\printnoidxglossary): no external tool (makeglossaries) is needed, so the list
% also appears when compiling without latexmk. TeX sorting is fine for a list of abbreviations; it is slow for
% large glossaries and sorts accented characters by code point.
\makenoidxglossaries
\input{abbreviations}