LaTeX forum ⇒ Theses, Books, Title pages ⇒ The \rightmark in fancyhdr is recognized as chapter Topic is solved

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

The \rightmark in fancyhdr is recognized as chapter

Hi,

I changed the document from to "twopage". I would like at the header to appear the chapter name on the one page and the section name on the other (this is the default fancyhdr style I think). But the \rightmark is not recognized as section but as chapter, just like the \leftmark.

I tried to add a new command and use it insted of \rightmark:

\renewcommand{\sectionmark}[1]{ \markright{#1}{} }

But an error appears when the first subsesection appears.

Are there any ideas how to solve this problem?

Thank you.

elinach

Tags:

User_2015
Posts: 1
Joined: Thu May 28, 2015 4:39 pm
Hi,

It is important to note that in every chapter and corresponding file, the header is overwritten (\lhead). This has to be removed.

I worked for me, when i used the following in Thesis.cls

\pagestyle{fancy} % Return the page headers back to the "fancy" style\lhead[\rm\thepage]{\fancyplain{}{\sl{\leftmark}}}\rhead[\fancyplain{}{\sl{\rightmark}}]{\rm\thepage}
\input{Chapters/Chapter1}