Seite 1 von 1

remove spacing and use comma in list of acronyms

Verfasst: Mo 9. Jan 2023, 13:45
von xush
Hi there,

I use the acro package to create a list of acronyms. However, I would like to have no line spacing in the listing and couldn´t find a solution for this. Also I get an error message when I put a comma in the acronym description (e.g. long = Assembly, Integration and Test, see minimal example). Does anyone know how to fix this and how to get rid of the line spacing?
\documentclass{scrreprt}

\usepackage{acro}

\DeclareAcronym{AIL}{
	short = AIL,
	long = Action Item List}

\DeclareAcronym{AIT}{
	short = AIT,
	long = Assembly, Integration and Test}

\begin{document}
	
	\section{Introduction}
	
	\ac{AIL}\ac{AIT}
	
	\section{ACRONYMS AND ABBREVIATIONS}
	\printacronyms[heading=none]
	
	
\end{document}

Re: remove spacing and use comma in list of acronyms

Verfasst: Mo 9. Jan 2023, 14:14
von ich meine ja nur
Die Sprache in diesem Forum ist Deutsch. Ich bitte, dies zu respektieren. Falls du ein englisches Forum suchst: → LaTeX.org und viele anderen.

In einer Komma-separierten Liste, kann man natürlich einen Eintrag mit Komma nur dann schreiben, wenn man den Eintrag in geschweifte Klammern setzt. Das ist bei acro nicht anders als bei anderen Paketen, die key-value-Optionen bieten.

Die Voreinstellung für die Ausgabe des Glossars mit acro ist template=description. Das heißt, es wird eine description-Liste verwendet. Natürlich kann man Templates ändern (siehe acro-Anleitung, Abschnitt 25). Man kann aber den voreingestellten Abstand der Liste auch einfach mit Hilfe von enumitem abschalten.
\documentclass{scrreprt}

\usepackage{acro}
\usepackage{enumitem}

\DeclareAcronym{AIL}{
	short = AIL,
	long = Action Item List}

\DeclareAcronym{AIT}{
	short = AIT,
	long = {Assembly, Integration and Test}}

\begin{document}
	\tableofcontents
	
	\section{Introduction}
	
	\ac{AIL}\ac{AIT}
	
	\section{ACRONYMS AND ABBREVIATIONS}
	\setlist{nosep}% Siehe enumitem-Anleitung.
	\printacronyms[heading=none]
	
	
\end{document}
Das Inhaltsverzeichnis habe ich hinzugefügt, damit der Online-Compiler die notwendigen LaTeX-Läufe durchführt, um das Glossar zu sehen.

Re: remove spacing and use comma in list of acronyms

Verfasst: Mo 9. Jan 2023, 14:16
von ich meine ja nur
Davon unabhängig: Das Beispiel lässt vermuten, dass scrartcl für dich besser geeignet wäre als scrreprt. Anderenfalls solltest du alle \section durch \chapter ersetzen.

Re: remove spacing and use comma in list of acronyms

Verfasst: Mo 9. Jan 2023, 17:12
von xush
Vielen Dank, es funktioniert nun einwandfrei! :)