我一直在尝试让makeheadrule
和makefootrule
指令在类文档中发挥作用memoir
。这是一个 MWE
\documentclass[10pt]{memoir}
\usepackage{lipsum}
\copypagestyle{memoirStylePages}{headings}
\makerunningwidth{memoirStylePages}{\textwidth}
\makeheadrule{memoirStylePages}{\textwidth}{\normalrulethickness}
\makefootrule{memoirStylePages}{\textwidth}{\normalrulethickness}{}
\nouppercaseheads
\makeevenhead{memoirStylePages}{\thepage}{}{}
\makeoddhead{memoirStylePages}{}{}{\itshape\leftmark}
\makeevenfoot{memoirStylePages}{}{}{}
\makeoddfoot{memoirStylePages}{}{}{}
\makepsmarks{memoirStylePages}{%
\createmark{chapter}{left}{nonumber}{}{}
}
\pagestyle{memoirStylePages}
\begin{document}
\chapter{A chapter}
\section{A section}
\lipsum[1-10]
\end{document}
我无法理解为什么会出现这些错误。
答案1
的最后一个参数makefootrule
不能为空。因此使用:
\makefootrule{memoirStylePages}{\textwidth}{\normalrulethickness}{0pt}
该命令\makefootrule
的语法如下:
\makefootrule{ style }{ width }{ thickness }{ skip }
\footskip
指定在样式页面样式的页脚上方绘制的规则的宽度和厚度(参见 )。
这是您修改后的 MWE:
\documentclass[10pt]{memoir}
\usepackage{lipsum}
\copypagestyle{memoirStylePages}{headings}
\makerunningwidth{memoirStylePages}{\textwidth}
\makeheadrule{memoirStylePages}{\textwidth}{\normalrulethickness}
\makefootrule{memoirStylePages}{\textwidth}{\normalrulethickness}{0pt}
\nouppercaseheads
\makeevenhead{memoirStylePages}{\thepage}{}{}
\makeoddhead{memoirStylePages}{}{}{\itshape\leftmark}
\makeevenfoot{memoirStylePages}{}{}{}
\makeoddfoot{memoirStylePages}{}{}{}
\makepsmarks{memoirStylePages}{%
\createmark{chapter}{left}{nonumber}{}{}
}
\pagestyle{memoirStylePages}
\begin{document}
\chapter{A chapter}
\section{A section}
\lipsum[1-10]
\end{document}