Generalglossaries: error in page number list

LaTeX specific issues not fitting into one of the other forums of this category.
zooonk
Posts: 7
Joined: Sun Dec 27, 2009 9:55 pm

glossaries: error in page number list

Post by zooonk »

Code: Select all

%\listfiles
\documentclass[
version=last,
ngerman,
%DIV=classic,
paper=a4,
11pt,
BCOR=2mm,
headings=small
]{scrbook}
\usepackage[latin1]{inputenc} %Dateikodierung
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{babel}
%\usepackage{scrhack} 
%\listfiles
%\usepackage{ngerman}
\usepackage{translator}
%%%%% Hyperref %%%%%
\usepackage[hyphens]{url}
\usepackage{hyperref}


\usepackage[xindy,toc]{glossaries} 
\glossarystyle{listhypergroup}
\GlsSetXdyLanguage{german-duden}
\GlsSetXdyCodePage{latin1}
\makeglossaries
\loadglsentries{glossar}
%%%%%%%%% glossar.tex is the file with the definitions

\raggedbottom
\makeatletter


\begin{document}

TEXT TEXT TEXT

\glsaddall
\printglossary
\mtcaddchapter
\end{document}
Hello!

As you probably know the 'glossaries'-package has got a numberlist-feature that lists the pagenumbers of where the words appear in the text. example:
12 Artikel. Während der Bauernkriege werden die 12 Artikel als Programm der Aufständischen
verfasst. Gefordert wird unter anderem die Abschaffung der Leibeigenschaft, eine Rückgabe
der Allmende, Jagdrechte und freie Pfarrerwahl. 28, 184, 515
The problem is: That "515" is the number of the first page of the glossary. Each (!) entry has got a "515" in its numberlist. That is wrong. Can anybody help me?

Greets, Marco
Last edited by zooonk on Wed Mar 10, 2010 5:42 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Re: glossaries: error in page number list

Post by nlct »

Can you pare down your example so it's more minimal?

Regards
Nicola Talbot
zooonk
Posts: 7
Joined: Sun Dec 27, 2009 9:55 pm

Re: glossaries: error in page number list

Post by zooonk »

i tried... it's a bit "more minimal" now. but don't be put off by the number of lines in there! i do not know exactly which packages take part in that glossary-thing...
and i could imagine that i made some kind of a "typical mistake". but your documentation couldn't help me that far..
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

glossaries: error in page number list

Post by nlct »

Unfortunately I can't test your example as it requires glossar.tex which you haven't provided and I get

Code: Select all

! Undefined control sequence.
<recently read> \mtcaddchapter

l.43 \mtcaddchapter
It makes it a bit difficult to diagnose the problem. The only suggestion I can make is that maybe you have \glsaddall on page 515.

Regards
Nicola Talbot
zooonk
Posts: 7
Joined: Sun Dec 27, 2009 9:55 pm

glossaries: error in page number list

Post by zooonk »

ok let me edit the minimal-example: the glossary.tex is just a collection of "\newglossaryentry" - definitions, so i will insert one in here. beein part of the minitoc-package "\mtcaddchapter" should be unimportant for the minimal-example...

Code: Select all

\documentclass[
version=last,
ngerman,
%DIV=classic,
paper=a4,
11pt,
BCOR=2mm,
headings=small
]{scrbook}
\usepackage[latin1]{inputenc} %Dateikodierung
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{babel}
%\usepackage{scrhack} 
%\listfiles
%\usepackage{ngerman}
\usepackage{translator}
%%%%% Hyperref %%%%%
\usepackage[hyphens]{url}
\usepackage{hyperref}


\usepackage[xindy,toc]{glossaries} 
\glossarystyle{listhypergroup}
\GlsSetXdyLanguage{german-duden}
\GlsSetXdyCodePage{latin1}
\makeglossaries
\newglossaryentry{test}{name={test-entry}, description={description of the test-entry}}
\raggedbottom
\makeatletter


\begin{document}

TEXT TEXT TEXT
\gls{test}

\glsaddall
\printglossary
\end{document}
that example works (without "515"). why not in my document? :/
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

glossaries: error in page number list

Post by nlct »

It's probably because you've got \glsaddall just before \printglossaries. Try removing it.

Regards
Nicola Talbot
zooonk
Posts: 7
Joined: Sun Dec 27, 2009 9:55 pm

Re: glossaries: error in page number list

Post by zooonk »

You're right. After removing \glsaddall it works!
But now there are glossary-entries that are not displayed in the glossary - of course the ones which are not referenced...
Can I put \glsaddall to another place?

edit: I tried to put it in the preamble after \loadglsentries{glossar}. then "1" appears in each entry as a page number. Is there no opportunity to use \glsaddall without having that wrong number in my entries?
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Re: glossaries: error in page number list

Post by nlct »

It's going to look a bit odd having some entries with page numbers and some without. Perhaps it would be better to suppress all the location numbers using the nonumberlist package option.

Regards
Nicola Talbot
zooonk
Posts: 7
Joined: Sun Dec 27, 2009 9:55 pm

Re: glossaries: error in page number list

Post by zooonk »

i allready thought about that. but the document is not gonna be published. it is more like a help text for students. so it's ok if there are glossary-entries that do not appear in the text.

is there actually no opportunity to fix it?
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

glossaries: error in page number list

Post by nlct »

You could use nonumberlist when you define the entry:

Code: Select all

\newglossaryentry{sample}{name=sample,description=a sample entry,nonumberlist}
Regards
Nicola Talbot
Post Reply