GeneralGlossaries package, two-column glossary

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Ailicec
Posts: 18
Joined: Wed Jan 18, 2012 12:16 pm

Glossaries package, two-column glossary

Post by Ailicec »

I am using the Glossaries package for generating an acronyms list. It is working well, but I would like to format the output. At the moment I have the acronym written, a space and the 'definition' next to it. However I would like to have all the 'definitions' to be all under each other rather than separated by just a space to the acronym.

i.e. rather than having
UFO Unidentified flying object
AFAIK As far as I know
I would like
UFO    Unidentified flying object
AFAIK  As far as I know
Does anyone know how to do this?

Thank you
Last edited by Stefan Kottwitz on Fri Apr 13, 2012 2:10 pm, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Glossaries package, two-column glossary

Post by Stefan Kottwitz »

Hi,

you could use a two-column glossary style, such as one of the available longtable styles. See Glossary styles in the manual.

A style can by choosen by an optional argument to \printglossary or by \glossarystyle, such as

Code: Select all

\glossarystyle{long}
Stefan
LaTeX.org admin
Ailicec
Posts: 18
Joined: Wed Jan 18, 2012 12:16 pm

Re: Glossaries package, two-column glossary

Post by Ailicec »

Thank you for this. Now I have a separate problem. I have a list of definitions and a list of acronyms. I want to have the list of definitions to remain as is, but the list of acronyms to use the \glossarystyle{long} version.

Is it possible to achieve this?

I have tried doing \printglossary{type=acronyms, long} as is suggested for numbered lists [http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/glossariesfaq.html#numberedmix]


This is what I have:


\usepackage[toc,nonumberlist]{glossaries}
\renewcommand{\glossaryname}{List of Definitions}
\newglossary[alg]{acronym}{acr}{acn}{\acronymname}
\renewcommand{\acronymname}{List of Symbols and Abbreviations}
\makeglossaries

Then:

\input{acronymsanddefinitions.tex}
\printglossaries
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Glossaries package, two-column glossary

Post by nlct »

I have tried doing \printglossary{type=acronyms, long}
You need to use style=long rather than long

Try this

Code: Select all

\documentclass{article}

\usepackage[acronym]{glossaries} 

\makeglossaries

\newglossaryentry{sample}{name={sample},
description={a sample entry}}

\newacronym{aca}{aca}{a contrived acronym}

\begin{document}
\printglossary
\printglossary[type=acronym,style=long]

\section{Sample}
A \gls{sample} entry and \gls{aca}.

\end{document}
Regards
Nicola Talbot
Ailicec
Posts: 18
Joined: Wed Jan 18, 2012 12:16 pm

Re: Glossaries package, two-column glossary

Post by Ailicec »

Thank you

That is perfect. I have now managed to get it exactly how I wanted it to be shown, as it was the missing link.

Thanks again
Post Reply