# [texhax] Page number in table of contents page not where I told fancyhdr to put it

Douglas McKenna doug at mathemaesthetics.com
Thu May 15 00:42:07 CEST 2014

All -

Using the fancyhdr package on a landscape document, I want all my page numbers in the lower right of each page of a one-sided book document.  But even though I've declared that to fancyhdr (see example below) and it's working on later pages, it's not working on the TOC page and the one after it.

I'm using TeXLive 2010.

What am I doing incorrectly, or if it's deliberate or a bug, what can I do to work around it.

Here's a MWE:

%--------------------------------------------------------------
\documentclass[oneside]{book}
\usepackage[landscape]{geometry}
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
\fancyfoot[R]{\thepage}  % Page numbers should be on lower right of each page.

\title{A Book}
\date{}
\begin{document}
\maketitle
\tableofcontents
\chapter{Sample}

\vskip 3.5in
Why are the page numbers of the Contents page and the next page not on the right, as requested?
\end{document}
%--------------------------------------------------------------

Worse, remove the "[landscape]" option from the geometry package input line, and now all the page numbers are centered, instead of just the first few.  I have no idea why.

Doug McKenna