空白ページに章のタイトルとページ番号を追加するにはどうすればよいですか?

空白ページに章のタイトルとページ番号を追加するにはどうすればよいですか?

私は章の最後に空白ページがあるレポートを作成中です。空白ページの上部には、次のように現在の章のタイトルとページ番号が表示されます。

空白ページ

これをどのように実装できますか?

答え1

章の最後のページが右(奇数)ページで終わる場合、これはbookwith (default)のデフォルトです。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的なおよびページ スタイルを使用した場合:twosideopenrightheadings

\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または、クラスと、5 つのセクションの後に空白ページと別の章が続く「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}

何を試したがうまくいかなかったのですか?

関連情報