Skip to content

Glossaries Acronyms Notation

FilipeMar edited this page Dec 1, 2017 · 5 revisions

Glossaries

The LaTeX wikibook teaches how to build a list of terms in a document. Another explanation on the use of the glossaries package is here.

The glossaries package makes it easy to create lists of terms and deal with its format. Detailed information can be found in the glossaries documentation.

Acronyms

The acronyms are declared in the acronyms list.

Example:

You declare

\newacronym{hello}{hw}{hello world}

In the text, you use \gls{hello}.

You can also use the math environment. For instance, you can declare

\newacronym{cophp}{$COP_{HP}$}{Heat Pump Coefficient of Performance}

In the text, you use \gls{cophp}.

Notation

The notation is declared in the list of notation symbols.

The notation list allows 3 sections: latin letters, greek letters, subscripts, Rates, Ratios:

\newglossaryentry{latinletters}{name={Latin Letters},description={},sort=a} 
\newglossaryentry{greekletters}{name={Greek Letters},description={},sort=b} 
\newglossaryentry{subscripts}{name={Subscripts},description={},sort=c} 
\newglossaryentry{rates}{name={Rates},description={},sort=d} 
\newglossaryentry{ratios}{name={Ratios},description={},sort=e}

The section title is altered in the option name=title. New sections can be added according to the code line bellow, by attributing a new letter to sort, in this case it would be f.ex. sort=f:

\newglossaryentry{reftitle}{name={title},description={},sort=<section's refletter for ordering>}

The notation entries are declared as

\newglossaryentry{refname}{
sort=<section's refletter><ordering letter, ex: 1st letter of the word>, 
name={symbol or \ensuremath{symbol in the math environment}}, 
description={description}, 
parent=section's reftitle}

Example: You declare

\newglossaryentry{A}{sort=aA, 
name={\ensuremath{A}}, 
description={Cross-sectional area [\si{\meter\squared}]}, 
parent=latinletters}

In the text, you use \gls{A}.

Building glossaries

To correctly list the glossaries, the document must be compiled as follows. In the command line:

  1. pdflatex tese (note that using latex results in an error due to the use of pdf images)

  2. makeglossaries tese

  3. pdflatex tese (repeat as needed)

For large lists of acronyms or notation, with lots of entries in the text, this commands sequence can be repeated until you obtain the complete listing with the desired order.

Using makeindex to order the list:

  • Glossaries: makeindex -s tese.ist -t tese.glg -o tese.gls tese.glo
  • List of Acronyms: makeindex -s tese.ist -t tese.alg -o tese.acr tese.acn

Using xindy to order the list:

xindy  -L english -C utf8 -I xindy -M tese -t tese.glg
     -o tese.gls tese.glo
xindy  -L english -C utf8 -I xindy -M tese -t tese.alg
     -o tese.acr tese.acn
xindy  -L english -C utf8 -I xindy -M tese -t tese.nlg
     -o tese.not tese.ntn