I receive the a Reference "LastPage" undefined error when trying to compile a document with this syntax:


What is necesarry to prevent this error? I'm using TeXworks Version 0.4.3 (MiKTeX 2.9) and pdfLaTeX.

  • Please supply a MWE, we do not know if you create the label, or if you use any packages, for instance lastpage? – zeroth Jan 20 '12 at 17:18
  • What is a "MWE"? – powtac Jan 20 '12 at 17:22
  • Please see this: Welcome and here is the proper link for MWE. – zeroth Jan 20 '12 at 17:23

\usepackage{lastpage} is required, further you need to compile at least twice. The reason is, that the first compiler run writes the reference for that label to the .aux file, in the second compiler run it can be read in.

The package lastpage defines the label LastPage, and your previous question showed that this package is used. So just compile again.

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.