1

I am trying to figure out how to use IEEEtran with glossaries without running into errors during the compilation with (pdf)latex.

Here is my MWE:

% arara: pdflatex: {synctex: yes}
% arara: makeglossaries
% arara: pdflatex: {synctex: yes}
% arara: pdflatex: {synctex: yes}

% \documentclass{article}
\documentclass{IEEEtran}

\usepackage{glossaries}

\makeglossaries

\newglossaryentry{elite}{name={elite},description={This is an elite glossary}}
\newglossaryentry{master}{name={master},description={This is a master glossary}}

\begin{document}

Test of first glossary entry: \gls{elite}
Test of second glossary entry: \gls{master}

\printglossaries

\end{document}

The code above runs just fine when using article as the document class or when using only one entry, which leads me to believe that this error has to do with IEEEtran.

Below is the error I get from (pdf)latex:

(./doc.gls
! Undefined control sequence.
\glsgroupskip ...glsnogroupskip \else \indexspace
                                                 \fi
1.5 ...r[]{page}\glsnumberformat{1}}}\glsgroupskip

Everything works in both my original file and the MWE when I exclude the \printglossaries.

Any help very much appreciated!

2

As the error message says, the IEEEtran class doesn't provide a definition for \indexspace so you need to provide it, using, for example, the definition used by article.cls:

\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}

A complete example:

% arara: pdflatex: {synctex: yes}
% arara: makeglossaries
% arara: pdflatex: {synctex: yes}
% arara: pdflatex: {synctex: yes}

%\documentclass{article}
\documentclass{IEEEtran}
\usepackage{glossaries}

\makeatletter
\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
\makeatother

\makeglossaries

\newglossaryentry{elite}{name={elite},description={This is an elite glossary}}
\newglossaryentry{master}{name={master},description={This is a master glossary}}

\begin{document}

Test of first glossary entry: \gls{elite}
Test of second glossary entry: \gls{master}

\printglossaries

\end{document}

The output:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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