I'm helping some people converting a play script from a dozen .doc files to LaTeX.
Currently I'm editing the package sides. I want to number the lines in the
script like this <page>.<lineN> where page of course is the standard page counter
and lineN my own, already implemented counter of lines.
The thing is that I'd like lineN to reset to 1 at the start of every new page in the
output document.
I've looked at \numberwithin, but I never got it to work and a package named chappg
but it seems to do the opposite - reset page in every chapter.
Any suggestions?
General ⇒ how to reset custom counter for every page
how to reset custom counter for every page
If you don't recycle, you're throwing it all away.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
how to reset custom counter for every page
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: how to reset custom counter for every page
The doc looks very promising. I'll check it out - thank you!
If you don't recycle, you're throwing it all away.