# Re: recent problem with TOC creation | hyperref

OK, you said that chapter 0 was causing the problem. and you gave one
line from it. I tried to make a complete minimal example below, but I
get different messages. I added \usepackage{fancyhdr} because the
\fancy stuff wasn't working. I got a warning about a font and a
footskip, but I'm not concerned about that.

I removed the \markboth{} command from the chapter. That command is
already run from within the \chapter command, and it might be causing
some problems by effectively putting a \markboth
inside another markboth????? If you want to change the headers, you
might want to try an override on the \chapter command to use a
modified \markboth (I'll look at this later).

Perhaps the error that you got was interaction between the \markboth
issue and subsequent text not shown ???? I don't know.

\documentclass{memoir}%vvvv assumed that you were using memoir
% include all the basic preamble settings...
\usepackage[ps2pdf]{thumbpdf}
\usepackage[ps2pdf,bookmarks=true,bookmarksnumbered=true]{hyperref}

% now set up microtyping...
\usepackage{ifpdf}
\ifpdf\usepackage[protrusion=true,expansion,tracking,kerning]
{microtype}%
\else\usepackage[tracking,kerning,spacing]{microtype}\fi

\begin{document}

% use following to set chapter number for individual chapters
% use n-1 for chapter n
\setcounter{chapter}{0}

\small\tableofcontents

\frontmatter
%
% vvv removed the \markboth
%\chapter{\sffamily\LARGE \textbf{Foreword}\markboth{Foreword}{}}
\chapter{\sffamily\LARGE \textbf{Foreword}}
hello
\newpage
second page of forward is missing?
%
\mainmatter
hello. this is main matter
\backmatter{}
hello this is backmatter
% make first page number 1 for index
\setcounter{page}{1}

\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\fancyfoot[R]{} % date in lower right
\fancyfoot[L]{}