0

I want to put a footer in all my document so I use the following code :

\usepackage{fancyhdr}           
\pagestyle{fancy}           
\lfoot[\thepage]{} 
\cfoot{\tiny{$\copyright $} 
\rfoot[]{\thepage} % droite du pied de page
\fancyhead[RO, LE] {}

It works well except for the first page of all my chapters which apparently have their own style. I don't know why they are different (I just take the template from internet at this address : https://github.com/DorianDepriester/TemplateThese/archive/master.zip).

Currently, I can solve the problem for all chapters using this command : \thispagestyle{fancy}\protect at the beginning of all my chapters but as my list of figures and table of content is longer than 1 page, it didn't work for them.

So if you have any solution to put this code at the beginning of the list of figures or just remove the default page style for all chapter first pages, I am very interested.

Thank you a lot.

3
  • 2
    Check the documentation of fancyhdr, section "redefining plain style". May 12, 2018 at 17:39
  • Thanks I had a look but I didn't found the good information. It works perfectly now. May 12, 2018 at 17:45
  • Unrelated: beware this template loads obsolete (ae and àecompl) or incompatible packages (lmodern` and fourier, enumerate and enumitem).
    – Bernard
    May 12, 2018 at 19:10

2 Answers 2

1

You have to redefine the plain style that's used for the chapter starting pages.

You can also streamline the definitions.

\documentclass{book}

\usepackage{fancyhdr}           

\usepackage{kantlipsum}

\pagestyle{fancy}           

\fancyhf{}% clear all fields
\fancyfoot[LE,RO]{\thepage}
\fancyfoot[C]{\textcopyright}
\renewcommand{\headrulewidth}{0pt}

\fancypagestyle{plain}{%
  \fancyhf{}% clear all fields
  \fancyfoot[LE,RO]{\thepage}%
  \fancyfoot[C]{\textcopyright}%
  \renewcommand{\headrulewidth}{0pt}%
}

\begin{document}

\chapter{Test}

\kant[1-10]

\end{document}

enter image description here

1

The fancyhdr documentation gives a couple of suggestions. First you'd probably want to clear all header and footer fields. Using \fancyhf{}. Second \lfoot and \rfoot does not take optional arguments! So you end up with

\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lfoot{}
\cfoot{\tiny{$\copyright $}}
\rfoot{\thepage}
\begin{document}
  Hello world
  \newpage
  foo bar
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .