3

I use TeXnicCenter as an editor to run LaTeX files. But when using package \usepackage{glossaries}, it doesn't display glossary list as it is supposed.

This is my MWE:

\documentclass{article}

\usepackage{glossaries}
\newglossaryentry{foobar}{%
 name={Foobar},
 description={A strange animal, not to be confused with \gls{foo}}
 }

 \newglossaryentry{foo}{%
 name={Foo},
 description={A strange animal, not to be confused with \gls{foobar}}
 }

\makeglossaries
\begin{document}

\gls{foobar} is a strange animal

\gls{foo} is another strange animal
\printglossaries

\end{document}

As a precaution, I upload a screenshot of TeXnicCenter profiles in case if it asked

profile

1

If you want to use makeindex for generation of your glossary you should have a look to chapter 1.5.4 Using makeindex explicitly (Option 2) in the documentation of glossaries (texdoc glossaries in your console/terminal).

After the first compile run of your given file, let us name it mwe.tex you will find some new files in the directory mwe.tex is: mwe.ist, mwe.glo

Now you need to run makeindex as mentioned in the documentation with

makeindex -s〈style〉.ist -t〈base〉.glg -o〈base〉.gls〈base〉.glo

in your case that means you need command

makeindex -s mwe.ist -t mwe.glg -o mwe.gls mwe.glo

Now copy your standard profile LaTEX -> PDF to a new one, for example LaTeX glos->PDF. There you change the Command line arguments to pass to makeindex to

-s "%tm.ist" -t "%tm.glg" -o "%tm.gls" "%tm.glo"

Do not forget to click on "Ok" to change the new profile permanently.

profile

No compile again. You can see that makeindex had be run with the given parameters, because you got now two files mwe.gls and mwe.glg

Compile two times again to get all TOC etc. printed as you can see in the following image:

result

But please see that you have to change this profile for TeXnicCenter if there are major changings in using /building your glossaries, for example if you want to build two glossaries. I guess adding option automake is easier to handle ...

  • For multiple glossaries it's simpler to use makeglossaries (Perl) or makeglossaries-lite (Lua) which will pick up all the file extensions and indexing settings from the .aux file instead of calling makeindex directly. – Nicola Talbot Apr 6 at 9:11

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.