Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
}

Thanks in advance for your help.

share|improve this question
    
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 at 4:41

1 Answer 1

Try the glossaries package. The documentation is very good. You will have it already but see glossaries for a description. This guide is aimed at beginners and the full user manual explains more advanced usage. As the beginners' guide explains, the command you use to specify the target word depends on how you want it to appear in your text.

share|improve this answer
    
I tried the above code. It did not work for me. No glossary page is created at the end of the document. Any further help? –  Masood Jan 10 '14 at 11:14
    
Did you run latex (or pdflatex or xelatex or lualatex) -> makeglossaries -> latex (or variant)? –  cfr Jan 10 '14 at 14:59
    
I only run XeLaTeX on TexShop (Version 2.47). I do not run it on terminal. Should I run it on terminal? –  Masood Jan 10 '14 at 15:44
    
No. Running it in TeXShop does the same thing. But did you run makeglossaries? –  cfr Jan 10 '14 at 15:55
    
No. In the list of options to set the type of LaTeX command (BibTex,MakeIndex,LaTeX,XeLaTeX,etc), I did not find a command for "MakeGlosseries". How can I run makeglossaries? –  Masood Jan 10 '14 at 16:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.