# problem to automatically generate a glossary by XeLaTeX

I want to generate a glossary at the end of a document automatically, but the following code did not work. In fact no glossary was created. I am using XeLaTeX to compile a tex file in Mac TexLive environment.

Here is the code:

\documentclass[oneside, a4paper,12pt]{book}

\usepackage[xindy]{glossaries}
\makeglossaries

\begin{document}
\include{glossary}

He has a \gls{computer}.

\appendix
\bibliographystyle{plainnat}
\bibliography{bibtex}
\printglossaries
\end{document}


The glossary.tex file contains:

\newglossaryentry{computer}
{
name=computer,
description={is a programmable machine that receives input, and provides output in a useful format}
}


-
have you tried using input instead of include? These are two diffrent ways of embedding a file as far as I know. Also you need to run \makeglossaries after you created the glossaryentries, thus the glossary.tex – Jonas Dralle Jun 12 '15 at 4:41