[Tex/LaTex] Glossary does not work on different platforms


I am writing my master thesis. When I compile and run the Tex file on Ubuntu everything works fine. When I do it on OSX and Windows it return the error:

Package glossaries Error: Glossary entry `...' has not been defined.

for all the \gls{} entries inserted.

I do follow the procedure for makeindex from the console. (makeindex main_body.glo -s main_body.ist -t main_body.glg -o main_body.gls).

Any hints?
thank you in advance.

Minimal Working Example

% include settings
% include commands


    \part[Introduction, Motivation and Backdrop]{Introduction, Motivation and Backdrop}     

    \part[Handbook and its Application]{Handbook and its Application}

    \addcontentsline{toc}{chapter}{Glossary and Acronyms}




Best Answer

This has nothing to do with the platform. The difference is due to using different versions of the glossaries package. You are basically using an entry before it's been defined. Here's a MWE:






\newglossaryentry{sample}{name={sample},description={an example}}


The first time you compile this document, you get the error:

! Package glossaries Error: Glossary entry `sample' has not been defined.

With old (pre 3.08a) versions of glossaries, you will always get this error whenever you try to use an entry before it's been defined. With newer versions of glossaries, you'll get the error on the first LaTeX run, but not on subsequent runs (unless you delete the .glsdefs file). Therefore, I suspect that your Ubuntu platform has a fairly new version of glossaries, which is why it seems to work, whereas your other platform has an older pre-3.08a version, which is why it doesn't work.

The simplest, and recommended, solution is to define all your entries in the preamble.

Related Question