You are not logged in.

#1 2010-05-27 19:17:52

pyknite
Member
Registered: 2010-03-03
Posts: 166

Latex problem with header and footer

Hi there...

I'm not sure if it's the right forum to post my question but I try wink

I'm making my end's bachelor project and I (try to)  write my report in Latex.

I use the report class but I have some constraints to respect.

So, my problem is that I need to have on each pages (except the title page) the same header and footer. I made my own header and footer using fancyhdr and it worked, except on special page like the first page of each chapter or the tables of contents.
How can I have my header/footer on each page?

This is my preambule:

\documentclass[a4paper,10pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[pdftex]{hyperref}
\usepackage[frenchb]{babel}
\usepackage{lmodern}        % police
\usepackage{graphicx}       % image
\usepackage{geometry}       % marges
\usepackage{titlesec}       % chapitre
\usepackage{fancyhdr}       % en-tete et pied de pages

% Enlever le mot "Chapitre" au debut de chaque chapitre
\titleformat{\chapter}[hang]{\normalfont\Large\bf}{\Huge\bf\thechapter}{1ex}{\Huge}

% Marge exterieure plus grande
\geometry{hmargin=2.5cm,vmargin=1.5cm}


\hypersetup {
   pdfauthor = {my name},
   pdftitle = {Rapport},
   pdfsubject = {Rapport},
   pdfkeywords = {}
}

% Entete et pied de pages
\fancyhead{}            % efface le contenu de l'en-tete
\fancyfoot{}            % efface le contenu du pied de page
\lhead{\includegraphics[height=1cm]{img/logo_heig.eps}}
\rhead{my name}
\renewcommand{\headrulewidth}{0.4pt}
\rfoot{\thepage}
\pagestyle{fancy}

% Paragraphe (espace entre chaque paragraphe et decrementer)
\setlength{\parindent}{0.0cm}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}

Thanks for answer and sorry for my bad english sad

Offline

#2 2010-05-29 12:50:33

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: Latex problem with header and footer

For those special pages, LaTeX switches to the plain page layout, which doesn't use headers/footers. However, you can change the fancyhdr pagestyles using the \fancypagestyle command, e.g.:

\fancypagestyle{plain}{%
(…)
}

Found this on here in case you can read German. wink

Offline

#3 2010-05-30 10:02:43

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: Latex problem with header and footer

Runiq wrote:

For those special pages, LaTeX switches to the plain page layout, which doesn't use headers/footers. However, you can change the fancyhdr pagestyles using the \fancypagestyle command, e.g.:

\fancypagestyle{plain}{%
(…)
}

Found this on here in case you can read German. wink

Thank you! It works fine wink

Offline

#4 2010-06-01 06:43:10

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: Latex problem with header and footer

I'm sorry but I still have a problem with that solution sad

Now headers are fine, but footers doesn't work sad

I only have the page number on the table of content and not on the others page...

Thanks

Offline

#5 2010-06-01 12:03:44

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: Latex problem with header and footer

Ok, it works... I'm feeling like a n00b sad

My bottom margin was to short to display the page number sad

Offline

Board footer

Powered by FluxBB