在章节标题后自动插入 \newpage

在章节标题后自动插入 \newpage

我正在使用 编写一本书memoir,并且我希望每个章节的文本在章节标题后的新页面上开始(因此每个章节标题都独立于一页)。

有没有办法使这个自动化,这样我就不必\newpage在每个实例之后添加命令\chapter{}

我试过了\renewcommand{\chapter{}}{\chapter{} \newpage},但似乎不起作用......

以下是我目前的章节标题自定义的 MWE:

\documentclass{memoir}
\usepackage[american]{babel}

% Chapter headers customize
\setsecnumdepth{none}
\setlength\beforechapskip{6\baselineskip}
\renewcommand*{\chaptitlefont}{\sffamily \HUGE \bfseries}

\begin{document}
\chapter{Chapter 1}
My text.
\end{document}

答案1

您可以重新定义\afterchaptertitle

\documentclass{memoir}
\usepackage[american]{babel}

% Chapter headers customize
\setsecnumdepth{none}
\setlength\beforechapskip{6\baselineskip}
\renewcommand*{\chaptitlefont}{\sffamily \HUGE \bfseries}
\renewcommand*{\afterchaptertitle}%
    {\newpage}

\begin{document}
\chapter{Chapter 1}
 My text.
\end{document}

答案2

解决方案已经在手册的第83页:

\makeatletter
\renewcommand\memendofchapterhook{%
  \clearpage\m@mindentafterchapter\@afterheading}
\makeatother

答案3

不修改命令的快速解决方法\chapter是:

\newcommand{\mychapter}[1]{\chapter{#1} \newpage}

编辑

如果您想保留命令的可选参数的功能\chapter(目录和标题中使用的简短版本),您可以改用以下定义:

\newcommand{\mychapter}[2][]{\chapter[#1]{#2} \newpage}

相关内容