回忆录课中的 makeheadrule

回忆录课中的 makeheadrule

我一直在尝试让makeheadrulemakefootrule指令在类文档中发挥作用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}

相关内容