MakeIndex, Nomenclature, Glossaries and Acronymsindex pages aren't added to the total page number...

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
vivelafete
Posts: 11
Joined: Fri Nov 27, 2009 12:38 pm

index pages aren't added to the total page number...

Post by vivelafete »

my .tex file has the following structure:

Code: Select all

\documentclass[a4paper, twoside]{scrreprt}
\usepackage{makeidx}
...
\usepackage{lastpage}
\label{LastPage}
\makeindex
...
\begin{document}
...
\chapter{Main Page}
\index{Main Page}
...
\printindex
\end{document}
In the .sty i defined to print pageX of "total page number" in the header.

Code: Select all

\thepage \hspace{0.5mm}  of \hspace{0.2mm} pageref{LastPage}
now I have on the last page "page 23 of 22" what doesn't makes a lot of sense. (23 of 23 would be better).

If I uncomment \index{Main Page} no index appears and the pagenumbers are correct.

So my question can i manage the lastpage by myself?
Why the index pages aren't added to the total page number?
What the hell I'm doing wrong?

I would very appreciate any help or any hint?

Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: index pages aren't added to the total page number...

Post by localghost »

That's quite normal if you set the label for the last page manually. Omit the according line right before your index.


Best regards
Thorsten
vivelafete
Posts: 11
Joined: Fri Nov 27, 2009 12:38 pm

Re: index pages aren't added to the total page number...

Post by vivelafete »

Thanks!
I didn't realize that I set with \label{LastPage} the mark for the Lastpage.

I defined it also before \begin{document}.

It's a little bit strange that it worked until i used the index. Isn't it?

I searched for a long time at the wrong places and due to you I solved it in 5 minutes.

So thank you very much!
christian
Post Reply