我很着急,我真的需要知道如何在memoir
课堂上设置页面样式。页面样式中的所有示例(例如规则、空白、标题和纯文本)都不能提供我需要的组合。纯文本样式是最接近的,因为它提供底部居中的页码,但没有页眉。我需要每页底部居中的页眉和页码。
有人可以给我解决方案吗?
答案1
这是一个非常简单的模板全部页眉和页脚memoir
. 它几乎逐字逐句地取自memoir
文档(部分7.3 制作页眉和页脚):
\documentclass{memoir}
\usepackage{lipsum}
\makepagestyle{hurried}% Create hurried page style
\makeevenfoot{hurried}% Adjust even footer for hurried page style
{LEF}% Left even footer
{CEF}% Center even footer
{REF}% Right even footer
\makeevenhead{hurried}% Adjust even header for hurried page style
{LEH}% Left even header
{CEH}% Center even header
{REH}% Right even header
\makeoddfoot{hurried}% Adjust odd footer for hurried page style
{LOF}% Left odd footer
{COF}% Center odd footer
{ROF}% Right odd footer
\makeoddhead{hurried}% Adjust odd header for hurried page style
{LOH}% Left odd header
{COH}% Center odd header
{ROH}% Right odd header
\makeheadrule{hurried}{\textwidth}{.4pt}% Header rule width/thickness for hurried page style
\makefootrule{hurried}{\textwidth}{.4pt}{\footruleskip}% Footer rule width/thickness/skip for hurried page style
\pagestyle{hurried}% Set page style to hurried
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter{A chapter}\lipsum[1-10]
\section{A section}\lipsum[1-10]
\subsection{A subsection}\lipsum[1-10]
\subsubsection{A subsubsection}\lipsum[1-10]
\end{document}
如果你不想太奢侈和刻板一切,您可以\copypagestyle
从现有的(例如,,,Ruled
...任何在第节中提到的ruled
plain
7.2 页面样式)。
请注意,章节的第一页memoir
是在页面样式中设置的chapter
。chapter
不是真正的页面样式,而是 的别名plain
。如果您希望更改它,请先\copypagestyle{chapter}{plain}
创建chapter
真正的页面样式,然后使用上述技巧。例如,要获取第一章页面中心的页码,请使用
\copypagestyle{chapter}{plain}% Copy plain page syle to chapter page style
\makeoddfoot{chapter}% Adjust odd footer for chapter page style
{}% Left odd footer
{\thepage}% Center odd footer
{}% Right odd footer