## LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and Acronyms ⇒ index pages aren't added to the total page number...

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

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

my .tex file has the following structure:

\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.
\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

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
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
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

vivelafete
Posts: 11
Joined: Fri Nov 27, 2009 12:38 pm
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

Return to “MakeIndex, Nomenclature, Glossaries and Acronyms”

### Who is online

Users browsing this forum: No registered users and 2 guests