# Formatting for glossaries

I am new so please go easy :-).

I am using the \glossaries package to make my acronym page. I have defined only acronyms.

What I want is to make the description of the acronym in a separate column and left aligned.

The style=super option does this but it seems to shrink the column so it does not take up the pagewidth. Please see attached document.

The other problem is that it is being spread over two pages. i think the culprit is \baselineskip=22pt plus1pt. I was told this is to get the document double spaced, I am a novice to latex. Is there another option for this?

my MWE is below and the output attached. Thanks

documentclass[a4paper,12pt]{report}

\usepackage[nopostdot,  style=super, nonumberlist, toc]{glossaries}

\makeglossaries

\begin{document}
\baselineskip=22pt plus1pt

\printglossary[title={List of Abbreviations}]

\newpage

\gls{ngml}

\newacronym{ngml}{$\eta$g/mL}{nanogram per millilitre}

\end{document}


• Welcome to TeX.SX! The recommended method for double spacing is to use the setspace package. – Nicola Talbot Aug 20 '14 at 15:32

First, the spacing should be set using the setspace package rather than altering \baselineskip. You can then switch between double-spacing for the main part of the document and single-spacing for the list of acronyms using \doublespacing and \singlespacing. To illustrate this, the example below uses the lipsum package to provide some dummy text. Remember to remove the lipsum package and \lipsum command from any real document. The example also uses dummy acronyms that are provided by the glossaries package for testing purposes. These are contained in a file called example-glossaries-acronym.tex and are loaded using \loadglsentries. This just saves me typing a load of example acronyms. For your real document, either replace example-glossaries-acronym with the name of a file containing all your acronym definitions or remove the \loadglsentries line from the document and insert all your definitions in the document preamble.

\documentclass[a4paper,12pt]{report}

\usepackage{lipsum}% provides dummy text for testing

\usepackage[doublespacing]{setspace}
\usepackage[nopostdot,style=super,nonumberlist,toc]{glossaries}

\makeglossaries

% load some dummy acronyms for testing

\begin{document}
\tableofcontents

\singlespacing
\printglossary[title={List of Abbreviations}]
\doublespacing

\chapter{Sample Text}

\lipsum % dummy text - remove from real document

\end{document}


This produces (on pages 2 and 3):

There's a vertical gap between the letter groups. You can suppress this using the nogroupskip package option. The width of the second column is given by the length \glsdescwidth. You can change this (anywhere before \printglossary) using \setlength. For example:

\setlength{\glsdescwidth}{0.8\textwidth}


If you temporarily switch to the superborder style (instead of the super style) you'll see the available width of the second column. So replacing the line:

\usepackage[nopostdot,style=super,nonumberlist,toc]{glossaries}


with

\usepackage[nopostdot,nogroupskip,style=superborder,nonumberlist,toc]{glossaries}


produces:

Now you can adjust the value of \glsdescwidth until the column width is satisfactory, then just switch back to the super style.

Note: The dummy acronym file example-glossaries-acronym.tex was added to the glossaries package in v4.08. If you don't have the file installed, just add your own definitions.

• Thanks that works perfectly. I see you wrote the package? it is great and makes life easy! So cheers! I am not sure why the template I am working with suggested \baselineskip It is quite old. it made the chapter titles go a bit skewed but I just had to, as you suggested, \singlespacing' before and '\doublespacing' after.thanks again! – nzbone Aug 20 '14 at 22:29
• Just one more think Nicola, is there any way to make all the acronyms in bold, leave the descriptions as is, in one quick edit? Cheers – nzbone Aug 20 '14 at 22:35
• @nzbone If you just want the acronyms bold in the list of acronyms you can do \renewcommand{\glsnamefont}[1]{\textbf{#1}}. If you want to change the font for the acronyms displayed in the document, that can also be done. A lot of templates are very old and contain obsolete code. I suggest you look at l2tabu. I've also got an online tutorial for writing a thesis in LaTeX which may help. – Nicola Talbot Aug 21 '14 at 10:04
• Many thanks again @nicolatalbot. Just looked at l2tabu and I have a lot of ‘Deadly sins’ which I have now changed! – nzbone Aug 21 '14 at 13:41
• @efie Use a different style, such as super3col`. See the list of all predefined styles to find the best match for your requirements. – Nicola Talbot Jul 19 '18 at 11:01