Fix space and plural in acronyms

This commit is contained in:
2024-08-10 17:25:47 +02:00
parent 7b5988c798
commit a90e19f03a

View File

@@ -1,6 +1,7 @@
\usepackage[%
indexonlyfirst% Show only the first use page on the list of acronyms
]{glossaries}
\usepackage{xspace} % To avoid problems with missing spaces after custom commands
% Set the list of acronyms style
\newglossarystyle{dots}{% From https://tex.stackexchange.com/a/327513
@@ -24,7 +25,10 @@
\newcommand{\acronym}[2]{% #1 = acronym, #2 = full name
\newacronym{#1}{#1}{#2}%
\expandafter\newcommand\csname #1\endcsname{% Create a command named after the acronym (call \#1)
\gls{#1}%
\gls{#1}\xspace%
}%
\expandafter\newcommand\csname #1s\endcsname{%
\glspl{#1}\xspace%
}%
}