[texhax] changing \thepage?

John R. Culleton john at wexfordpress.com
Tue Aug 1 16:58:52 CEST 2006


On Tuesday 01 August 2006 08:57, Adam Spargo wrote:
> Hi,
> I'm creating some slides and some of which are easiest done by duplicating
> the slide and adding new things each time. The trouble is that I wrote a
> \newpagestyle with a header that uses \thepage to put the page number in
> the corner. So my problem is that using whole new slides to add things
> incremements the page when I want it to remain constant for a subset of
> the slides.
>
> Does anybody know how to edit \thepage or another way to put the page
> number on my slides as I'd like.
>
> Thanks in advance,
>
> Adam.
Ultimately you are dealing with a counter somewhere. LaTeX does
too good a job of hiding the innards of the process so your best
bet is to establish another counter and use that, advancing it
after each page and resetting it as needed. Try these
LaTeX statements:
\newcounter{mycounter}  
\setcounter{mycounter}{10} % or whatever value you want
\addtocounter{mycounter}{1} % at the top of each new page.

then to print it out use
\arabic{mycounter}
or
\themycounter

All this is covered in standard LaTeX textbooks, The above is
taken from pages 190-191 of "A Guide to LateX" by Kopka & Daly. 

Disclaimer: I haen't used LaTeX in decades. It is IMO unbearably
verbose, clumsy and does too good a job of hiding things. But if
you do use LaTeX, then try those commands. 


-- 
John Culleton
Able Indexing and Typesetting
Precision typesetting (tm) at reasonable cost.
Satisfaction guaranteed. 
http://wexfordpress.com




More information about the texhax mailing list