TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 styles for my header and footers. This one is for 90 %of my pages, I want the section in the header. My name left in the footer and my page right:

\fancyfoot[R]{Page \thepage}

But I also want my name in the footer on a chapters\index\tableofcontentspage + the page should be right aligned:

\fancyfoot[R]{Page \thepage}

But how do I set these settings correctly? At the moment I use the "standard" style, but my numbering on chapters is different now, and I want that to be the same on al my pages. And of course a chapter page, index page of table of contents don't need a section name in the header.


Let me try be more clear: I want my name left aligned in the footer + the page right aligned on every page. Then on pages that are part of a chapter, I want the chapter name in the header.

Thank you so much

share|improve this question
I'm not sure how \leftmark uses section names in a document class that faetures chapters. In other words: Please add a minimal working example (MWE) that illustrates your problem. – lockstep Nov 19 '12 at 16:16
Euhm, I meant the chapter instead of the section. This is all the code I have, just need to find a way to apply them to the right pages... – Aaron Nov 19 '12 at 16:20
And with "chapter page" you mean the starting page of a chapter? – lockstep Nov 19 '12 at 16:24
Yes, the first page of chapter does not have the header-footer style I want. – Aaron Nov 19 '12 at 16:26
up vote 1 down vote accepted

Instead of creating two new page styles, simply redefine a) the fancy pagestyle and b) the plain pagestyle which by default is used for the starting pages of chapters.




% The following redefines the `fancy` pagestyle
\fancyfoot[R]{Page \thepage}

% And now for the `plain` pagestyle
  \fancyfoot[R]{Page \thepage}%

% \usepackage{emptypage}% optional











share|improve this answer
Thank you so much, I've been searching for this like hours... 1 small thing left: I made 1 chaper like this \chapter*{}. It still has a empty line in the header, how can I remove that? – Aaron Nov 19 '12 at 16:40
@Aaron See updated answer. – lockstep Nov 19 '12 at 16:45
Epic thanks! :) – Aaron Nov 19 '12 at 16:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.