2

I'm using memoir, when I use \chapter* the header is copied from the previous section.

How can I fix that?

MWE:

\documentclass{memoir}

\usepackage{lipsum}
\setcounter{secnumdepth}{3}

\copypagestyle{ruledsmallhd}{ruled}
\makeevenhead{ruledsmallhd}{\footnotesize\scshape\leftmark}{}{}
\makeoddhead{ruledsmallhd}{}{}{\footnotesize\scshape\rightmark}
\makeheadrule{ruledsmallhd}{0px}{0px}

\begin{document}

\pagenumbering{roman}
\pagestyle{ruledsmallhd}

\cleardoublepage
\maxtocdepth{subsection}
\tableofcontents

\cleardoublepage
\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}

\lipsum

\end{document}
5
  • Does your Introduction have Roman page numbers?
    – egreg
    Feb 24, 2014 at 10:09
  • 1
    Why don't you use \frontmatter and \mainmatter. Is there any reason why the Introduction should not be in the TOC? Using \frontmatter disables numbering and `\chapter{Introduction} will be in the ToC automatically, no need for tricks
    – daleif
    Feb 24, 2014 at 10:17
  • @egreg: I don't know, should it? :) Feb 24, 2014 at 11:25
  • @AymanElmasry My suggestion is that it should simply be a numbered chapter in the main matter.
    – egreg
    Feb 24, 2014 at 11:28
  • @daleif I understand now, this would have been useful if I wanted an unnumbered chapter in the main matter. \frontmatter \mainmatter works just fine in this particular case. Feb 24, 2014 at 11:36

1 Answer 1

2

There's no need of any special trick:

\documentclass{memoir}

\usepackage{lipsum}
\setcounter{secnumdepth}{3}

\copypagestyle{ruledsmallhd}{ruled}
\makeevenhead{ruledsmallhd}{\footnotesize\scshape\leftmark}{}{}
\makeoddhead{ruledsmallhd}{}{}{\footnotesize\scshape\rightmark}
\makeheadrule{ruledsmallhd}{0pt}{0pt}

\begin{document}
\frontmatter
\pagestyle{ruledsmallhd}

\cleardoublepage
\maxtocdepth{subsection}
\tableofcontents

\chapter{Introduction}

\lipsum

\mainmatter

\chapter{Let the fun begin}

\lipsum

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .