# Glossaries: error when compiling

I have a problem with Latex [pdfTeX, Version 3.14159265-2.6-1.40.17 (MiKTeX 2.9 64-bit)] and specially with glossaries. I've have tried to write a glossary, a list of acronyms and a list of symbols (referring, fot this latter, to this link: glossaries: How to customize list of symbols with additional column for units? ) and everything seems to go right but I have the following error:

Undefined control sequence. \glsXpageXglsnumberformat{}{1}}}


I have tried to simplify my code based on the Miede's ClassicThesis. Hope is enough or not too much: I can't say what is helpful for you and I apologize for that, I'm a new user of Latex and this site.

Thesis2.tex:

% A Classic Thesis Style
\RequirePackage{fix-cm}
\documentclass[ twoside]{scrreprt} % Classe: Report

\input{Thesis-config2}

\begin{document}

%\dominitoc
\frenchspacing
\raggedbottom
\selectlanguage{English} % american ngerman
%\renewcommand*{\bibname}{new name}
%\setbibpreamble{}
\pagenumbering{roman}
\pagestyle{plain}

\cleardoublepage\include{FrontBackmatter/Contents2}

\cleardoublepage\pagenumbering{arabic}
\setcounter{page}{1}

The \gls{latex} typesetting markup ...  other glossary \gls{other}

Given a set of numbers, there are elementary methods to compute
its \acrlong{gcd}, which is abbreviated \acrshort{gcd}. This
process is similar to that used for the \acrfull{gcd} \\

This is height \gls{height} and this velocity \gls{velocity}
\end{document}


Thesis-config2.txt

\PassOptionsToPackage{parts,%drafting,%
subfig,eulerchapternumbers,beramono,eulermath,pdfspacing}
{classicthesis}
\usepackage{classicthesis}

\usepackage[utf8]{inputenc}  % Encoding inputs
\usepackage[italian,english]{babel} % Select language (last most used)
\usepackage[T1]{fontenc} % T2A for cyrillics

\newcounter{dummy} % necessary for correct hyperlinks (to index, bib, etc.)

\usepackage{siunitx} % International system units

% 4. Setup floats: tables, (sub)figures, and captions

\usepackage{tabularx} % better tables
\setlength{\extrarowheight}{3pt} % increase table row height
\newcommand{\myfloatalign}{\centering} % to be used with each float for alignment

\usepackage{caption} % Ita: didascalie
\captionsetup{font=small} % format=hang,
\usepackage{subfig}

% 6. PDFLaTeX, hyperreferences and citation backreferences

% Using PDFLaTeX

\PassOptionsToPackage{pdftex,hyperfootnotes=false,pdfpagelabels}{hyperref}
\pdfcompresslevel=9
\PassOptionsToPackage{pdftex}{graphicx}
\usepackage{graphicx}

% Glossary, list of symbols and nomenclature

\usepackage[nonumberlist,nopostdot,acronym,xindy]{glossaries}
\setlength{\glsdescwidth}{15cm}
\newglossary[slg]{symbolslist}{syi}{syg}{List of Symbols} % create add. symbolslist

\makeglossaries
\input{glossary-defs}

\newglossarystyle{symbunitlong}{%
\setglossarystyle{long3col}% base this style on the list style
\renewenvironment{theglossary}{% Change the table type --> 3 columns
\begin{longtable}{lp{0.6\glsdescwidth}>{\centering\arraybackslash}p{2cm}}}%
{\end{longtable}}%
%
\bfseries Sign & \bfseries Description & \bfseries Unit \\
\hline
\renewcommand*{\glossentry}[2]{%  Change the displayed items
\glstarget{##1}{\glossentryname{##1}} %
& \glossentrydesc{##1}% Description
& \glsunit{##1}  \tabularnewline
}
}


Contents2.tex

% Table of Contents
%*******************************************************
\refstepcounter{dummy} % to refere to a chapter not numbered
\setcounter{tocdepth}{2} % <-- 2 includes up to subsections in the ToC
\setcounter{secnumdepth}{3} % <-- 3 numbers up to subsubsections
\manualmark
\markboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}
\automark[section]{chapter}
\renewcommand{\chaptermark}[1]{\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\enspace \spacedlowsmallcaps{#1}}}

\cleardoublepage

% List of Figures
\phantomsection
\refstepcounter{dummy}
% \pdfbookmark[1]{\listfigurename}{lof}
\listoffigures

%\cleardoublepage
%*******************************************************
% List of Tables
\phantomsection
\refstepcounter{dummy}
%   \pdfbookmark[1]{\listtablename}{lot}
\listoftables

%\cleardoublepage

%*******************************************************
% List of Listings
\phantomsection
\refstepcounter{dummy}
%\pdfbookmark[1]{\lstlistlistingname}{lol}
\lstlistoflistings

%\cleardoublepage

%*******************************************************
% Acronyms
\phantomsection
\refstepcounter{dummy}
%   \pdfbookmark[0]{Acronyms}{acronyms}
%   \markboth{\spacedlowsmallcaps{Acronyms}}{\spacedlowsmallcaps{Acronyms}}

\printglossary[type=\acronymtype,style=long]  % list of acronyms
%\cleardoublepage

%*******************************************************
% List of symbols
\phantomsection
\refstepcounter{dummy}
\printglossary[type=symbolslist,style=symbunitlong]   % list of symbols
%\cleardoublepage

%*******************************************************
% Glossary

\phantomsection
\refstepcounter{dummy}
%   \pdfbookmark[0]{Glossary}{glossary}
\markboth{\spacedlowsmallcaps{Glossary}}{\spacedlowsmallcaps{Glossary}}
\printglossary[type=main]      % main glossary
%   \cleardoublepage


glossary-defs.tex

\newacronym{gcd}{GCD}{Greatest Common Divisor}

\newglossaryentry{latex}
{
name=latex,
description={Is a mark up language specially suited
for scientific document}
}

\newglossaryentry{other}
{
name=other,
description={example of description }
}

\newglossaryentry{height}{name=\ensuremath{h},
description={Height of tower},
unit={\si{m}},
type=symbolslist}

\newglossaryentry{velocity}{name=\ensuremath{V},
description={Velocity},
unit={\si{m/s}},
type=symbolslist}


So my questions are:

1. What is that error? Why the PDF seems to be right despite the error?
2. Why the glossary names are displayed in that way? (ex. lo@latex@name)

MWE:

\documentclass[twoside]{scrreprt}

\usepackage{classicthesis}

\usepackage{hyperref}

\usepackage[nonumberlist,nopostdot,xindy]{glossaries}

\makeglossaries

\newglossaryentry{latex}
{
name=latex,
description={Is a mark up language specially suited
for scientific document}
}

\newglossaryentry{other}
{
name=other,
description={example of description }
}

\begin{document}

\printglossary

The \gls{latex} typesetting markup ...  other glossary \gls{other}

\end{document}

• I've taken the liberty of adding a trimmed down MWE, which reproduces the problem. (Different error message but same problem.) If you comment out classicthesis, the error goes away, so I'm guessing the conflict lies there. Oct 11, 2016 at 10:26
• Hi Nicola! Yes, I see that the source of the problem can be the ClassicThesis style. Isn't there a way to solve the problem? Should I use another package insted of Miede's style? Oct 11, 2016 at 10:42

tldr: Most (but not all) of the list styles are incompatible with classicthesis, so the style needs to be switched.

The problem is caused by the way \item is redefined with classicthesis. The following is a trimmed down MWE:

\documentclass[twoside]{scrreprt}

\usepackage{classicthesis}

\usepackage[nonumberlist,nopostdot,xindy]{glossaries}

\makeglossaries

\newglossaryentry{latex}
{
name=latex,
description={Is a mark up language specially suited
for scientific document}
}

\begin{document}

\begin{description}
\item[\glossentryname {latex}] sample
\end{description}

\end{document}


With classicthesis, this produces the error:

! Undefined control sequence.
<argument> \letcs {\glo@name
}{glo@\glsdetoklabel{latex}@name}\expandafter ...
l.23 \item[\glossentryname {latex}]
sample


Without classicthesis, there's no error. It seems that classicthesis tries to expand the label's argument. Protecting the fragile command fixes the problem:

\documentclass[twoside]{scrreprt}

\usepackage{classicthesis}

\usepackage[nonumberlist,nopostdot,xindy]{glossaries}

\makeglossaries

\newglossaryentry{latex}
{
name=latex,
description={Is a mark up language specially suited
for scientific document}
}

\begin{document}

\begin{description}
\item[\protect\glossentryname {latex}] sample
\end{description}

\end{document}


Since the \item is embedded within the glossary style, the simplest method is to use a different style. For example:

\printglossary[style=index]


The alternative is to define a style that protects all the commands within the optional argument of \item. For example:

\documentclass[twoside]{scrreprt}

\usepackage{classicthesis}

\usepackage[nonumberlist,nopostdot,xindy]{glossaries}

\makeglossaries

\newglossaryentry{latex}
{
name=latex,
description={Is a mark up language specially suited
for scientific document}
}

\newglossarystyle{plist}
{%
\setglossarystyle{list}%
\renewcommand*{\glossentry}[2]{%
\item[\protect\glsentryitem{##1}%
\protect\glstarget{##1}{\protect\glossentryname {##1}}]
\glossentrydesc{##1}\glspostdescription \space ##2%
}%
}

\begin{document}

\printglossary[style=plist]

\gls{latex}

\end{document}


I don't really recommend this method as you're unlikely to want to gather \glsentrytarget and \glsentryitem in a command for later use, as they are specific to the glossary. (\glsentrytarget provides the hypertarget, which must be unique and \glsentryitem is dependent on a counter that is reset and incremented in the glossary.)

In answer to your second question \glo@latex@name is the internal command used to store the value of the name key for the entry with the label latex. You shouldn't ever need to use this explicitly. (This value can simply be obtained using \glsentryname{latex}.)

Edit: As from v4.26, glossaries now checks if classicthesis has been loaded. If it has, the default style is switched from list to index, which is the closest matching style.

Note that the nolist option mentioned in the other answer simply prevents the automatic loading of glossary-list.sty. It doesn't automatically switch the style. For example, with pre glossaries v4.26:

\documentclass[twoside]{scrreprt}

\usepackage{classicthesis}
\usepackage[nolist]{glossaries}

\makeglossaries

\newglossaryentry{latex}
{
name=latex,
description={Is a mark up language specially suited
for scientific document}
}

\begin{document}

\printglossary

\gls{latex}

\end{document}


The error switches to:

! Package glossaries Error: Glossary style list' undefined.


There is actually a style in glossary-list.sty that works with classicthesis and that's the listdotted style, which becomes unavailable with nolist. The key point is to select a style that's compatible with classicthesis.

In the case, such as with classicthesis, where you are unable to use the list style, the index style is the closest match. Note that the tabular-like styles, such as long, don't allow page breaks within the description, so index works better for long descriptions. However, an adjustment is required for multi-paragraph descriptions.

For comparison, here's an example of the list style:

\documentclass{scrreprt}

\usepackage[style=list,nopostdot]{glossaries}

\makeglossaries

% sample entries provided by glossaries for testing:

\begin{document}

\printglossary

\end{document}


Here's the closest matching index style with adjustment (requires at least glossaries v4.26):

\documentclass{scrreprt}

\usepackage[style=index,nopostdot]{glossaries}

\makeglossaries

% adjust "index" style to allow multi-paragraph descriptions:
\renewcommand{\glstreeitem}{%
\parindent0pt\par\hangindent40pt
\everypar{\parindent50pt\hangindent40pt}}

% sample entries provided by glossaries for testing:

\begin{document}

\printglossary

\end{document}


It's not an exact match, but it's fairly close.

The altlist style starts the description on the next line. Here's an example of altlist:

\documentclass{scrreprt}

\usepackage[style=altlist,nopostdot]{glossaries}

\makeglossaries

% sample entries provided by glossaries for testing:

\begin{document}

\printglossary

\end{document}


The closest non-list match is again the index style, but with another adjustment (again requires at least v4.26):

\documentclass{scrreprt}

\usepackage[style=index,nopostdot]{glossaries}

\makeglossaries

% adjust "index" style to allow multi-paragraph descriptions:
\renewcommand{\glstreeitem}{%
\parindent0pt\par\hangindent40pt
\everypar{\parindent50pt\hangindent40pt}}
\renewcommand{\glstreepredesc}{\par
\glstreeitem\parindent\hangindent}

% sample entries provided by glossaries for testing:

\begin{document}

\printglossary

\end{document}


The difference in the font used by the label stems from the use of scrreprt as the class which uses sans-serif for the \item label in the description environment. Since the index style doesn't use a list environment, it's unaffected.

There's a complete list of all predefined styles with examples for comparison.

• Nicola, I have changed the code as you said, that is Oct 12, 2016 at 7:57
• Nicola, I have changed the code as you said, that is \printglossary[style=index]. All the errors are gone! Thanke you very much! :) Oct 12, 2016 at 8:00

I can't find where exactly classicthesis.sty redefines anything related to the error you're reporting. What I did find is a note in the 'manual' saying: If you want to use the glossaries package, take care of loading it with the following options: \usepackage[style=long,nolist]{glossaries}. Can't blame classicthesis for everything, can you?

• Hi PhilipPirrip, you and Nicola have found the problem: it should always used an option for the style: in this way there are no errors. Thank you! :) Oct 12, 2016 at 8:03

classicthesis loves to use in all sort of places \spacedlowsmallcaps (and similar commands) which uses \MakeTextLowercase and sometimes (depending on the packages options) also the soul to change the letter spacing. Both \MakeTextLowercase and the soul commands are a bit picky regarding their argument.

In this case you get the error as classicthesis redefines \descriptionlabel to add this \spacedlowsmallcaps. You can redefine \descriptionlabel to get rid of the error:

\documentclass[twoside]{scrreprt}

\usepackage{classicthesis}

\renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}\textls[80]{\scshape{#1}}}

\usepackage[nonumberlist,nopostdot,xindy]{glossaries}

\makeglossaries

\newglossaryentry{latex}
{
name=latex,
description={Is a mark up language specially suited
for scientific document}
}

\begin{document}

\begin{description}
\item[\glossentryname {latex}] sample
\end{description}

\end{document}
`