I would like to use the page counter as a the first part of the label for definitions. I tried


but that wouldn't work if the definition is at the top of a new page, presumably because of this. Is there any way around it?


You can use the perpage package:


% We encourage TeX to break before a definition so the numbering will be correct

\usepackage[paperheight=60pt]{geometry} % just for the example

First on first page

Second on first page


First on second page

This will assign numbers 1.1, 1.2 and 2.1

enter image description here

  • This doesn't work if one removes \newpage and adds (in the preamble) \textheight=50pt. – lockstep Dec 25 '12 at 23:49
  • @lockstep The new version should work better – egreg Dec 26 '12 at 0:05
  • @vuce Yet it might fail in some circumstances; keep an eye on the numbering and if you find that some definition at the top of a page doesn't get numbered correctly, issue a \pagebreak before it. Please have a look at the site FAQ, particularly with respect to what voting means. – egreg Dec 26 '12 at 0:10

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.