Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In a memoir document, how can I suppress the page headers for every page in one particular chapter?

However, I don't want want to use \pagestyle{empty} as recommended this answer, since I want the pages in that chapter to be formatted exactly like the other pages in the document (including having a footer, etc.)--just without the header.

Here is my current document:

\documentclass{memoir}

\usepackage{etoolbox}
\usepackage{lipsum}

% Headers and Footers

\nouppercaseheads

\makepagestyle{mystyle} 
\setlength{\headwidth}{\dimexpr\textwidth+\marginparsep+\marginparwidth\relax}
\makerunningwidth{mystyle}{\headwidth}

\makeevenhead{mystyle}{\itshape\leftmark}{}{}
\makeoddhead{mystyle}{}{}{\itshape\leftmark}
\makeevenfoot{mystyle}{\thepage}{}{}
\makeoddfoot{mystyle}{}{}{\thepage}
\makepsmarks{mystyle}{\createmark{chapter}{left}{}{}{}}

\makeatletter
\makepsmarks{mystyle}{\createmark{chapter}{left}{shownumber}{\@chapapp\ }{:\ }}
\makeatother

\makepagestyle{plain}
\makerunningwidth{plain}{\headwidth}
\makeevenfoot{plain}{\thepage}{}{}
\makeoddfoot{plain}{}{}{\thepage}

\pagestyle{mystyle}

\makeatletter
\aliaspagestyle{title}{empty} % suppress the page number after \maketitle
\let\origps@chapter\ps@chapter
\preto\frontmatter{\let\ps@chapter\ps@empty\pagestyle{empty}}
\preto\mainmatter{%
  \cleardoublepage
  \let\ps@chapter\origps@chapter\pagestyle{mystyle}}
\makeatother

\begin{document}

\chapter{First Chapter}

\lipsum[1-10]

\chapter{Second Chapter}

I want to suppress the header for every page in this chapter.

\lipsum[1-10]

\end{document}
share|improve this question
2  
make a new pagestyle that does the exact same thing in the footer, and just don't tell that pagestyle to do anything in the header. I.e., use \makeoddfoot{<name>}{}{}{} and \makeevenfoot{<name>}{}{}{}, but don't use any \make*head commands. –  jon Apr 30 '12 at 19:57
add comment

1 Answer

up vote 5 down vote accepted

Add \pagestyle{plain} immediately after \chapter{Second Chapter}. You don't need to add \thispagestyle{plain} as this is (by default) done automatically by \chapter. (You do modify this behaviour for \frontmatter in your example, but switch back to the default chapter page style for \mainmatter. )

share|improve this answer
add comment

Your Answer

 
discard

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.