[Tex/LaTex] Glossary entry not updated

glossaries

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!

Best Answer

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}
Related Question