Page LayoutAlternating Page Numbers with Chapter and ToC

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
xrismf
Posts: 5
Joined: Fri May 06, 2011 3:14 pm

Alternating Page Numbers with Chapter and ToC

Post by xrismf »

Hi,

I'm using

Code: Select all

\documentclass[...,twoside]{...}
...
\fancyhf{}
\lfoot[\thepage]{}
\rfoot[]{\thepage}
to get alternating page numbers. However, whenever there is a \chapter page or the \tableofcontents page, the layout is broken and the number is displayed bottom/central.

Could someone tell me how to keep the page numbers alternating throughout the whole document?

Kind Regards
Last edited by xrismf on Thu Jul 21, 2011 3:47 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Alternating Page Numbers with Chapter and ToC

Post by localghost »

Switching to »plain« page style is the default behaviour for pages that start a new chapter (which also applies to lists like the ToC, LoF or LoT). The fancyhdr manual describes how to redefine this page style.


Thorsten
xrismf
Posts: 5
Joined: Fri May 06, 2011 3:14 pm

Alternating Page Numbers with Chapter and ToC

Post by xrismf »

Code: Select all

\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\lfoot[\thepage]{}
\rfoot[]{\thepage}
\fancyhead[RE]{\textit{\nouppercase{\leftmark}}}
\fancyhead[LO]{\textit{\nouppercase{\rightmark}}}}
works fine. Thank you very much! :)
Post Reply