Allow custom key for acronym

This commit is contained in:
2024-08-14 11:46:48 +02:00
parent b6e334de62
commit 8dc6018887

View File

@@ -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%
}% }%