ltpageno.dtx

Johannes Braams  David Carlisle  Alan Jeffrey
Leslie Lamport  Frank Mittelbach  Chris Rowley

Rainer Schöpf

1994/05/19

1 Page Numbering

Page numbers are produced by a page counter, used just like any other counter. The only difference is that \c@page contains the number of the next page to be output (the one currently being produced), rather than one minus it. Thus, it is normally initialized to 1 rather than 0. \c@page is defined to be \count0, rather than a count assigned by \newcount.

\pagenumbering The user sets the pagenumber style with the \pagenumbering{⟨foo⟩} command, which sets the page counter to 1 and defines \thepage to be \foo. For example, \pagenumbering{roman} causes pages to be numbered i, ii, etc.

1 ⟨∗2ekernel⟩

 2 \message{page nos.,}
 3 \countdef\c@page=0 \c@page=1
 4 \def\cl@page{}
 5 \def\pagenumbering#1{%
 6 \global\c@page \@ne \gdef\thepage{\csname @#1\endcsname
 7 \c@page}}

8 ⟨/2ekernel⟩