Setup acronyms

This commit is contained in:
2024-08-10 15:50:52 +02:00
parent 454da992cb
commit 8b12d99c66
5 changed files with 35 additions and 2 deletions

29
config/acronyms.tex Normal file
View File

@@ -0,0 +1,29 @@
\usepackage[%
indexonlyfirst% Show only the first use page on the list of acronyms
]{glossaries}
% Set the list of acronyms style
\newglossarystyle{dots}{% From https://tex.stackexchange.com/a/327513
\setglossarystyle{list}% Base style
%
\renewcommand*{\glossentry}[2]{%
\item[%
\upshape\bfseries% Upright and bold
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}}% The acronym
]%
\glossentrydesc{##1}% The description
\unskip\leaders\hbox to 2.9mm{\hss.}\hfill##2}% The pages
%
\renewcommand*{\glsgroupskip}{}% No gap between groups
}
\setglossarystyle{dots}
\makenoidxglossaries % Prepare the list of acronyms
% Define the acronyms
\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}%
}%
}

View File

@@ -21,7 +21,6 @@
colorlinks = true, % Color links
allcolors = Black, % Color of all links
citecolor = OliveGreen, % Color of citations
linkcolor = MidnightBlue, % Color of internal links
allbordercolors = White, % No borders around links
}