🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #476

RE: Page numbering

#476
From: George D. Greenwade
Date: Mon, 27 Jul 1992 17:46
42 lines
2707 bytes
On Mon, 27 JUL 92 18:13 N, Paolo Pierini <PIERINI@MVLASA.INFN.IT> asked:
> I am writing a rather long document in the {report} style. Can anybody
> point me how to number the pages with the chapter number as a suffix and
> resetting the page counter at each chapter? That is n-m, where n is the
> chapter number and m starts from 1 at each chapter.

The file chappg.sty does this.  It is rather short, so I am including it in
this post.  You can also retrieve it from FILESERV@SHSU.BITNET
(FILESERV@SHSU.edu) by including SENDME STY.CHAPPG in a mail message to it. 

While our holdings are not comprehensive, you can get an annotated listing
of styles available on FILESERV by including the command LIST STY in a mail
message to it.  If you want to add a style to our collection, contact me
and we can arrange it.

Regards,   George
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
George D. Greenwade, Ph.D.                            Bitnet:  BED_GDG@SHSU
Department of Economics and Business Analysis         THEnet: SHSU::BED_GDG
College of Business Administration                    Voice: (409) 294-1266
P. O. Box 2118                                        FAX:   (409) 294-3612
Sam Houston State University              Internet:        bed_gdg@SHSU.edu
Huntsville, TX 77341                      bed_gdg%SHSU.decnet@relay.the.net
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Save file as: CHAPPG.STY             Source: FILESERV@SHSU.BITNET  
%%% Author: Max Hailperin <max@nic.gac.edu>
%%%  Define \thepage to output chapter-page (such as 1-3, 5-2, etc.)
%%%  and have each chapter's page number begin on 1.
%%% Original source: TeXMaG Vol. 5, No. 3 (part 1)
%%% The following checksum includes all SHSU-generated topmatter.
%%% checksum = "63303 18 98 842"
% \documentstyle[chappg]{report} or whatnot:

\renewcommand{\thepage}{\arabic{chapter}-\arabic{page}}% chapter-page numbering
\@addtoreset{page}{chapter}% reset page number when chapter is stepped
% The next magic makes the page counter be reset to one rather than zero
\def\@stpelt#1{\global\csname c@#1\endcsname
               \expandafter\ifx \csname#1\endcsname \page
                  \@ne
               \else
                  \z@ \fi}
\endinput
Technical Details
Message-ID: <0095E333.12477D40.10616@SHSU.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!sdd.hp.com!mips!pacbell.com!network.ucsd.edu!mvb.saic.com!info-tex

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!sdd.hp.com!mips!pacbell.com!network.ucsd.edu!mvb.saic.com!info-tex
From: "George D. Greenwade" <bed_gdg@SHSU.edu>
Newsgroups: comp.text.tex
Subject: RE: Page numbering
Message-ID: <0095E333.12477D40.10616@SHSU.edu>
Date: Mon, 27 Jul 1992 12:46:41 CDT
Organization: Info-Tex<==>Comp.Text.Tex Gateway
X-Gateway-Source-Info: Mailing List
Lines: 42