Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Example for a simple LaTeX glossary

Tags:

latex

glossary

I'm trying to include a simple glossary to my LaTeX document,

I already searched for something like that on google, but never got it running.

I would like to use glossary or glossaries.

  1. how to write it in the text?
  2. how to print it?
  3. what to execute on which position?
like image 889
Sven Klouem Avatar asked Mar 11 '10 16:03

Sven Klouem


People also ask

How do you make a glossary in LaTeX?

You can use this package using the command \usepackage{glossaries} in your document's preamble. Then, you can use the command \makeglossaries prior to adding the first glossary entry. Finally, you can start adding glossary entries using the command \newglossaryentry{YOUR GLOSSARY TERM}.

How do you write an overleaf glossary?

The command \makeglossaries must be written before the first glossary entry. Each glossary entry is created by the command \newglossaryentry which takes two parameters, then each entry can be referenced later in the document by the command \gls . See the subsection about terms for a more complete description.

How do you write abbreviations in LaTeX?

The acronym environment allows one to define all the acronyms needed by a document at a single place and is self-documenting, since a table of acronyms is automatically produced. Therefore, use the acronym environment and the \acro command instead of \acrodef if you want to have a list of acronyms .

Does a glossary include acronyms?

A glossary is an alphabetical list of words, phrases, and abbreviations with their definitions.


2 Answers

Well, there is a glossaries package on CTAN. Read the pdf documentation.

Check if you already have it in your installation, if not install it, and put \usepackage{glossaries} in the preamble of you document and it will be available to you.


It looks like you need \usepackage{glossaries} and \makeglossaries in the preamble, and some number of \newglossaryentry and \newacronym calls (it is not immediately clear to me if these only go in the premble or can go in the document text). Finally, you will need one or more \printglossary calls in the text. Use \gsl to connect glossary entries on the argument with the pages they occur on.

Processing the file will have to include a call to makeglossaries followed by at least one more invokation of latex.

In addition to the samples mentioned in the documentation there is a Stack Overflow question which includes a minimal file making use of glossaries. You may be particularly interested in the acronym glossary.

like image 182
dmckee --- ex-moderator kitten Avatar answered Oct 04 '22 23:10

dmckee --- ex-moderator kitten


There is a nice blog for beginners: LaTeX glossary and list of acronyms

Here is an example:

\documentclass{article}

% Load the package
\usepackage{glossaries}

% Generate the glossary
**\makeglossaries**

\begin{document}

%Term definitions
\newglossaryentry{utc}{name=UTC, description={Coordinated Universal Time}}
\newglossaryentry{adt}{name=ADT, description={Atlantic Daylight Time}}
\newglossaryentry{est}{name=EST, description={Eastern Standard Time}}

% Use the terms
\gls{utc} is 3 hours behind \gls{adt} and 10 hours ahead of \gls{est}.

%Print the glossary
\printglossaries

\end{document}
like image 44
SparkAndShine Avatar answered Oct 04 '22 22:10

SparkAndShine