# ...change the page style (numbers/header/footer)?

Changing the page style goes a long way towards making your document look a little bit nicer. In \$latex \LaTeX\$ this is accomplished with the \pagestyle command but, as so often is the case, other packages get created to give you more options and more control over your document. You need to know that the top part of the document, above the body of the text, is called the header. The bottom part of the document, below the body of the text, is called the footer.

\$latex \LaTeX\$ comes with 4 standard pagestyles:

\pagestyle{empty}  results in no headers or footers. Since the page number is, by default, placed in the footer, this command removes the page number.

\pagestyle{plain}   results in no headers and a footer with a centered page number.

\pagestyle{headings} a header with the name of the chapter/subsection and the page number.

\pagestyle{myheadings} no footer and the page numbering is in the header (along with other information).

But if you are interested in controlling the information in the header and footer  then you should use the fancyhdr package. So:

1. If you want nothing on the page but the text you type, use \pagestyle{empty}
2. If you want your text and the page number, do nothing (that's what you'll get by default.
3. Anything else, use the fancyhdr package. This will give you good control over the information in the header and footer.

To use the fancyhdr package you'll need to put

\usepackage{fancyhdr}
\pagestyle{fancy}

in the preamble of your document. The fancyhdr package gives you control over the left, center and right of the header and the left, center, and right of the footer. The left header and footer are left justified, the center header and footer are centered and the right header and footer are right justified. The information that goes in those 6 specific spots is specified by using some/all of the following commands in the preamble:

• \lfoot{} controls the left footer
• \cfoot{} controls the center footer
• \rfoot{} controls the right footer

So, for example, \lhead{My Awesome Book} in the preamble will put My Awesome Book on the left header; i.e., in the upper lefthand corner of the page. If you don't want the page number in the center of the footer (done by default) then put \cfoot{} in the preamble. To move the page numbering to another part of the header or footer, you'll need to know that the page number of your document is stored in the variable \thepage. If you want to move print the page number in the upper right hand corner of the page (right header) then put \rhead{\thepage} in the preamble.

With respect to the page numbering, the numbers are in Arabic numerals. If you want to change this you can insert one of the following into the preamble:

\pagenumbering{roman} lower case Roman numerals for page numbers

\pagenumbering{Roman} upper case Roman numerals for page numbers

\pagenumbering{alph} lower case letters for page numbers

\pagenumbering{Alph} upper case letters for page numbers

\pagenumbering{roman} lower case Roman numerals for page numbers

For completeness, \pagenumbering{arabic} gives Arabic numerals for page numbers. This would be useful in you want to switch page styles within a single document.

The fancyhdr package also lets you include a decorative line in the header and footer as well as control the its thickness. This is done with the following commands