[texhax] Incrementing a counter on a page boundary?

William F. Adams wadams at atlis.com
Wed Aug 18 17:15:47 CEST 2004


On Wednesday, August 18, 2004, at 10:28  AM, Adrian F. Clark wrote:

> I'm preparing a LaTeX document which involves per-page numbering.  In
> other words, I need "1a" "1b" etc on p1, "2a" "2b" etc on p2, and so 
> on.
>
> Thanks to David Kastrup's excellent perpage.sty, I am able to handle
> what I thought was the difficult part, the "a", "b" part of the
> numbering scheme.  However, I'm struggling to get the page number to
> come out right: in particular, \thepage can give a value that is one 
> too
> small at the top of a page -- presumably because of the way TeX "cuts
> the scroll".  Does anyone have a solution to this, perhaps a variation
> on perpage.sty that increments rather than resets a counter?  I'm 
> afraid
> the wizardry in perpage.sty is beyond me these days...

If you can switch to using the memoir class, its 
``\strictpagechecktrue'' command will sort out most such instances --- 
in some places though one must add a ``\parnopar'' to force a paragraph 
to break (without changing its appearance) at a page boundary.

Alternately, one can write out the page number and read it back in 
after a second run.

Or, perhaps you should look at adapting the ``footmisc'' code which has 
a per-page option for numbering footnotes....

William

-- 
William Adams, publishing specialist
voice - 717-731-6707 | Fax - 717-731-6708
www.atlis.com



More information about the texhax mailing list