5

I am using the scrreprt class and have defined the way my acronyms are presented with the definition:

\usepackage{acro}
\newenvironment{acronyms}
  {\labeling[~\dots]{longestword}}
  {\endlabeling}

\acsetup{list-type=acronyms,only-used=false}

This adds a ... between the acronym and its definition. I am aware that the \printacronym function uses the labeling environment. I would like to specify the vertical separation between the labels just for the labeling environment defined for the printed acronyms (leaving it the same for all subsequent labeling environments).

How would I go about incorporating a command to do this? Please find a MWE:

\documentclass{scrreprt}
\usepackage{acro}

% class `abbrev': abbreviations:
\DeclareAcronym{ny}{
  short = NY ,
  long  = New York ,
  class = abbrev
}
\DeclareAcronym{la}{
  short = LA ,
  long  = Los Angeles ,
  class = abbrev
}
\DeclareAcronym{un}{
  short = UN ,
  long  = United Nations ,
  class = abbrev
}

% class `nomencl': nomenclature
\DeclareAcronym{angelsperarea}{
  short = \ensuremath{a} ,
  long  = The number of angels per unit area ,
  sort  = a ,
  class = nomencl
}
\DeclareAcronym{numofangels}{
  short = \ensuremath{N} ,
  long  = The number of angels per needle point ,
  sort  = N ,
  class = nomencl
}
\DeclareAcronym{areaofneedle}{
  short = \ensuremath{A} ,
  long  = The area of the needle point ,
  sort  = A ,
  class = nomencl
}

\newenvironment{acronyms}
  {\labeling[--]{thelongestword}}
  {\endlabeling}
\acsetup{list-type=acronyms}

\begin{document}

\ac{ny}, \ac{la} \ac{ny} and \ac{un} are abbreviations whereas
\ac{angelsperarea}, \ac{numofangels} and \ac{areaofneedle} are part of the
nomenclature

\printacronyms[exclude-classes=nomencl]

\printacronyms[include-classes=nomencl,name=Nomenclature]

\end{document}
  • 1
    {\labeling[--]{thelongestword}\setlength{\itemsep}{20pt}} – Johannes_B Aug 28 '15 at 20:25
  • @Johannes_B Johannes, please, make an answer, Fitzban can accept it and we don't have another unanswered question. – Keks Dose Aug 28 '15 at 21:21
6

You can change the separation between items (itemsep) within the acronyms-environment. The change is trapped inside and cannot escape.

fitzbanKomaAcroLabeling

\documentclass{scrreprt}
\usepackage{acro}

% class `abbrev': abbreviations:
\DeclareAcronym{ny}{
    short = NY ,
    long  = New York ,
    class = abbrev
}
\DeclareAcronym{la}{
    short = LA ,
    long  = Los Angeles ,
    class = abbrev
}
\DeclareAcronym{un}{
    short = UN ,
    long  = United Nations ,
    class = abbrev
}

          % class `nomencl': nomenclature
\DeclareAcronym{angelsperarea}{
    short = \ensuremath{a} ,
    long  = The number of angels per unit area ,
    sort  = a ,
    class = nomencl
}
\DeclareAcronym{numofangels}{
    short = \ensuremath{N} ,
    long  = The number of angels per needle point ,
    sort  = N ,
    class = nomencl
}
\DeclareAcronym{areaofneedle}{
    short = \ensuremath{A} ,
    long  = The area of the needle point ,
    sort  = A ,
    class = nomencl
}

\newenvironment{acronyms}
{\labeling[--]{thelongestword}\setlength{\itemsep}{20pt}}
{\endlabeling}
\acsetup{list-type=acronyms}

\begin{document}

\ac{ny}, \ac{la} \ac{ny} and \ac{un} are abbreviations whereas
\ac{angelsperarea}, \ac{numofangels} and \ac{areaofneedle} are part of the
nomenclature

\printacronyms[exclude-classes=nomencl]

\printacronyms[include-classes=nomencl,name=Nomenclature]

\begin{labeling}{lalalalalal}
\item [wombat] walzing
\item [duck] dixie
\item [snake] salsa
\end{labeling}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.