\documentclass[a4paper, article openright, twoside]{memoir}
\usepackage{lipsum}
\makepagestyle{mystyle}
\makeevenhead{mystyle}{}{}{}
\makeoddhead{mystyle}{}{}{}
\makeoddfoot{mystyle}{}{Foot}{\thepage}
\makeevenfoot{mystyle}{}{Foot}{\thepage}
\makechapterstyle{mychap}{
\renewcommand{\chapternamenum}{}
\renewcommand{\chaptitlefont}{\bfseries \fontsize{14}{10.8}}
\renewcommand{\chapnamefont}{\chaptitlefont}
\renewcommand{\chapnumfont}{\chaptitlefont}
\renewcommand*{\printchaptertitle}{\chaptitlefont{}}
\renewcommand*{\printchaptername}{\chapnamefont{}}
\renewcommand*{\printchapternum}{\chapnumfont\thechapter\quad}
\renewcommand*{\afterchapternum}{--\quad}
\renewcommand*{\thechapter}{\arabic{chapter}}
\renewcommand\afterchaptertitle{\par\nobreak\bigskip}
\setlength\beforechapskip{4.5ex plus -.5ex minus -.2ex}
}
%
\begin{document}
%
\chapterstyle{mychap}%\sectionstyle{body}
%
\pagestyle{mystyle}
%
\chapter{CHAP 1}
\lipsum[1-4]
\section{SEC1}
\lipsum[1-9]
\chapter{CHAP 2}
\lipsum[1-9]
\end{document}
答案1
该类在初始章节页面上memoir
使用chapter
页面样式。这是页面样式的别名plain
,因此我们首先需要将其设为独立的页面样式,然后定义其功能。
\documentclass[a4paper, openright, twoside]{memoir}
\usepackage{lipsum}
\makepagestyle{mystyle}
\makeevenhead{mystyle}{}{}{}
\makeoddhead{mystyle}{}{}{}
\makeoddfoot{mystyle}{}{Foot}{\thepage}
\makeevenfoot{mystyle}{}{Foot}{\thepage}
\copypagestyle{chapter}{mystyle}
\makechapterstyle{mychap}{
\renewcommand{\chapternamenum}{}
\renewcommand{\chaptitlefont}{\bfseries \fontsize{14}{10.8}}
\renewcommand{\chapnamefont}{\chaptitlefont}
\renewcommand{\chapnumfont}{\chaptitlefont}
\renewcommand*{\printchaptertitle}{\chaptitlefont{}}
\renewcommand*{\printchaptername}{\chapnamefont{}}
\renewcommand*{\printchapternum}{\chapnumfont\thechapter\quad}
\renewcommand*{\afterchapternum}{--\quad}
\renewcommand*{\thechapter}{\arabic{chapter}}
\renewcommand\afterchaptertitle{\par\nobreak\bigskip}
\setlength\beforechapskip{4.5ex plus -.5ex minus -.2ex}
}
\chapterstyle{mychap}
%\sectionstyle{body}
\pagestyle{mystyle}
\begin{document}
\chapter{CHAP 1}
\lipsum[1-4]
\section{SEC1}
\lipsum[1-9]
\chapter{CHAP 2}
\lipsum[1-9]
\end{document}
由于您没有标题,因此这样做可能会更简单
\copypagestyle{chapter}{mystyle}
所以不需要进一步调整。不过,我认为最好还是将它们分开。
全局章节和页面样式的声明应该放在文档序言中。
答案2
尝试重新定义plain
页面样式如下:
\documentclass[a4paper, article, openright, twoside]{memoir}
\usepackage{lipsum}
\makepagestyle{mystyle}
\makeevenhead{mystyle}{}{}{}
\makeoddhead{mystyle}{}{}{}
\makeoddfoot{mystyle}{}{Foot}{\thepage}
\makeevenfoot{mystyle}{}{Foot}{\thepage}
\makechapterstyle{mychap}{
\renewcommand{\chapternamenum}{}
\renewcommand{\chaptitlefont}{\bfseries \fontsize{14}{10.8}}
\renewcommand{\chapnamefont}{\chaptitlefont}
\renewcommand{\chapnumfont}{\chaptitlefont}
\renewcommand*{\printchaptertitle}{\chaptitlefont{}}
\renewcommand*{\printchaptername}{\chapnamefont{}}
\renewcommand*{\printchapternum}{\chapnumfont\thechapter\quad}
\renewcommand*{\afterchapternum}{--\quad}
\renewcommand*{\thechapter}{\arabic{chapter}}
\renewcommand\afterchaptertitle{\par\nobreak\bigskip}
\setlength\beforechapskip{4.5ex plus -.5ex minus -.2ex}
}
%
\makepagestyle{plain}
\makeevenhead{plain}{}{}{}
\makeoddhead{plain}{}{}{}
\makeoddfoot{plain}{}{Foot}{\thepage}
\makeevenfoot{plain}{}{Foot}{\thepage}
\begin{document}
%
\chapterstyle{mychap}%\sectionstyle{body}
%
\pagestyle{mystyle}
%
\chapter{CHAP 1}
\lipsum[1-4]
\section{SEC1}
\lipsum[1-9]
\chapter{CHAP 2}
\lipsum[1-9]
\end{document}
您的示例中的“问题”是章节将页面样式重新定义plain
为当前页面...因此,如果您不想要这种行为,则必须重新定义它。