Generalhow to reset custom counter for every page

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
mappo
Posts: 25
Joined: Thu Nov 29, 2007 11:19 am

how to reset custom counter for every page

Post by mappo »

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?
If you don't recycle, you're throwing it all away.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

how to reset custom counter for every page

Post by localghost »

Seems to be a job for the perpage package from the bigfoot bundle.


Best regards
Thorsten¹
User avatar
mappo
Posts: 25
Joined: Thu Nov 29, 2007 11:19 am

Re: how to reset custom counter for every page

Post by mappo »

The doc looks very promising. I'll check it out - thank you!
If you don't recycle, you're throwing it all away.
Post Reply