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

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

Postby vivelafete » Thu Dec 03, 2009 5:39 pm

my .tex file has the following structure:

  1. \documentclass[a4paper, twoside]{scrreprt}
  2. \usepackage{makeidx}
  3. ...
  4. \usepackage{lastpage}
  5. \label{LastPage}
  6. \makeindex
  7. ...
  8. \begin{document}
  9. ...
  10. \chapter{Main Page}
  11. \index{Main Page}
  12. ...
  13. \printindex
  14. \end{document}


In the .sty i defined to print pageX of "total page number" in the header.
  1. \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

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

Postby localghost » Thu Dec 03, 2009 7:59 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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ 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

Postby vivelafete » Fri Dec 04, 2009 12:16 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 1 guest