[Tex/LaTex] Align Abbreviations and Nomenclature with the acro package

acroacronymshorizontal alignmentnomenclature

Ahoj,

I got a little issue concerning the acro package. I want my abbreviations and nomenclature to aligned.

Let's say I have this code:

\documentclass{article}
\usepackage{acro}

\acsetup{first-style=short}

\DeclareAcronym{ihp}{
short = IHP,
long = Inner Helmholtz Plane,
class = abbrev
}

\DeclareAcronym{ohp}{
short = OHP,
long = Outer Helmholtz Plane,
class = abbrev
}

\begin{document}

The layer of water dipoles and ions with hydrogen envelope, which forms
in this way at the boundary surface, is called the Helmholtz layer and
extend into an inner Helmholtz plane (\ac{ihp}) and an outer Helmholtz
plane (\ac{ohp}).

\printacronyms[include-classes=abbrev,name=Abbreviations]

\end{document}

enter image description here

But the long names of the Acronyms should be aligned.
Is there a way align them?

Best Answer

You could change the environment used by \printacronyms from description (the default) to longtable from the longtable package. In \ac-setup the list-style option controls this, to place it in a longtable environment you can simply use list-style=longtable (or there are a number of alternative options).

The \DeclareAcroListStyle even allows development of your own style to place the list in for further customisation as documented in the acro manual.

With list-style=longtable (extra O added to acronym to emphasise the alignment)

\documentclass{article}
\usepackage{longtable}
\usepackage{acro}

\acsetup{first-style=short,list-style=longtable}

\DeclareAcronym{ihp}{
short = IHP,
long = Inner Helmholtz Plane,
class = abbrev
}

\DeclareAcronym{ohp}{
short = OOHP,
long = Outer Helmholtz Plane,
class = abbrev
}

\begin{document}

The layer of water dipoles and ions with hydrogen envelope, which forms
in this way at the boundary surface, is called the Helmholtz layer and
extend into an inner Helmholtz plane (\ac{ihp}) and an outer Helmholtz
plane (\ac{ohp}).

\printacronyms[include-classes=abbrev,name=Abbreviations]

\end{document}

enter image description here