1

an anyone tell me why my header doenst start on the first page of my chapters? How can I let my header start on all the pages of the document? (Excluding my frontpage)

Thanks in advance

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\setlength\headheight{90pt}
\begin{document}
\fancyhead[CO,CE]{\transparent{1} \includegraphics[width=16cm]{images/test.jpg}}
\chapter{some chapter}
text
\newpage
text
\end{document}
  • If you're using one of the standard classes, the internal definition of \chapter includes thispagestyle{plain}. Maybe try adding this to your preamble: \usepackage{etoolbox} \apptocmd{\chapter}{\thispagestyle{fancy}}{}{} (not tested). – Bernard Oct 01 '16 at 09:07
  • If you have the chapter title there with big letters, you don't Need a Header with the same Information. Leaving it empty has been done for many many years. – Johannes_B Oct 01 '16 at 09:33
  • also in all standard classes the syntax is \chapter{my stuff} not \begin{chapter} – David Carlisle Oct 01 '16 at 09:35
  • @Johannes_B: It seems the O.P. has some logo in the header. If there's nothing else, it makes sense, in my opinion. – Bernard Oct 01 '16 at 09:36
  • I have indeed a logo in my header. Thanks for the help guys. @DavidCarlisle youre right, my bad... – user3201911 Oct 01 '16 at 09:41

1 Answers1

3

See "7 Redefining plain style" of fancyhdr's documentation. Applied to the simplified example:

\documentclass{report}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\fancyhead[C]{LOGO}

\fancypagestyle{plain}{%
  \fancyhf{}%
  \fancyhead[C]{LOGO}%
}

\begin{document}
\chapter{some chapter}
text
\newpage
text
\end{document}

Of course, the page number should be inserted somewhere.

Heiko Oberdiek
  • 271,626