I am quite new to TeX. I'm writing my thesis and I want to place the page numbers at bottom left for even pages and bottom right for odd pages. I've done this and it works for even pages, but the odd ones have the page number at the center. Any idea what I'm doing wrong?
\documentclass[11pt, twoside]{book}
\usepackage{geometry, amsmath, float, fancyhdr, standalone}
\geometry{a4paper}
\usepackage[parfill]{parskip}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[LE,RO]{\thepage}
Best Answer
First pages of chapters, table of contents, and other "special" pages are defined to have a
plain
page style (\thispagestyle{plain}
can be found in the definition of\chapter
and so in\tableofcontents
, etc.).Even when you apply the
fancy
page style through thefancyhdr
package, these pages continue to have theplain
style.So, if you want these pages to have the
fancy
style, you have to redefine theplain
style to be the same of thefancy
one:The same can be achieved with
I also suggest you to add the following line
to remove the header rule, since you are putting nothing in the header.
Complete example:
Output (first two pages):
EDIT
If you want to keep the header line in all pages but
plain
ones, forget what I said and simply put the linein the preamble.
In this way you are redefining the
plain
style to be the same offancy
except for the header rule.Code:
Output: