I'm using the glossaries
package for producing of nomenclature/symbols/acronyms lists, but I don't know how to influence the vertical gap between the glossary title and the first glossary entry. Namely, a smaller gap is needed. I've found a dirty hack how to make it smaller using \begingroup
.. \endgroup
and \titlespacing*
, but is it possible to affect this gap with some glossaries-in-built means? Even when defining a new style, I don't know what property/command is responsible for this space.
\documentclass[11pt,onecolumn,twoside,draft,titlepage,fleqn,a4paper,openright]{book}
\usepackage{titlesec}
%-----------------------------------------------------------------------
\usepackage{longtable}
\usepackage{makeidx}
\usepackage[nonumberlist, acronym, toc, section, shortcuts, nopostdot, nogroupskip]{glossaries}
\renewcommand*{\arraystretch}{1.3} % sets the line indent in glossaries
\setlength{\glsdescwidth}{12.5cm}
\setlength\LTleft{0pt}
\newglossary[slg]{symbols}{syi}{syg}{Nomenclature}
\newglossary[ilg]{indices}{iyi}{iyg}{List of indices}
\makeglossaries
\newacronym{ECD}{ECD}{equivalent circuit diagram}
\newacronym{RES}{RES}{renewable energy source}
\newglossaryentry{Rx1}
{
name={\ensuremath{R_{x1}}},
description={Equivalent series resistance},
sort=Rx1, type=symbols
}
\newglossaryentry{ref}
{
name={*},
description={Indicates reference value},
sort=ref, type=indices
}
\begin{document}
\begingroup
\glsaddall
\titlespacing*{\section} {0pt}{0pt}{4pt} % dirty hack
\printglossary[type=\acronymtype, style=long, title=List of Abbreviations and Acronyms]
\vspace{40pt} % Another dirty hack
\printglossary[type=symbols, style=long, title=Nomenclature]
\vspace{40pt} % Another dirty hack
\printglossary[type=indices, style=long, title=List of indices]
\endgroup
\end{document}
Best Answer
The command responsible for that space is the sectioning command used at the start of the glossary (
\section*
in your example). This makes it consistent with the structure throughout the rest of the document. By way of illustration:This produces:
The gap between
\section*{Sample}
and thelongtable
is the same as the equivalent gap in the glossaries. If you really wanted to reduce this gap in the glossaries (although I don't recommend this) without changing the overall sectioning style you could redefine\glossarypreamble
to add some negative space, for example:Incorporating this into the above example:
This results in:
Here the gap for the glossaries is smaller but the gap for the sample section remains the same as before.