[Tex/LaTex] \printglossaries is not generating anything for me

glossariesmiktex

I'm using the glossaries package with MikTeX 2.9 (using TeXnicCenter as my editor) and my document is setup as follows:

\documentclass[ebook,11pt,openany]{memoir}
\usepackage{color}
\usepackage{graphicx} 
\usepackage[toc]{glossaries}
\usepackage{float}
\usepackage[scaled]{berasans}
\usepackage[T1]{fontenc}
\usepackage{type1cm}
\usepackage{eso-pic}
\usepackage{mystyle}

\author{...} 
\title{...}

\makeatletter
  \AddToShipoutPicture{
    \setlength{\@tempdimb}{.5\paperwidth}
    \setlength{\@tempdimc}{.5\paperheight}
    \setlength{\unitlength}{1pt}
    \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){
      \makebox(0,0){\rotatebox{55}{\textcolor[gray]{0.85}
        {\fontsize{5cm}{5cm}\selectfont{DRAFT}}}}
    }
  }
\makeatother

\setcounter{tocdepth}{2}
\makeglossaries
\include{glossary}

\begin{document}
\maketitle

\frontmatter
\include{dedication}
\tableofcontents

\mainmatter
\include{introduction}
\include{chaptr1}
...
\backmatter 
\printglossaries

\end{document}

Unfortunately, when I generate my document my PDF doesn't contain a glossary at all. Here's a quick snippet from my glossary file:

\newglossaryentry{entry}
{
  name={entry},
  description={my entry description.}
}

I'm also referencing the glossary entry from my chaptr1.tex file, which is included above, using the \gls{entry} command. I'm not seeing any errors in my build output, so I'm not sure what's going on. Any help would be appreciated.

Best Answer

Section 6 Displaying the Glossary or List of Acronyms (p 6) of the glossaries documentation mentions the procedure to obtain a glossary. More specifically, you require a four-step compilation:

  1. pdflatex file
  2. makeglossaries file
  3. pdflatex file
  4. pdflatex file

The fourth step may not be required, depending on the size of the glossaries and your document structure.

It is possible to perform the above steps from within TeXnicCenter by adding your own output profile (similar to the existing LaTeX => PDF profile, say). For example, you can include steps 2-4 as part of a batch (.bat) file and then execute the batch file with file parameters as part of the "Postprocessor" sequence.

Another possible issue that is not limited to glossaries but perhaps valid for all (La)TeX usages: Avoid spaces in filenames. This is reported frequently to be the cause for functions refusing to operate properly, when an external program must be called.