我希望标题是各个章节的作者而不是它的作者\chaptermark
,就像下面显示的图片一样:
这是我的代码:
\documentclass[12pt,twoside,openright]{memoir}
\usepackage[T1]{fontenc}
\usepackage{lipsum,suffix,fbb}
\makeatletter
\makepsmarks{headings}{%
\def\chaptermark##1{%
\markboth{\MakeLowercase{%
\ifnum\c@secnumdepth > \m@ne
\if@mainmatter
{\scshape\@chapapp}\ {\oldstylenums{\thechapter}}. \ %
\fi
\fi
{\scshape ##1}}}{}}}
\newcommand{\printchapterauthor}[1]{%
{\parindent0pt\vspace*{-25pt}%
\linespread{1.1}\large\scshape#1%
\par\nobreak\vspace*{35pt}}
\@afterheading%
}
\newcommand{\authortoc}[1]{%
\addtocontents{toc}{\vskip-10pt}%
\addtocontents{toc}{%
\protect\contentsline{chapter}%
{\hskip1.5em\mdseries\scshape\protect\scriptsize\normalsize#1}{}{}}
\addtocontents{toc}{\vskip0pt}%
}
\makeatother
\newcommand\chapterauthor[1]{\authortoc{#1}\printchapterauthor{#1}}
\WithSuffix\newcommand\chapterauthor*[1]{\printchapterauthor{#1}}
\pagestyle{headings}
\makeevenhead{headings}{\oldstylenums{\thepage}}{\textsc{seminar iv}}{}
\makeoddhead{headings}{}{\leftmark}{\oldstylenums{\thepage}}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\pagestyle{headings}
\chapter{Introduction}
\chapterauthor{bertrand einstein}
\lipsum[1-10]
\end{document}
我尝试将 改为%\def\chaptermark##1{%
。\def\printchapterauthor##1{%
成功了。标题现在显示为我想要的样子。不幸的是,每个章节页面中的作者姓名突然消失了。请原谅我的无知,因为我刚接触 LaTeX。