I want to remove the title of a chapter from the header, but the page number must stay intact.

I'm using a the book class

\chapter{Some title}

The script generates two pages. The second page contains a header, page number and title. Now I want to remove the title from that particular page.

-edit- I found out that you can use \thispagestyle{plain}, however when I use this the page number, which is located at the top right, is then placed at the bottom.

  • If your aim is to remove the header only on a particular page, then \thispagestyle{empty} is the easiest solution. Would you please be more precise? – egreg Jun 12 '12 at 21:24
  • @egreg yes I see I put my question wrong. Sorry. The thing is is that the page number is also in the header... I only want to have the title of the chapter removed, but not the page number. – WG- Jun 12 '12 at 21:27
  • 1
    Is it on all pages or only in that particular one? – egreg Jun 12 '12 at 21:31

Assuming that you want to suppress the chapter name from the header lines of all pages (other than pages which contain the chapter title, which are set in a different pagestyle anyway), you could use the following code. It relies on the etoolbox package and its \patchcmd macro.

\chapter{Some title}

If the twoside option is in effect, LaTeX will typeset the page numbers on the right-hand side of the header line on odd-numbered pages and on the left-hand side of the header line on even-numbered pages. If the oneside document option is set, all page numbers will be set on the right-hand side of the header line (and, of course, without the chapter name on the left-hand side of the header lines).

By the way, this code works with both the book (default document option setting: twoside) and the report (default document option setting: oneside) document classes.

|improve this answer|||||
  • "Assuming that you want to suppress the chapter name from the header lines of all pages" Ah well I can live with that. Thanks for your answer. – WG- Jun 13 '12 at 0:19
  • @Wouter -- If you only want to have the modified headings page style apply to even-numbered pages, just remove the second \patchcmd macro (which extends over three lines) from the code above. By the way, do note that I've generalized the code relative to the initial answer so that it can be used with either the twoside or the oneside document class option. – Mico Jun 13 '12 at 0:48
  • To the person who down-voted this answer, almost exactly two years after I wrote it: please enlighten me as to what it is about my answer you find incorrect or objectionable. – Mico Jun 7 '14 at 8:35
  • I just created an account to upvote this. Thanks! – milancurcic Apr 21 '15 at 21:10

Much easier solution (if I'm understanding the original question):

Just use \pagestyle{myheadings}

This will keep your footer, remove the title from your header, and keep the page number in your header.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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