如何在空白页上添加章节标题和页码?

如何在空白页上添加章节标题和页码?

我正在编写一份报告,其中一章末尾有一个空白页。空白页在页面顶部包含当前章节标题和页码,如下所示:

空白页

我该如何实现这个?

答案1

如果章节的最后一页结束于右页(奇数页),则这是bookwith的默认值(默认):twoside

\documentclass{book}

\usepackage{blindtext}% used for demonstration only

\begin{document}
\chapter{This is the first chapter}
\blindtext% used for demonstration only

\chapter{This is the second chapter}
\blindtext% used for demonstration only

\blinddocument% used for demonstration only
% Here we will not have a blank page, because the chapter ends on left (even) side
\blinddocument% used for demonstration only
\end{document}

或者对于report具有明确twosideopenright页面样式的headings

\documentclass[twoside,openright]{report}% options needed for the blank left pages before a new chapter on a right page

\usepackage{blindtext}% used for demonstration only
\pagestyle{headings}

\begin{document}% used for demonstration only
\chapter{This is the first chapter}
\blindtext% used for demonstration only

\chapter{This is the second chapter}
\blindtext% used for demonstration only

\blinddocument% used for demonstration only
\end{document}

对于单面文档来说这没有意义。

或者使用另一个带有类book和名为 »chap_name« 的章节的演示文件,其中包含五个部分,后面跟着一个空白页和另一个章节:

\documentclass{book}
\usepackage{lipsum}% used for demonstration only

\begin{document}
\chapter{chap\_name}
\lipsum[1]% used for demonstration only

\section{First Section}
\lipsum[2]% used for demonstration only

\section{Second Section}
\lipsum[3]% used for demonstration only

\section{Third Section}
\lipsum[4]% used for demonstration only

\section{Fourth Section}
\lipsum[5-10]% used for demonstration only

\section{Fifth Section}
Next page will be blank but with running head.

\chapter{This is the second chapter}
\lipsum[6]% used for demonstration only

\end{document}

或与类相同report

\documentclass[twoside,openright]{report}% options are need for the empty page before the second chapter
\usepackage{lipsum}% used for demonstration only

\pagestyle{headings}% needed to have automatic running heads (default of report would be page style plain that shows only page numbers)

\begin{document}
\chapter{chap\_name}
\lipsum[1]% used for demonstration only

\section{First Section}
\lipsum[2]% used for demonstration only

\section{Second Section}
\lipsum[3]% used for demonstration only

\section{Third Section}
\lipsum[4]% used for demonstration only

\section{Fourth Section}
\lipsum[5-10]% used for demonstration only

\section{Fifth Section}
Next page will be blank but with running head.

\chapter{This is the second chapter}
\lipsum[6]% used for demonstration only

\end{document}

两个结果均为(仅显示第 2-5 页):

在此处输入图片描述在此处输入图片描述

答案2

此 tex 代码显示一个带有章节标题和页码的空白页:

\documentclass[12pt,a4paper]{report}
\pagestyle{headings}

\begin{document}

\chapter{Chapter title}
Some text
\newpage\phantom{}

\chapter{Second chapter}
Some text

\end{document}

您尝试过什么但没有效果?

相关内容