빈 페이지에 장 제목과 페이지 번호를 추가하는 방법은 무엇입니까?

빈 페이지에 장 제목과 페이지 번호를 추가하는 방법은 무엇입니까?

나는 장 끝에 빈 페이지가 있는 보고서를 작성하고 있습니다. 빈 페이지에는 다음과 같이 페이지 상단에 현재 장 제목과 페이지 번호가 포함되어 있습니다.

빈 페이지

이것을 어떻게 구현할 수 있나요?

답변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또는 클래스가 포함된 다른 데모 파일 과 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

이 텍스트 코드는 장 헤더와 페이지 번호가 포함된 빈 페이지를 표시합니다.

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

\begin{document}

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

\chapter{Second chapter}
Some text

\end{document}

어떤 노력을 했는데 효과가 없었나요?

관련 정보