Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

glossaries - vertical space

1,415 views
Skip to first unread message

Jens Burmeister

unread,
Jul 27, 2009, 2:47:51 AM7/27/09
to
Hi,
singlespace and doublespace from the setspace-package influences the output
of the glossaries package. but as you see at the example, the vertical
space - using singlespace - is quite large.

How can I reduce that space in a way, that it is same as in text, using the
setspace-commands?

Example:

\documentclass{scrreprt}
\usepackage{setspace} % Zeilenabst�nde setzen \singlespace \onehalfspace
\doublespace
\usepackage{glossaries} % Paket f�r listings
\newglossary[slg]{symbolslist}{syi}{syg}{Verwendete Formelzeichen}
\makeglossaries %Glossar-Befehle anschalten
\renewcommand*{\glsgroupskip}{} %no extra vertical space
\begin{document}
\newglossaryentry{symb:eta}{name={eta},description={gr.
Bst.},sort=eta,type=symbolslist}
\newglossaryentry{symb:theta}{name={theta},description={noch
einer},sort=theta,type=symbolslist}
\singlespace
\printglossary[type=symbolslist,style=listdotted]
\doublespace
\printglossary[type=symbolslist,style=listdotted]
\glsaddall
\end{document}


Nicola Talbot

unread,
Jul 27, 2009, 8:36:16 AM7/27/09
to
Jens Burmeister wrote:
> singlespace and doublespace from the setspace-package influences the output
> of the glossaries package. but as you see at the example, the vertical
> space - using singlespace - is quite large.

The listdotted style uses the description environment. You'll find the
same problem with the following:

\documentclass{scrreprt}

\usepackage{setspace}

\begin{document}
\singlespacing
\begin{description}
\item[] One
\item[] Two
\end{description}

\doublespacing
\begin{description}
\item[] One
\item[] Two
\end{description}
\end{document}

> How can I reduce that space in a way, that it is same as in text, using the
> setspace-commands?

You could try switching to single spacing just for the glossaries:

\renewcommand*{\glossarypreamble}{\singlespacing}

The alternative is to modify the description environment to use
different values of \itemsep or to use a glossary style that doesn't use
the description environment.

> Example:
>
> \documentclass{scrreprt}
> \usepackage{setspace} % Zeilenabst�nde setzen \singlespace \onehalfspace
> \doublespace

BTW I think it's \doublespacing for the declaration and doublespace for
the environment

Regards
Nicola Talbot
--
Home: http://theoval.cmp.uea.ac.uk/~nlct/
LaTeX Related Information: http://theoval.cmp.uea.ac.uk/~nlct/latex/
Creating a LaTeX Minimal Example:
http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/

Jens Burmeister

unread,
Jul 27, 2009, 9:39:23 AM7/27/09
to
> \renewcommand*{\glossarypreamble}{\singlespacing}
The problem is that the spaces are still to large there


That one works for desc-environments:
\begin{description}
\setlength\itemsep{0pt}\setlength\parskip{0pt}
\item[test] test
\item[test2] test2
\end{description}

Putting \setlength\itemsep{0pt}\setlength\parskip{0pt} into
glossarypreamble does _not_ work but that is exactly what I want.

The compact...-environments from the paralist-package have exactly the
spaces I want.

jens


Nicola Talbot

unread,
Jul 27, 2009, 11:26:30 AM7/27/09
to

Try defining your own glossary style that sets up the listing using the
required parameters. For example, the following creates a new glossary
style called 'mylistdotted' that's based on listdotted:

\newglossarystyle{mylistdotted}{%
\glossarystyle{listdotted}%
\renewenvironment{theglossary}{%
\begin{description}
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}{%
\end{description}}%
\renewcommand*{\glsgroupskip}{}%
}

(Remember to change \printglossary so that it uses this style).

Jens Burmeister

unread,
Jul 28, 2009, 3:17:21 AM7/28/09
to
Thank you for the idea, here's my solution with compactdesc:

\usepackage{paralist}
\newglossarystyle{mylistdotted}{\glossarystyle{listdotted}%
\renewenvironment{theglossary}{\begin{compactdesc}}{\end{compactdesc}}%
\renewcommand*{\glsgroupskip}{}}


0 new messages