0

Problem : Line 11 in MKDoc.tex undefined control sequence when I pdflatex it on TS. The idx and ind files has zero bytes when I ran Makeindex on TS button

In the main document MkDoc I have several errors

line 35  at  \gls{bdc} 
line 37  at  \gls{IEEE}
line 39 at    \Gls{latex}  
line 42 at   \printglossaries

I use a preamble for input to MkDoc.tex . The preamble file has use glossaries package.

How to fix this? I don't understand how this works. Here is my MWE. Real example.

\documentclass{article}
\usepackage [utf8] {inputenc}
%\usepackage{hyperref}
\usepackage{inputenc}
\usepackage{fontenc}
\usepackage{glossaries}
\include{Preamble_MK2}
% OPTION  2 must make glossaries before each new entry 
\makeglossaries
\begin{document}
\newglossaryentry{bdc}
{
name=bdc,description={Borneo Development Coporation}
}

\newglossaryentry{latex}
{
name=latex,description={Is a mark up language suitable for scientific documents}
}
\newglossaryentry{IEEE}
{
name=IEEE,description={Institute of Electrical Electronic Engineers }
}
\title{How to create a glossary of terms}
\makeindex              % in order to create the .idx file 
%\begin{document}
\make title
In Sarawak \gls{bdc} plays a key role in the  development\\
\gls{IEEE} plays the professional membership organisation for engineers 
The \Gls{latex} typesetting is suitable for documents that include \gls{maths}\\
\printglossaries
\end{document}
5
  • \make is not a command. I think you mean \maketitle but I don't know if that's just a typo in your example or a typo in your code.
    – cfr
    Nov 20, 2014 at 3:48
  • sorry its a typo. Should be \maketitle. TQ.
    – mark
    Nov 20, 2014 at 3:56
  • \makeindex must be before \begin{document}. There are not \newglossaryentry for "maths" word.
    – Fran
    Nov 20, 2014 at 4:15
  • I had corrected the \makeindex before \begin{document}
    – mark
    Nov 20, 2014 at 4:47
  • Also I noticed that the .log file does not have package: glossaries term. I wonder?
    – mark
    Nov 20, 2014 at 4:48

1 Answer 1

1

You have several problems in your MWE already exposed in the comments. Another is that there are a \include{Preamble_MK2} but not a file Preamble_MK2.tex in your question (and moreover, it must be \input, not \include).

Omitting the unrelated code (as it should be in a good MWE), this the minimal working example:

\documentclass{article}
\usepackage{glossaries}
\newglossaryentry{bdc}
{name=bdc,
description={Borneo Development Coporation}}
\newglossaryentry{latex}
{name=\LaTeX{},
description={Is a mark up language suitable for scientific documents}}
\newglossaryentry{IEEE}
{name=IEEE,description={Institute of Electrical Electronic Engineers}}
\newglossaryentry{maths}
{name=maths,description={A complex thing}}
\makeglossaries
\begin{document}

In Sarawak \gls{bdc} plays a key role in the  development. 

\gls{IEEE} plays the professional membership organisation for engineers. 

The \Gls{latex} typesetting is suitable for documents that include  \gls{maths}.

\printglossaries
\end{document}

MWE

Note that you must compile MkDoc.tex, then run makeglossaries MkDoc and then compile again one or two times. See Compile sequence: citing in the glossary. In more complex documents you must execute also another auxiliary tools as makeindex or bibtex. In this case just work with:

pdflatex MkDoc.tex 
makeglossaries MkDoc
pdflatex MkDoc.tex 

This can be make in the system prompt or may be configuring you LaTeX editor (sorry, I do not use TeXshop) or using arara. You have an example of use of arara in the question linked above.

8
  • Wow. Thanks a lot. Just to clarify, I need to use the term \input{Preamble_Mk2} ?
    – mark
    Nov 20, 2014 at 4:58
  • What essential commands do I put in my Preamble files for glossary to work ?
    – mark
    Nov 20, 2014 at 4:59
  • @mark Exactly, \include is mainly for chapters after the preamble. See When should I use \input vs. \include?.
    – Fran
    Nov 20, 2014 at 5:01
  • 1
    @mark,See the edited answer.
    – Fran
    Nov 20, 2014 at 5:22
  • 1
    @mark Some editors have a front-end for some of these commands, in other editors you can configure the compilation sequence. But anyway, you can always run pdflatex, makeglossaries, bibtex, etc. when you close your editor in the system prompt. Run also in the system command texdoc arara.
    – Fran
    Nov 20, 2014 at 5:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .