# Writing thesis using fancyhdr - problems with section title

I am writing my thesis using LaTeX with a provided thesis document class, which uses fancyhdr. My problem is that both the chapter and section titles appear automatically in the header, writing over each other. Ideally i would like to remove the section titles from the header and leave the chapter headers, but I can't find how to do this. How can this be done?

-

## migrated from stackoverflow.comAug 26 '11 at 16:30

This question came from our site for professional and enthusiast programmers.

Please register your account at Stack Overflow and at TeX Stack Exchange to be able to comment on your question and its answers after the migration, and to accept an answer. –  Paŭlo Ebermann Aug 26 '11 at 15:37

The fancyhdr package allows to modify the document headers using any one of the following commands:

• \lhead{<text>}: Left header
• \chead{<text>}: Center header
• \rhead{<text>}: Right header
• \fancyhead[<pos>]{<text>}: Header at <pos>={L,C,R} + {E,O} for left L, center C and right R headers on even E and odd O pages.

The last (advanced) command is more commonly used since it allows more flexibility via the optional [ ] parameters.

Assuming your thesis documentclass may have the following fancy header style defined (taken directly from the fancyhdr documentation:

\fancyhead[LE,RO]{\slshape \rightmark}


which would print something like:

In order to remove the section mark, clear the \rightmark by

\fancyhead[LE,RO]{}% Remove headers on Left Even and Right Odd pages


In general, find the side & page combination (resulting in a combination like the LE,RO choice above), and clear that specific header.

-
it makes more sense to give a pointer to the documentation instead of copying its contents. –  Herbert Aug 27 '11 at 7:14

[…] Ideally i would like to remove the section titles from the header and leave the chapter headers, but I can't find how to do this. […]

You can have both if you choose another setup for your page layout. The below example might give some inspiration in this regard. It produces a very common header layout with the chapter title placed right on even pages and the section title placed left on odd pages.

\documentclass[11pt,twoside,english]{report}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{fancyhdr}
\usepackage{blindtext}

\fancyhf{}
\pagestyle{fancy}

\begin{document}
\Blinddocument
\end{document}


The package manual has some more examples. As always, the blindtext package is only for creating dummy text, thus is not part of the solution.

-