我想将未编号的部分标题添加到回忆录的标题中,但 \thepart 命令只生成部分编号而不生成标题。我该如何重新定义 \thepart 命令以获得所需的结果?
\documentclass[11pt]{memoir}
\nouppercaseheads
\makepagestyle{mystyle}
\makeevenhead{mystyle}{}{\textit{Book Title}}{}
\makeoddhead{mystyle}{}{\textit{\thepart}}{}
\makeevenfoot{mystyle}{}{\thepage}{}
\makeoddfoot{mystyle}{}{\thepage}{}
\begin{document}
\pagestyle{mystyle}
\part{Part Title}
\include{Chapter1}
\include{chapter2}
\end{document}
答案1
也许是这样的?
\documentclass[11pt]{memoir}
\usepackage{lipsum}
\nouppercaseheads
\makepagestyle{mystyle}
\makeevenhead{mystyle}{}{\textit{Book Title}}{}
\makeoddhead{mystyle}{}{\rightmark}{}
\makeevenfoot{mystyle}{}{\thepage}{}
\makeoddfoot{mystyle}{}{\thepage}{}
\clearmark{chapter}
\clearmark{section}
\createmark{part}{both}{shownumber}{\partname\space}{.\space}
\begin{document}
\pagestyle{mystyle}
\tableofcontents
\part{Part Title}
\chapter{Chapter1}
\lipsum[1-30]
\chapter{chapter2}
\lipsum[1-30]
\end{document}
诀窍memoir
在于您需要使用清除旧标记\clearmark
,然后为\part
级别划分创建一个“标记”。