![ToC 헤더는 다음 장에 나타납니다.](https://rvso.com/image/391712/ToC%20%ED%97%A4%EB%8D%94%EB%8A%94%20%EB%8B%A4%EC%9D%8C%20%EC%9E%A5%EC%97%90%20%EB%82%98%ED%83%80%EB%82%A9%EB%8B%88%EB%8B%A4..png)
목차를 포함하고 싶은 문서를 작성 중이고 그 후에 프롤로그를 작성하겠습니다.
문제는 다음 이미지에 표시된 것처럼 장의 두 번째 페이지에 ToC 헤더가 있다는 것입니다.
적절한 헤더를 추가하는 방법에 대한 아이디어가 있습니까?
샘플 코드는 다음과 같습니다
\documentclass{book}
\usepackage[Conny]{fncychap}%Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
\UCTfalse
\usepackage{blindtext}
\begin{document}
\tableofcontents
\chapter*{Prologue}
\blindtext[5]
\end{document}
답변1
장 이름을 억제하면 \chapter*{}
헤더가 업데이트되지 않습니다. 를 추가하여 변경할 수 있습니다 \markboth{Prologue}{}
.
\documentclass{book}
\usepackage[Conny]{fncychap}%Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
\UCTfalse
\usepackage{blindtext}
\begin{document}
\tableofcontents
\chapter*{Prologue}
\addcontentsline{toc}{chapter}{Prologue} % if you want to add the Prologue to TOC
\markboth{Prologue}{} % to change the header despite \chapter*{} command
\blindtext[5]
\end{document}
도움이 되었기를 바랍니다 :)
*
편집: TOC 바로 뒤가 아니라 헤더를 변경하려면 으로 표시하지 않는 모든 장에 대해 이 작업을 수행해야 합니다 .
답변2
\frontmatter
, \mainmatter
및 명령을 사용할 수 있으며 다음 명령 을 사용하여 \backmatter
전체 머리말을 "그룹"( \begingroup
및 \endgroup
명령) 안에 배치할 수 있습니다 .\pagestyle{plain}
\frontmatter
\documentclass{book}
\usepackage[Conny]{fncychap}%Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
\UCTfalse
\usepackage{blindtext}
\title{Test}
\begin{document}
\maketitle
\begingroup
\pagestyle{plain}
\frontmatter
\tableofcontents
\chapter*{Prologue}
\blindtext[5]
\endgroup
\mainmatter
\chapter{Introduction}
\blindtext[5]
\backmatter
\appendix
\chapter{App1}
\blindtext[5]
\end{document}
위 코드의 결과에서 머리글과 바닥글을 확인하여 모든 것이 예상한 대로인지 확인하세요.