# Remove chapter from header but page number stays intact

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

\documentclass[11pt,a4paper,twoside,openright]{book}
\usepackage{lipsum}
\begin{document}
\chapter{Some title}
\lipsum
\end{document}


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
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.

\documentclass[11pt,a4paper,twoside]{book}
\usepackage{etoolbox}
\makeatletter
\if@twoside
\fi
\makeatother
\usepackage{lipsum}
\begin{document}
\chapter{Some title}
\lipsum[1-30]
\end{document}


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.

-
"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 at 21:10
@milancurcic - Thank you! –  Mico Apr 21 at 22:34

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

Just use \pagestyle{myheadings}

Welcome to TeX.sx! A tip: You can use backticks ` to mark your inline code as I did in my edit. –  doncherry Aug 1 '12 at 12:47