回忆录:目录中的标题与前言章节中的标题相同

回忆录:目录中的标题与前言章节中的标题相同

我想在目录中使用与前言章节相同的页眉和页脚方案。也就是说,目录的第一页没有页眉,然后在页眉中以全小写字母显示章节标题(“目录”)。(在下面的示例中,目录页眉以全大写字母显示章节标题。)

\documentclass[a5paper]{memoir}
\usepackage{blindtext}
\aliaspagestyle{part}{empty}
\makeevenfoot{plain}{}{\textsc{\thepage}}{}
\makeoddfoot{plain}{}{\textsc{\thepage}}{}

\copypagestyle{main}{plain}
\makeevenhead{main}{}{\MakeLowercase{\scshape \rightmark}}{}
\makeoddhead{main}{}{\MakeLowercase{\scshape \leftmark}}{}
\renewcommand{\chaptermark}[1]{\markboth{#1}{\chaptername\ \thechapter}}
\copypagestyle{front}{main}
\makeevenhead{front}{}{\MakeLowercase{\scshape \leftmark}}{}
\pagestyle{main}

\begin{document}
  \frontmatter
  \pagestyle{front}
  \tableofcontents*
  \clearpage
  \chapter{An unnumbered chapter}
  \Blindtext[4]
  \mainmatter
  \pagestyle{main}
  \chapter{A numbered chapter}
  \Blindtext[4]
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
\end{document}

到目前为止我最好的尝试是设置

\renewcommand{\tocmark}[1]{\markboth{\contentsname}{\contentsname}}

然后像这样编写前言部分:

\frontmatter
\pagestyle{front}
\thispagestyle{plain}
\tableofcontents*
\clearpage
\chapter{An unnumbered chapter}
\Blindtext[4]

但是,虽然页眉和页脚看起来符合要求,但这会使目录第一页的标题变成一个奇怪的“Contentschapter”。

答案1

\def\tocmark{\markboth{\contentsname}{}}如果您添加序言,事情看起来就会符合要求。

\documentclass[a5paper]{memoir}
\usepackage{blindtext}
\aliaspagestyle{part}{empty}
\makeevenfoot{plain}{}{\textsc{\thepage}}{}
\makeoddfoot{plain}{}{\textsc{\thepage}}{}

\copypagestyle{main}{plain}
\makeevenhead{main}{}{\MakeLowercase{\scshape \rightmark}}{}
\makeoddhead{main}{}{\MakeLowercase{\scshape \leftmark}}{}
\renewcommand{\chaptermark}[1]{\markboth{#1}{\chaptername\ \thechapter}}
\copypagestyle{front}{main}
\makeevenhead{front}{}{\MakeLowercase{\scshape \leftmark}}{}
\def\tocmark{\markboth{\contentsname}{}}% This is added
\pagestyle{main}

\begin{document}
  \frontmatter
  \pagestyle{front}
  \tableofcontents*
  \clearpage
  \chapter{An unnumbered chapter}
  \Blindtext[4]
  \mainmatter
  \pagestyle{main}
  \chapter{A numbered chapter}
  \Blindtext[4]
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
  \chapter{More chapters to make table of contents stretch over three pages}
\end{document}

相关内容