[Tugindia] Changing Pagestyle inside Environments

Radhakrishnan CV cvr at river-valley.org
Sat Apr 12 14:11:16 CEST 2003

>>>>> "Manoj" == Manoj Kummini <kummini at yahoo.com> writes:

    Manoj> I am trying to define an `acknowledgement' environment,
    Manoj> which should be typeset without page-numbers. This is what
    Manoj> I tried:

    Manoj> \def\acknowledgement{%
    Manoj> \begingroup\if at openright\cleardoublepage\else\clearpage\fi%
    Manoj> \@makeschapterhead{Acknowledgement}% \pagestyle{empty}}
    Manoj> \def\endacknowledgement{\endgroup}

    Manoj> In a particular case the acknoledgement text runs into two
    Manoj> printed pages. The first page has pagestyle empty, while
    Manoj> the second one has pagestyle plain. Can someone explain why
    Manoj> this happens?

You should add \thispagestyle{empty} after \endgroup so as to make TeX
aware that this page is part of acknowledgement and need not have page
numbers.  If not, when the group closes, the default pagestyle becomes
effective. The pagestyle operation takes place during output routine
while your group closing has taken place much earlier.


More information about the Tugindia mailing list