28.03.2013 Views

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.2. Page style 45<br />

In many classes, the first page of a chapter, or the very first page<br />

of the document, is switched <strong>to</strong> plain au<strong>to</strong>matically. If the user wants<br />

<strong>to</strong> change this, he or she must redefine that page style. The fancyhdr<br />

package simplifies this task with<br />

\fancypagestyle{plain}{definitions}<br />

where definitions consist of \fancyhead, \fancyfoot, <strong>and</strong>/or rule redefinitions<br />

that are <strong>to</strong> apply <strong>to</strong> the revised plain style. In fact, any existing<br />

page style can be redefined in this way.<br />

3.2.3 Page numbering<br />

The declaration that specifies the style of the page numbering has the<br />

form<br />

\pagenumbering{num style}<br />

The allowed values of num style are:<br />

arabic for normal (Arabic) numerals,<br />

roman for lower case Roman numerals,<br />

Roman for upper case Roman numerals,<br />

alph for lower case letters,<br />

Alph for upper case letters.<br />

The st<strong>and</strong>ard value is arabic. This declaration resets the page counter<br />

<strong>to</strong> 1. In order <strong>to</strong> paginate the foreword of a document with Roman numerals<br />

<strong>and</strong> the rest with Arabic numbers beginning with page 1 for chapter 1,<br />

one must declare \pagenumbering{roman} at the start of the foreword<br />

<strong>and</strong> then reset the page numbering with \pagenumbering{arabic} immediately<br />

after the first \chapter comm<strong>and</strong>. (See Section 3.3.5 for the<br />

preferred method.)<br />

Pages may be numbered starting with a value different from 1 by giving<br />

the comm<strong>and</strong><br />

\setcounter{page}{page num}<br />

where page num is the number <strong>to</strong> appear on the current page.<br />

Exercise 3.3: Exp<strong>and</strong> your exercise text file so that it fills more than one page of<br />

output <strong>and</strong> include the following preamble:<br />

\documentclass{article}<br />

\pagestyle{myheadings} \markright{Exercises}<br />

\pagenumbering{Roman}<br />

\begin{document}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!