使用三个章节标题定义

使用三个章节标题定义

我的章节标题相当长,这在文本页面上不是问题,但在目录中则不然。因此,我使用此命令提供两个版本:

\chapter[Category\\ This is my long title]{Category -- This is my long title}

当然,这很有效 :-) 现在我的问题是,我正在使用memoir将章节标题放在每个奇数页上的包。为此,它使用为目录提供的章节标题,但我想使用另一个以避免标题栏中出现换行符。也许我可以提供三个章节标题,一个用于文本页面,一个用于目录,一个用于标题栏?!

按照我的 MWE 操作。生成的 PDF 在第 3 页和第 4 页上显示了我想避免的页面头行中的换行符。谢谢!

\documentclass[12pt,twoside,openright,a4paper,oldfontcommands]{memoir}
\usepackage{lipsum}
\usepackage{soul}
\usepackage{tikz}

\renewcommand*{\cftchapterfont}{\bfseries}
\renewcommand*{\cftchapterleader}{\bfseries\cftdotfill{\cftchapterdotsep}}
\renewcommand*{\cftchapterpagefont}{\bfseries}
\renewcommand*{\cftchaptername}{Chapter }
\renewcommand{\cftchapteraftersnum}{~|~}

\chapterstyle{madsen}
\pagestyle{companion}

\makeindex

\begin{document}

\tableofcontents*

\chapter[Category\\ This is my very long title]{Category -- This is my very long title}
\lipsum[1-2]
\section{Test ABC}
\lipsum[1-2]
\section{Test ABC}
\lipsum[1-2]
\section{Test ABC}
\lipsum[1-2]
\end{document}

答案1

好的,让我将我的评论转化为答案。回忆录是非常先进的文档类,在书籍类的许多改进中,它还提供了额外的能力来定义目录、标题和文本中章节、部分等标题的外观。因此,对于第一章可以说:

  \chapter[<toc-title>][>head-title>]{<title>}; 
  \chapter*[<head-title>]{<title>}

更多信息请参阅回忆录手册第 75 页。

相关内容