Fix space and plural in acronyms
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
\usepackage[%
|
\usepackage[%
|
||||||
indexonlyfirst% Show only the first use page on the list of acronyms
|
indexonlyfirst% Show only the first use page on the list of acronyms
|
||||||
]{glossaries}
|
]{glossaries}
|
||||||
|
\usepackage{xspace} % To avoid problems with missing spaces after custom commands
|
||||||
|
|
||||||
% Set the list of acronyms style
|
% Set the list of acronyms style
|
||||||
\newglossarystyle{dots}{% From https://tex.stackexchange.com/a/327513
|
\newglossarystyle{dots}{% From https://tex.stackexchange.com/a/327513
|
||||||
@@ -24,7 +25,10 @@
|
|||||||
\newcommand{\acronym}[2]{% #1 = acronym, #2 = full name
|
\newcommand{\acronym}[2]{% #1 = acronym, #2 = full name
|
||||||
\newacronym{#1}{#1}{#2}%
|
\newacronym{#1}{#1}{#2}%
|
||||||
\expandafter\newcommand\csname #1\endcsname{% Create a command named after the acronym (call \#1)
|
\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%
|
||||||
}%
|
}%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user