Page LayoutRe: fancyhdr | Settings not working as expected

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
doonyakka
Posts: 9
Joined: Fri May 28, 2010 2:50 pm

fancyhdr | Settings not working as expected

Post by doonyakka »

Hi,

I've recently been having problems getting fancyhdr to do what it's supposed to, namely to alternate headings according to the values of LRC with OE.

The following minimal example results in "Header 1" appearing in \rhead on every page, and both \thepage and "Author" appearing adjacent two each other in \lfoot on every page.

Code: Select all

\documentclass{article}
\usepackage{fancyhdr}
\usepackage{blindtext}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[RO,LE]{\bfseries Header 1}
\fancyfoot[LE,RO]{\thepage}
\fancyfoot[LO,CE]{Author}
\fancyfoot[CO,RE]{\date}

\begin{document}

\Blinddocument

\end{document}
Presumably, this isn't as it should be. Am I doing something wrong?

Any help much appreciated.

Best,
doonyakka
Last edited by doonyakka on Mon Dec 05, 2011 2:05 pm, edited 2 times 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.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

Re: fancyhdr | Settings not working as expected

Post by localghost »

These settings only make sense in a two-sided document. For details see the fancyhdr manual.


Thorsten
doonyakka
Posts: 9
Joined: Fri May 28, 2010 2:50 pm

Re: fancyhdr | Settings not working as expected

Post by doonyakka »

Thanks Thorsten :)

Solution: Add [twoside] to \documentclass options.
Post Reply