3

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?

2 Answers 2

6

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

2
  • Hi, I know it's an old topic, but I had the same problem. Is it possible to use this longtable-option and also align the abbreviations on the left (delete the offset to the right)?
    – Knall bert
    Commented Nov 28, 2021 at 11:45
  • 1
    @Knallbert I think you'd have to define a new list template based on the existing longtable style, the column types are hardcoded at the moment. If you want to open a new question I may be able to help.
    – Dai Bowen
    Commented Nov 30, 2021 at 17:03
0

Here are other options with which you can fine-tune spacing and location.

% Abbreviations setup
\usepackage{acro}
\usepackage{longtable}

\setlength\LTleft{18pt}  % Adjust the left margin
\setlength\LTpre{-6pt}   % Adjust the space above the table

\acsetup{
  list/template = longtable,
  list/heading = none,
  templates/colspec = {l@{\hspace{2cm}}l} % Adjust the space as needed
}

\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}).

\chapter*{\centerline{List of Abbreviations and Terms}}\label{ch:terms}
\printacronyms[include-classes=abbrev,name=none]

\end{document}
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .