목차 페이지의 페이지 헤더 문제

목차 페이지의 페이지 헤더 문제

\usepackage내 LaTeX는 다음과 같습니다( 홀수 페이지에서 열기와 같은 많은 고급 설정을 생략했습니다 ).

\documentclass[9pt,a4paper,reqno]{amsbook}

\usepackage{fancyhdr,etoolbox}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[LO]{\nouppercase\rightmark}
\fancyhead[RE]{\nouppercase\leftmark}


\begin{document}
\frontmatter

\title{\textsc{AAAZZZ}}
\author{LZ}
\mainmatter

\pagenumbering{roman}

\maketitle

\chapter*{Abstract}
The goal of this notes is to describe...


\chapter*{Acknowledgements}
I offer my sincerest gratitude to...

\renewcommand{\contentsname}{Table of contents}
\makeatletter
\patchcmd{\@tocline}
{\hfil}
{\leaders\hbox{\,.\,}\hfil}{}{}
\makeatother
{\large {\tableofcontents}}
\addcontentsline{toc}{subsection}{Section name}
\thispagestyle{plain}

\pagenumbering{arabic}

\chapter{Preliminaries on A}

\chapter{Results on Z}

\end{document}

내 문제는 두 가지입니다.

Table of contents한 페이지만 있고 CHAPTER 1그 이후부터 바로 시작합니다. 하지만 한 페이지 나중에 시작하고 여전히 "1"("2" 아님) 번호를 매기고 싶습니다. 즉 Table of contents가상/빈 두 번째 페이지(머리글/바닥글이 없는 일반 스타일이어야 함)가 있어야 합니다. 이것을 달성하는 방법은 무엇입니까?

그리고:

목차에 내용을 추가하면 목차 2페이지의 페이지 헤더가 "Chapter 0. 목차"로 나타납니다(오른쪽, 왼쪽은 제가 원하는 페이지 번호 "viii"입니다). 유지하려면 목차 2페이지에 머리글/바닥글이 없어도 만족할까요? "목차"로만 만들 수 있는 방법이 있나요?

답변1

다음 코드 템플릿은 귀하의 모든 우려 사항을 해결하는 것으로 보입니다.

\documentclass{amsbook}

\usepackage{fancyhdr,etoolbox}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[LO]{\nouppercase\rightmark}
\fancyhead[RE]{\nouppercase\leftmark}

\renewcommand{\contentsname}{Table of contents}
\makeatletter
\patchcmd{\@tocline}
  {\hfil}
  {\leaders\hbox{\,.\,}\hfil}{}{}
\makeatother

\begin{document}

\pagestyle{plain}

\frontmatter

\title{\textsc{AAAZZZ}}
\author{LZ}

\maketitle

\chapter*{Abstract}
The goal of this notes is to describe \ldots

\chapter*{Acknowledgements}
I offer my sincerest gratitude to \ldots

\tableofcontents

\mainmatter

\cleardoublepage

\pagenumbering{arabic}
\pagestyle{fancy}

\chapter{Preliminaries on A}

\chapter{Results on Z}

\end{document}

구체적으로 다음과 같은 몇 가지 제안 사항이 있습니다.

  • \pagestyle{plain}책의 앞 부분( 직전까지)에 사용합니다 \mainmatter. 페이지 plain스타일은 바닥글의 페이지 번호만 설정합니다. 이것을 \frontmatter수행하는 작업에 추가하여 코드를 좀 더 정리할 수 있습니다 .

  • \pagestyle{fancy}책의 주요 부분(뒤)에 사용하세요 \mainmatter. 이것을 \mainmatter수행하는 작업에 추가하여 코드를 좀 더 정리할 수 있습니다 .

  • \cleardoublepageafter는 \tableofcontents페이지를 충분히 지워서 ToC 끝과 첫 번째 장의 시작 사이에 빈 페이지가 남도록 합니다(ToC가 단일 페이지인 경우).

  • 를 사용하면 페이지 번호가 1로 재설정되므로 첫 번째 페이지 앞에 페이지가 있는 경우 \pagenumbering{arabic}항상 1페이지에서 첫 번째 페이지를 시작합니다 .\chapter\chapter

관련 정보