LaTeX forum ⇒ GeneralGlossaries package, two-column glossary Topic is solved

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

Glossaries package, two-column glossary

Postby Ailicec » Thu Apr 12, 2012 10:51 pm

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.
Reason: output text formatted

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
Stefan Kottwitz
Site Admin
Posts: 7803
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Fri Apr 13, 2012 9:31 am

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

  1. \glossarystyle{long}


Stefan
Site admin

Link:
BBcode:
HTML:
Hide post links
Show post links

Ailicec
Posts: 18
Joined: Wed Jan 18, 2012 12:16 pm

Postby Ailicec » Fri Apr 13, 2012 3:30 pm

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

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
nlct
Posts: 263
Joined: Thu Nov 06, 2008 11:15 am
Contact:

Postby nlct » Mon Apr 23, 2012 10:06 am

I have tried doing \printglossary{type=acronyms, long}

You need to use style=long rather than long

Try this
  1. \documentclass{article}
  2.  
  3. \usepackage[acronym]{glossaries}
  4.  
  5. \makeglossaries
  6.  
  7. \newglossaryentry{sample}{name={sample},
  8. description={a sample entry}}
  9.  
  10. \newacronym{aca}{aca}{a contrived acronym}
  11.  
  12. \begin{document}
  13. \printglossary
  14. \printglossary[type=acronym,style=long]
  15.  
  16. \section{Sample}
  17. A \gls{sample} entry and \gls{aca}.
  18.  
  19. \end{document}

Regards
Nicola Talbot

Link:
BBcode: Topic is solved[/url]" title="Click to select post's link in BBcode format" onclick="this.focus();this.select();" />
HTML: Topic is solved</a>" title="Click to select post's link in HTML format" onclick="this.focus();this.select();" />
Hide post links
Show post links

Ailicec
Posts: 18
Joined: Wed Jan 18, 2012 12:16 pm

Postby Ailicec » Mon Apr 23, 2012 10:30 am

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

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “General”

Who is online

Users browsing this forum: Google [Bot] and 8 guests