About 🛈
Shop 🛒Shop 🛒
LaTeX 🖹
Software 💾
Books 📚
Gallery 🖺
News 📢
Contact 📧
Blog 🖋

Gallery (glossaries): Symbols Glossary Sample

Image of symbols glossary sample
This example uses the "altlongragged4col" glossary style, which isn't available by default. You need to explicitly load it using the glossary-longragged package. I've decided to use the "symbols" glossary rather than the "main" one. There's no particular difference except that the title is automatically set to "Symbols" rather than "Glossary". The file extensions are different as well, but this isn't a problem as makeglossaries can find out the extensions from the .aux file. Since I'm not using the "main" glossary, I've prevented it from being created with the nomain package option. The symbols package option creates the "symbols" glossary. It also defines \printsymbols so instead of using
I could use

The comment lines below are arara directives. You can remove them if you don't use arara.

% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex






\forglsentries[symbols]{\thislabel}{\gls{\thislabel}. }

\forglsentries[symbols]{\thislabel}{\glssymbol{\thislabel}. }


This document loads the hyperref package, which creates hyperlinks from the entries in the document (referenced using commands like \gls) to their definition in the glossary. These hyperlinks are displayed in red text. I've used \forglsentries just to iterate over all the defined entries for this example. In practice, you would typically just use \gls{label}. For example:
Here is a reference to the term \gls{alpha}.
I can reference the symbol (rather than the term) using \glssymbol instead of \gls.
Here is a reference to the symbol \glssymbol{alpha}.

The entries have all been defined in the file example-glossaries-symbols.tex, which you should find installed in the same location as the glossaries package (or in a sub-directory called test-entries). The entry definitions look like this:

description={Quisque ullamcorper placerat ipsum.}}

description={Cras nibh.}}

description={Morbi vel justo vitae lacus tincidunt ultrices.}}

If you don't use arara, you need to run the following commands:

pdflatex symbols-glossary
makeglossaries symbols-glossary
pdflatex symbols-glossary
These commands can be run from a terminal or command prompt or you might be able to run them by clicking on a button in your text editor.

I've used the nopostdot option to remove the terminating full stop that is placed by default after the description. The entries all have a "1" after the description. This is the page number on which the entry was referenced. In this sample document all the entries were referenced on page 1.

Download: PDF, document source, sample glossary definitions.

© 2015 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs