## LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and Acronyms ⇒ ERROR: Missing number, treated as zero when defining a custom glossary

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
aluaces
Posts: 3
Joined: Fri May 15, 2020 1:41 pm

### ERROR: Missing number, treated as zero when defining a custom glossary

Hi, I have reduced my problem with a customized glossary to a minimal example.

I get some errors of the following type when using my glossary.

ERROR: Missing number, treated as zero.

--- TeX said ---
\gls@numberpage
l.5 ...etentrycounter[]{page}\glsnumberformat{1}}}

If I take out either the \frontmatter line or the \usepackage[...]{babel}, no errors are shown.

Thanks!


Bartman
Posts: 140
Joined: Fri Jan 03, 2020 2:39 pm
I will only receive your error message, if I eliminate the cause of another one beforehand. It is avoided by suppressing the expansion of your custom key unit. Read section 4.4 Expansion for an explanation.

You get your error message because you use the commands \glsdescripES and \glsunit when changing \glossentry instead of \glsentrydescripES and \glsentryunit.

You may be interested in the automake option of the glossaries package.

Off topic remark: The default setting for the document class is two-sided.

aluaces
Posts: 3
Joined: Fri May 15, 2020 1:41 pm

With respect to reproducing the issue, I tried to see if I could replicate it on overleaf, but I could not be able to trigger the indexing, both as is or with automake present.

I tried to use both

\glssetnoexpandfield{descripES}\glssetnoexpandfield{unit}

and \glsnoexpandfields to no avail, before and after the calls to \glsaddkey.

I can make it work by using no external indexing at all, using \makenoidxglossaries and \printnoidxglossaries, at least for the MWE posted.

aluaces
Posts: 3
Joined: Fri May 15, 2020 1:41 pm
Bartman wrote:You get your error message because you use the commands \glsdescripES and \glsunit when changing \glossentry instead of \glsentrydescripES and \glsentryunit.

Sorry, I don't know how I could misread your post so badly. Of course using "entry" solves the problem, thanks a lot!