1

I am testing the use of a list of symbols using the \newglossaryentry using Texmaker (4.4.1). However, I am experiencing some problems.

Using the following example I create glossary entries:

\documentclass{article}

% Load the package
\usepackage{glossaries}

% Generate the glossary
\makeglossaries

\begin{document}

%Term definitions
\newglossaryentry{ta}{name=Test1, description={Test1}}
\newglossaryentry{tb}{name=Test2, description={Test2}}
\newglossaryentry{tc}{name=Test3, description={Test3}}

% Use the terms
\gls{ta} is three hours behind \gls{tb} and 10 hours ahead of \gls{tc}.

%Print the glossary
\printglossaries

\end{document}

If I initially generate the document using:

  1. pdflatex
  2. makeglossaries
  3. pdflatex

The glossary is printed just the way I have entered it. However, if I change a description and reprocess (pdflatex,makeglossaries and pdflatex) the document nothing changes:

\documentclass{article}

% Load the package
\usepackage{glossaries}

% Generate the glossary
\makeglossaries

\begin{document}

%Term definitions
\newglossaryentry{ta}{name=Test1, description={Test123}}
\newglossaryentry{tb}{name=Test2, description={Test2456}}
\newglossaryentry{tc}{name=Test3, description={Test3789}}

% Use the terms
\gls{ta} is three hours behind \gls{tb} and 10 hours ahead of \gls{tc} blblbl.

%Print the glossary
\printglossaries

\end{document}

If I remove the \glossaryentry and reference, process the file, add the entry and reference and process (pdflatex, makeglossaries and pdflatex) the file again the updated entry is displayed in the list?

Is it something I am doing wrong (probably)... Or is theres something else? Anyone who can help me out?

Thanks in advance!

6

By putting the \newglossaryentry before the \begin{document}, seems to solve the problem. Does this make sense?

\documentclass{article}

% Load the package
\usepackage{glossaries}

% Generate the glossary
\makeglossaries

%Term definitions
\newglossaryentry{ta}{name=Test1, description={Test123}}
\newglossaryentry{tb}{name=Test2, description={Test2456}}
\newglossaryentry{tc}{name=Test3, description={Test3789}}

\begin{document}

% Use the terms
\gls{ta} is three hours behind \gls{tb} and 10 hours ahead of \gls{tc} blblbl.

%Print the glossary
\printglossaries

\end{document}
  • Yes it makes sense -- the package manual recommends \newglossaryentry in the preamble ;-) – user31729 Sep 29 '15 at 11:50
  • Ok, thanks! I just started using Latex (one day) ans still have a lot to learn.... – JR_ Sep 29 '15 at 11:59
  • 2
    Why the downvote? This is the correct answer. The problem lies in the fact that definitions in the document environment are saved in a temporary file (.glsdefs) at the end of the document, which is then loaded at the start of the document in case \printglossaries is in the front matter. Modifications made to the definition aren't picked up until the temporary file is rewritten. – Nicola Talbot Dec 19 '15 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.