[texhax] \thepage issues, seems like a bug, but how could it be??

Micha Hofri hofri at cs.wpi.edu
Mon Feb 13 02:03:56 CET 2006

I am writing a largish book, using the book class.  It has many times a 
phrase like "from Eq(x.yz) we see.." where x is chapter number and yz is 
equation number in the page, and it is often not easy to find.  In _my_ 
text I go back and forth a lot to find it.

The solution I want:  equation numbers restart on each page.
  Reference to an equation will now be "from Eq(ppp.x) we see..." where 
ppp is page number, and x the equation number.  But only the x's get 
typeset as equation numbers!

Current state of my knowledge:  easy to tell latex to restart numbering 
on a page, using \numberwithin{equation}{page} but this has two problems

(1)  It sets \theequation which is used both in .aux and to print the 
equation number.  I need that value in the .aux file, to generate 
references, but I want to print only the second part of the string, 
following the period, so I need to get into the macro(?) that prints the 
equation number.

Here is the odd part:

(2) When latex gets to an equation which causes it to clear page and 
start another, its \theequation has already been set as belonging to the 
previous page, while the .aux file reflects the correct page where it 
was included.  There seems to be fuzziness about the value of \thepage.
Which seems odd at this stage of developmment

What am I missing?

--Micha Hofri

More information about the texhax mailing list