x404.co.uk
http://www.x404.co.uk/forum/

LaTeX header/footer help
http://www.x404.co.uk/forum/viewtopic.php?f=4&t=7691
Page 1 of 1

Author:  forquare1 [ Mon Apr 12, 2010 2:04 pm ]
Post subject:  LaTeX header/footer help

Hi all,

I have a document using the report document class and I'm using the fancyhdr package to create headers and footers.
I've noticed that headers and footers don't display on a page where \chapter is used, they also don't appear on my \abstract and \tableofcontents pages...On these pages the default header (nothing) and the default footer (just the page number) is used.

My code looks something like this:

Code:
\documentclass[12pt]{report}

\usepackage[pdftex]{color,graphicx}
\usepackage[final]{pdfpages}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{geometry}

\geometry{a4paper, textwidth=14.5cm, textheight=24.5cm}
\pagestyle{fancy}

\cfoot{\thepage{} of \pageref{LastPage}}
\lfoot{Author: Benjamin Ian Lavery}


Thanks,
Ben

Author:  EddArmitage [ Mon Apr 12, 2010 2:13 pm ]
Post subject:  Re: LaTeX header/footer help

I don't have LaTeX here atm, but I'd have a look here first. Possibly try this one:

Code:
\pagestyle{fancyplain}
 
\fancyhf{}
 
\lhead{\fancyplain{}{Andrew Roberts}}
\rhead{\fancyplain{}{\today}}
\rfoot{\fancyplain{}{\thepage}}

Author:  forquare1 [ Mon Apr 12, 2010 2:32 pm ]
Post subject:  Re: LaTeX header/footer help

Thanks for that Edd,

Unfortunately it didn't work for me :(
However, with more Googling, I found that if I do this:
Code:
\chapter{Introduction}
\thispagestyle{fancy}


It works correctly for everything except the abstract page, which can stay as it is I think :)

Thanks again Edd,

Ben

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/