1

When I compile the example below I got the error:

! undefined control sequence
<write> (indexentry :tkey (\glo@computer@index) : locref "{}{\gls@numberpage}"...

MWE

\documentclass[a4paper,12pt,dvipsnames]{report}
\usepackage[style=long,toc,xindy,acronym, sort=use]{glossaries}
\makeglossaries

\newglossaryentry{computer}{
    name=computer,
    description={is a programmable machine that receives input, stores and manipulates data, and provides output in a useful format}}
\begin{document}
 \glsaddall
 \printglossaries
\end{document}

If I add gls{computer} the example compile without error. How can I resolve this problem?

1

This works. You need to use the entries defined in the glossary. Otherwise there is no way to sort them!

\documentclass[a4paper,12pt]{report}
\usepackage[style=long,toc,acronym,xindy,sort=use]{glossaries}
\makeglossaries

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


\begin{document}

\noindent
\gls{computer}\\
\gls{comp}

\printglossaries
\end{document}

If you don't want to use \gls{} and use \glsaddall{} instead, remove sort=use from the package options.

  • But I don't want to use them that's why I used glsaddall – Hunsu Aug 18 '15 at 13:50
  • So remove sort=use and everything will work. – cacamailg Aug 18 '15 at 13:52
  • Please mention that in your answer, if no other answer that doesn't require removing sort=use is provided, I will accept yours. – Hunsu Aug 18 '15 at 13:58

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.