通过在序言中插入此内容来解决(由 touhami 根据评论提出):
\makeatletter \def\clearforchapter{\clearpage\if@twoside \ifodd\c@page\else \hbox{}\vfill\begin{center}This page intentionally left blank.\end{center}\vfill \thispagestyle{cleared}%
\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}\makeatother
这会将线置于空白页的中间。
我该在左侧(偶数页)空白页上写“此页故意留空。”?我搜索并找到了很多解决方案,但这些解决方案不适用于我的设置。我定制的章节从右侧(奇数页)开始。我找到但对我不起作用的解决方案:
如何制作“故意留空”的页面?
如何在 KOMA 脚本中显示“此页故意留空。”
页面中央显示“此页故意留空”
https://gist.github.com/philipptempel/5220000
我的设置是这样的(如果你好奇的话,我的笔记是丹麦语的):
前言:
\documentclass[a4paper,11pt,oldfontcommands]{memoir}
\setlrmarginsandblock{2.5cm}{1.5cm}{1}
\setulmarginsandblock{2.5cm}{*}{1}
\setheadfoot{2\onelineskip}{\footskip}
\checkandfixthelayout
\usepackage{tikz}
\usepackage{lipsum}
\usetikzlibrary{positioning}
%%%%%%
% CHAPTER STYLES
%%%%%%
\makechapterstyle{simple}{
\renewcommand*{\printchaptername}{}
\setlength{\afterchapskip}{1cm}
\renewcommand*{\printchaptertitle}[1]{\flushleft\chaptitlefont##1}
}
\makechapterstyle{box}{%
\setlength{\midchapskip}{-58pt} %
\setlength{\afterchapskip}{10mm} %
\renewcommand*{\printchaptername}{} %
\renewcommand*{\printchapternum}{ %
\flushleft
\begin{tikzpicture}
\draw [fill=black] (0,0) rectangle (2cm,2cm);
\node [text=white] at (1cm,1cm) { \chapnumfont\thechapter };
\end{tikzpicture}}%
\renewcommand{\printchaptertitle}[1]{%
\hspace*{30mm}\chaptitlefont\MakeUppercase{##1}}}
\makeatletter
\settocpreprocessor{chapter}{%
\let\tempf@rtoc\f@rtoc%
\def\f@rtoc{%
\texorpdfstring{\MakeTextUppercase{\tempf@rtoc}}{\tempf@rtoc}}%
}
\makeatother
%%%%%%
% gør at subsections også nummeres
%%%%%%
\setsecnumdepth{subsection}
\usepackage{graphicx}
\usepackage{framed}
\usepackage[danish]{babel}
%%%%%%
% PAGESTYLE
%%%%%%
\copypagestyle{chapter}{plain} %Dette kopierer "plain"-stilen, så den kan overskrives, og sætte sidetal på højre/venstre side ved kapitelstart.
\makeoddfoot{chapter}
{}% Venstre side.
{}% Midten.
{\thepage}% Højre side.
\makeevenfoot{chapter}
{\thepage}% Venstre side.
{}% Midten.
{}% Højre side.
\makepagestyle{bachelor}
\makepsmarks{bachelor}{
\createmark{chapter} {both}{shownumber}{}{. \ }
\createmark{section} {both}{shownumber}{}{ -\ }
}
\makeoddhead{bachelor}%
{}%
{}%
{\rightmark}%
\makeevenhead{bachelor}%
{\leftmark}%
{}%
{}
% sidens fod: sidetal/sidste side
\makeoddfoot{bachelor}
{} %venstre side.
{} %midten.
{\thepage} %højre side.
\makeevenfoot{bachelor}
{\thepage} %venstre side.
{} %midten.
{} %højre side.
% smid en linje under
\makeheadrule{bachelor}{\textwidth}{\normalrulethickness}
%%%% Laver pagestyle til appendiks
\makepagestyle{appendiks}
\makepsmarks{appendiks}{
\createmark{chapter} {both}{shownumber}{}{ -\ }
}
\makeoddhead{appendiks}%
{}%
{}%
{\rightmark}%
\makeevenhead{appendiks}%
{\leftmark}%
{}%
{}
\makeoddfoot{appendiks}
{} %venstre side.
{} %midten.
{\thepage} %højre side.
\makeevenfoot{appendiks}
{\thepage} %venstre side.
{} %midten.
{} %højre side.
\makeheadrule{appendiks}{\textwidth}{\normalrulethickness}
\nouppercaseheads
\pagestyle{bachelor}
%%%%%%
内容:
\begin{document}
\chapterstyle{simple}
\chapter*{Chapter guide}
Gives an overview and acts as a guide for the report.
\tableofcontents*
\chapterstyle{box}
\pagestyle{bachelor}
\chapter{First Chapter}
\lipsum
\chapterstyle{simple}
\bibliography{sources}
\chapterstyle{box}
\pagestyle{appendiks}
\appendix
\input{appendix.tex}
\end{document}
任何帮助是极大的赞赏。
答案1
通过在序言中插入此内容来解决(由 touhami 根据评论提出):
\makeatletter \def\clearforchapter{\clearpage\if@twoside \ifodd\c@page\else \hbox{}\vfill\begin{center}This page intentionally left blank.\end{center}\vfill \thispagestyle{cleared}%
\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}\makeatother
这会将线置于空白页的中间。
答案2
回忆录手册(texdoc memman
或texdoc memoir
)的第 18.13 节处理了此类问题。例如:
\chapter{One}
...
\cleartooddpage[\vspace*{\fill}\centering BLANK PAGE \vspace*{\fill}]
\chapter{Next}
如果前一页\chapter{Next}
是偶数,则会将空白页垂直和水平居中。