[Tex/LaTex] List of Acronyms is not displayed

acronymsglossaries

\documentclass{report}
\usepackage[acronym]{glossaries}
\makeglossary
\newacronym{svm}{SVM}{Support Vector Machine}
\newacronym{wasn}{WASN}{Wireless Sensor Networks}
\begin{document}
\printglossaries
\newpage
using \gls{svm} blah blah \gls{wasn}blah blah.....\gls{svm}
\end{document}

I am testing with above MWE. The acronyms are correctly displayed in the document body when compiled, but nothing gets printed where I need the List of Acronyms.
I am using TexMakerX as my IDE on Windows 7.

Once I compile the above code a .glo file is created but it is empty. I think this is the problem but I don't know why it is happening.

Best Answer

Creating a list of acronyms (or glossary) is a three stage process (at least):

  1. Typeset the document using LaTeX (or PDFLaTeX or XeLaTeX or LuaLaTeX, as appropriate)
  2. Run the makeglossaries Perl script or the makeglossaries-lite Lua script.
  3. Typeset the document again.

(You may need to repeat step 3.) Every time you modify the document in a way that alters the list (for example, adding or deleting instances of \gls, or removing or inserting text that results in a change in the associated page numbers) then you need to repeat all three steps in order to update the list.

The command \makeglossaries in your document creates some glossary-related files (.glo or .acn) and each time you use commands like \gls an entry is added to the relevant file when the document is typeset (in step 1).

In step 2 a special indexing application is run that reads in those glossary-related files and writes another file (.gls or .acr) with the LaTeX code required to typeset the glossary or list of acronyms. This file is then input in your document in step 3.

Step 2 causes the most confusion as it requires running a command line script. However, most front-ends have a button or menu item you can click that will run the script for you. Most front-ends need to be configured to run makeglossaries or makeglossaries-lite. The following TeX.SE answers provide instructions for integrating makeglossaries on various front-ends.

For WinEdt, have a look at the comp.text.tex thread Executing Glossaries' makeindex from a WinEdt macro.

For other front-ends, see Incorporating makeglossaries or makeglossaries-lite or bib2gls into the document build.

In each of the above cases, you need to have Perl installed if you use makeglossaries (but not makeglossaries-lite) or if you want to use xindy instead of the default makeindex.

Since makeglossaries-lite is a Lua script, you should already have a Lua interpreter if you have a modern TeX distribution with LuaTeX. If you want to use makeglossaries-lite instead, you should just be able to replace all references to makeglossaries with makeglossaries-lite, although it has fewer options and doesn't provide diagnostic tools, so it's not as useful if things go wrong. (Note that makeglossaries-lite was added to glossaries version 4.16, so it won't be available for older versions.)

Another possibility if you are having difficulty with step 2 is to add the package option automake to glossaries:

\usepackage[automake]{glossaries}

(Introduced in glossaries version 4.08.) This will try to get TeX to run the external applications (step 3 is still required) but this won't work if the shell escape is disabled. This option also won't work with xindy in the restricted mode, since xindy isn't on the list of trusted applications.¹ With both xindy and automake, you would need the less secure unrestricted mode, which I don't recommend for security reasons.

Alternatively, there's a GUI approach that uses Java rather than Perl. See also What can interfere with glossaries to prevent printing?


¹This is the case with TeX Live. I don't know about MiKTeX.

Related Question