Reduce spacing after glossary title

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

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}
\glsfindwidesttoplevelname

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

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

• Can you explain why you think that \renewcommand{\glossarypreamble}{\vspace*{-\baselineskip}} is a bad way to reduce vertical space? – Hafid Boukhoulda Feb 23 '19 at 12:11
• Because the resulting spacing isn't exactly equal to the spacing of a regular section. – Tomáš Sláma Feb 23 '19 at 12:16

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}

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


• 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. – Tomáš Sláma Feb 23 '19 at 12:54
• @TomášSláma I don't know how you add spacing between acronyms. – egreg Feb 23 '19 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}}. – Tomáš Sláma Feb 23 '19 at 14:08

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}