1

I would like to reduce the spacing after the Acronyms title to match spacing of a regular section, but don't know how.

enter image description here

I tried to reduce it manually using \renewcommand{\glossarypreamble}{\vspace*{-\baselineskip}}, which works, but is a really bad way of doing it.

MWE:

\documentclass[a4paper, 12pt]{article}

\usepackage[acronym]{glossaries}

\setglossarystyle{alttree}

\makeglossaries
\newacronym{frc}{FRC}{First Robotics Competition}
\newacronym{ftc}{FTC}{First Technical Challenge}
\newacronym{fll}{FLL}{First Lego League}
\glsaddall
\glsfindwidesttoplevelname

\begin{document}
  \section{Sample Text}
  \gls{frc}, \gls{ftc}, \gls{fll}

  \printglossary[type=\acronymtype]
\end{document}
2
  • Can you explain why you think that \renewcommand{\glossarypreamble}{\vspace*{-\baselineskip}} is a bad way to reduce vertical space? Commented Feb 23, 2019 at 12:11
  • Because the resulting spacing isn't exactly equal to the spacing of a regular section. Commented Feb 23, 2019 at 12:16

2 Answers 2

1

For some reason, glossaries does \mbox{}\par at the start of a glossary, so adding an empty line.

\documentclass[a4paper, 12pt]{article}

\usepackage[acronym]{glossaries}

\setglossarystyle{alttree}
\setglossarypreamble[acronym]{\vspace*{-\baselineskip}}

\makeglossaries

\newacronym{frc}{FRC}{First Robotics Competition}
\newacronym{ftc}{FTC}{First Technical Challenge}
\newacronym{fll}{FLL}{First Lego League}

\glsaddall
\glsfindwidesttoplevelname

\begin{document}

\section{Sample Text}

\gls{frc}, \gls{ftc}, \gls{fll}

\printglossary[type=\acronymtype]

\section*{Acronyms}

\textbf{FLL} First Lego League. 1

\end{document}

enter image description here

3
  • This does fix the MWE, but it seems that when you add spacing between each of the acronyms, it is also added to the top and that's why it isn't working in my full document. Commented Feb 23, 2019 at 12:54
  • @TomášSláma I don't know how you add spacing between acronyms.
    – egreg
    Commented Feb 23, 2019 at 13:51
  • The spacing was likely due to me changing parskip length. I managed to fix the issue by doing \renewcommand{\glossarypreamble}{\vspace*{-\baselineskip}\vspace*{-\parskip}}. Commented Feb 23, 2019 at 14:08
0

The additional space is caused by \setglossarystyle{alttree}. Use \setglossarystyle{tree}.

\documentclass[a4paper, 12pt]{article}

\usepackage[acronym]{glossaries}

\setglossarystyle{tree}

\makeglossaries
\newacronym{frc}{FRC}{First Robotics Competition}
\newacronym{ftc}{FTC}{First Technical Challenge}
\newacronym{fll}{FLL}{First Lego League}
\glsaddall
\glsfindwidesttoplevelname

\begin{document}
  \section{Sample Text}
  \gls{frc}, \gls{ftc}, \gls{fll}

  \printglossary[type=\acronymtype]
\end{document}

enter image description here

2
  • Using the tree glossary style would make the long acronym names misaligned, which is something I don't want. Commented Feb 23, 2019 at 12:59
  • @TomášSláma I see! Commented Feb 23, 2019 at 13:14

You must log in to answer this question.

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