1

I have a very specific issue with the LastPage Package. I'll try and explain the best I can.

So I have an article. That uses:

\rfoot {Page \thepage \hspace{1pt} of \pageref{LastPage}}

To add the page number to the bottom of each page. which works fine.

But I would like my "Last Page" To be my references page. My basic article structure is.

  • Title
  • Fore Pages (Nomenclature, Abstract, Table of Contents)
  • Main Body (Introduction, ETC ETC References)
  • Aft Pages (Glossary, Index, Appendix)

Is there any way to set the Reference Page as the Last page so all pages above that are correct e.g Page 1 of 3. I don't want the Glossary, Index, Appendix included in the page count.

For my References Page I'm using:

\newpage
\bibliographystyle{apacite}
\bibliography{references}

Any help would be greatly appricated.

1

If you want to use the beginning of the Reference section as the last page, you can add a label immediately after \newpage, say \newpage\label{mylastpage}, and use that label in \pageref{mylastpage}.

If you want to use the end of the Reference section as the last page, add the label after \bibliography{referencec}.

With this you don't even need the LastPage package.

  • Awesome worked a treat. Thank you. One thing though \label{mylastpage} didn't work i had to use \label{myLastPage}. No idea why I also removed the last page package. – wodawick Apr 30 at 19:04
  • 1
    You don't need it. (Do you have any idea how many problems result from loading unused packages, usually the result of a "template"?) – John Kormylo Apr 30 at 21:37
  • Honestly no I do not. I'm newish to TeX but this article that I'm writing I built from a blank template. I was using the LastPage package but it wasn't fit for my needs. But Herr K. solution worked a treat. – wodawick May 1 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.