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}
cfr
  • 198,882
mark
  • 431

1 Answers1

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.

Fran
  • 80,769