I had warning in my project

Package hyperref Warning: Option `pdfpagelabels' is turned off because \thepage is undefined.

I used command before document class.


Can somebody explain me what is exactly happening when I use this command? I have to explain it in my project. It's just the trick to avoid the error by turning labels to false?

  • Welcome to TeX.SX! It is difficult for anyone to help without more details. Can you please post a minimal working example. This should be a minimal piece of code that demonstrates the problem. – user30471 Oct 20 '18 at 10:28
  • I dont have any problem :) i just need explanation of "\PassOptionsToPackage{pdfpagelabels=false}{hyperref}" And I did not find it anywhere – Vumpik Oct 20 '18 at 10:43
  • I suppose the real question is, why is \thepage undefined? – David Carlisle Oct 20 '18 at 11:19

Normally hyperref generates invisible anchors based on the printed page number (which might be different from the physical page count) in the PDF stream which can be used to link to pages.

If \thepage (the standard page printing macro) is undefined in some non standard document class then hyperref can not generate the internal page identifier and would warn unless you use the pdfpagelabels=false option to disable the whole mechanism.


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.