3

I am using the acro package to define and reference acronyms in a document. This has been working fine and the list prints. However, everything in the list is double spaced and I would like to have acronyms with very long long-names be only single spaced. A sample of code I am working with is

\documentclass[12pt]{report}
\usepackage[letterpaper,verbose,tmargin=1.25in,bmargin=1.25in,lmargin=1.4in,rmargin=1.15in]{geometry}
\usepackage{setspace}

\usepackage{titlesec}
\titlespacing{\chapter}{0pt}{-18pt}{\baselineskip}
\titleformat{\chapter}{\centering\normalsize}{\thechapter.}{1em}{}

\usepackage{acro}
\acsetup{list-style=tabular, only-used=false, sort=false}
\DeclareInstance{acro-title}{empty}{sectioning}{name-format =}

\DeclareAcronym{VLA}{
    short = VLA,
    long  = This acronym is so long that the long from requires two lines to display it
}

\DeclareAcronym{EVIL}{
    short = EVIL,
    long  = Every Villain is Lemons
}

\begin{document}
\doublespacing

\chapter*{NOMENCLATURE}

\pagestyle{plain}
\printacronyms[heading = empty]

\pagebreak{}

\end{document}

And the output looks like this

Acronym that requires two lines

I would like the VLA acronym to be single spaced, but have double spacing between the VLA and EVIL acronyms.

Best!

  • 1
    Welcome to TeX.SX!! Please give a full minimal working example. Currently we have to guess what packages etc you are using and this makes it really hard to help you. A MWE should start with a \documentclass command, have a minimal preamble and then \begin{document}...\end{document}. The code should compile and be as small as possible to demonstrate your problem. Cutting your code down to a MWE may well reveal what your problem actually is. In any case, it is really difficult to help you without more information. – Andrew Nov 3 '16 at 23:08
2

Adding

\DeclareAcroListStyle{tabular}{table}{
  table = tabular ,
  before = \singlespacing\renewcommand\arraystretch{1.655}
}

to your MWE gives

enter image description here

\singlespacing also adds an additional vertical skip of \baselineskip which you might want to remove:

\DeclareAcroListStyle{tabular}{table}{
  table = tabular ,
  before = \singlespacing\vspace*{-\baselineskip}\renewcommand\arraystretch{1.655}
}

1.655 is the stretch value setspace uses for double spacing when the font size is 12pt.

  • This works perfectly. Thank you so much. The only question I have is how did you decide that 1.655 was the 'correct' value of the array stretch? – kwodzicki Nov 4 '16 at 11:58
  • I looked it up in setspace.sty. It's what the package uses for double spacing for 12pt. – clemens Nov 4 '16 at 12:40
0

One crude solution is to remove the \doublespacing command and add a \newline to every long definition as follows:

\documentclass[12pt]{report}
  \usepackage[letterpaper,verbose,tmargin=1.25in,bmargin=1.25in,lmargin=1.4in,rmargin=1.15in]{geometry}
\usepackage{setspace}

\usepackage{titlesec}
\titlespacing{\chapter}{0pt}{-18pt}{\baselineskip}
\titleformat{\chapter}{\centering\normalsize}{\thechapter.}{1em}{}

\usepackage{acro}
\acsetup{list-style=tabular, only-used=false, sort=false}
\DeclareInstance{acro-title}{empty}{sectioning}{name-format =}

\DeclareAcronym{VLA}{
    short = VLA,
    long  = This acronym is so long that the long from requires two lines to display it\newline
}

\DeclareAcronym{EVIL}{
    short = EVIL,
    long  = Every Villain is Lemons\newline
}


\begin{document}

\chapter*{NOMENCLATURE}

\pagestyle{plain}

\printacronyms[heading = empty]

\pagebreak{}

\end{document}

Output:

enter image description here

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.