Allow custom key for acronym
This commit is contained in:
@@ -22,8 +22,8 @@
|
|||||||
\makenoidxglossaries % Prepare the list of acronyms
|
\makenoidxglossaries % Prepare the list of acronyms
|
||||||
|
|
||||||
% Define the acronyms
|
% Define the acronyms
|
||||||
\newcommand{\acronym}[2]{% #1 = acronym, #2 = full name
|
\NewDocumentCommand{\acronym}{O{#2} m m}{% #1 = command, #2 = acronym, #3 = full name
|
||||||
\newacronym{#1}{#1}{#2}%
|
\newacronym{#1}{#2}{#3}%
|
||||||
\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}\xspace%
|
\gls{#1}\xspace%
|
||||||
}%
|
}%
|
||||||
|
|||||||
Reference in New Issue
Block a user