[Tex/LaTex] Glossaries \glossarypostamble – set text single spaced

glossariesline-spacingsetspace

I use the package setspace to set my text single spaced. My list of tables, list of abbreviations and so on I set with the command \onehalfspacing.

Furthermore I need an annotation in all lists. This annotation should be set single spaced too. It works fine for all my lists. But not for the lists of the package glossaries.

I defined the following:

\renewcommand{\glossarypostamble}{\protect\singlespacing\par\vspace{5ex}\noindent\textbf{Anmerkung:} 
Alle im Text verwendeten Abkürzungen sind im Abkürzungsverzeichnis aufgeführt. Bei der ersten Verwendung wurden 
diese ausgeschrieben und danach die Erklärung in Klammern angefügt. Bei einer erneuten Verwendung des Begriffs 
wurde nur die Abkürzung benutzt. Geläufige Abkürzungen und Firmennamen sind nicht aufgeführt.}

Do you have any idea?

PS: To set all my lists single spaced I defined this:

\AfterTOCHead{\singlespacing}

\renewcommand*{\glossarypreamble}{\singlespacing}

\makeatletter
\preto\blx@env@bibliography{\singlespacing}
\makeatother

Best Answer

If I understand you right (I've also read this thread on www.mrunix.de) you want your document to be typeset with \onehalfspacing with the exception of some lists, the glossary and the bibliography which should each be typeset with \singlespacing.

To achieve this you have to keep the following in mind: The setspace package provides commands \singlespacing, \onehalfspacing and \doublespacing as well as environments singlespace, onehalfspace and doublespace. The former are used in the preamble to set up the overall spacing whereas the latter are used within the document to change the spacing locally. Hence, the structure of your input file should be as follows:

\documentclass{article}

\usepackage{setspace}

\onehalfspacing

....

\begin{document}

...

\begin{singlespace}
  \printglossary
\end{singlespace}

...

\end{document}