0

I'd like to ask if there's a way to do a linebreak, to split a line in the abbreviation itself (i want the short form to be on two lines), using acronym package. I think the code and an image will explain my problem better.

This is the code I thought would work but it doesn't.

I tried braking the line by using \\ \break \breakline \newline.

\begin{acronym}[SEPSEPSEPSEP]
\acro{abbr1}[someveryveryl\\ongtext\linebreak there]{the meaning of this abbreviation is so cool}
\end{acronym}

What I want to achieve

Thank you in advance for any tips!

EDIT: I figured out a way to break the line using the following (parbox):

\makeatletter
\def\uplabel#1{{\parbox[]{\labelwidth}{#1}\hfill}}
\renewenvironment{AC@deflist}[1]%
  {\ifAC@nolist%
     \else%
        \raggedright\begin{list}{\color{blue}$\heartsuit$}%
            {\settowidth{\labelwidth}{\hbox{#1}\hspace*{1em}}% change 2em to the desired value
            \setlength{\leftmargin}{\labelwidth}%
            \addtolength{\leftmargin}{\labelsep}%
            \renewcommand{\makelabel}{\uplabel}}%
  \fi}%
  {\ifAC@nolist%
     \else%
        \end{list}%
  \fi}%
\makeatother

However, the result is still not as desired. For some reason the alignement of abbreviation and the fullform is somehow messed up.

enter image description here

Your Answer

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

Browse other questions tagged or ask your own question.