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.

How do I clear the \tableofcontents page in memoir?

\documentclass[a4paper]{memoir}
\begin{document}
\pagestyle{headings}
\begin{titlingpage}
  \maketitle
\end{titlingpage}

% i need clear this page
{\thispagestyle{empty} %but is not work
\tableofcontents}

\chapter{Memoir com Estilo de Página}

\end{document}
share|improve this question
    
This source (nw360.blogspot.com/2007/10/creat-empty-page-in-latex.html) recommends writing \mbox{} after \thispagestyle{empty}. –  jamaicanworm Dec 18 '11 at 17:41
add comment

1 Answer

up vote 2 down vote accepted

memoir provides ToC hooks (\cfttocbeforelisthook and \cfttocafterlisthook) that could be modified to adjust the page style headings:

\documentclass[a4paper]{memoir}% http://ctan.org/pkg/memoir
\title{My title}
\begin{document}
\begin{titlingpage}
  \maketitle
\end{titlingpage}
\makeatletter
\renewcommand{\cfttocbeforelisthook}{\pagestyle{empty}\let\ps@plain\ps@empty}
\renewcommand{\cfttocafterlisthook}{\cleardoublepage\pagestyle{headings}}
\makeatother

\tableofcontents

\chapter{Memoir com Estilo de Página}

\end{document}

The above sets the page style to empty and also copies the empty page style into the plain page style, since this is used as the first page for \tableofcontents (like all chapters). At the end of the ToC, \cleardoublepage flushes all pages and resets the page style to headings.

share|improve this answer
    
Thanks Werner, and its work in others class, example, book, report? –  Regis da Silva Dec 19 '11 at 2:16
    
@RegisdaSilva: Are you asking or saying? –  Werner Dec 19 '11 at 2:24
    
asking..................... –  Regis da Silva Dec 19 '11 at 3:16
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.