한 페이지의 헤더 줄에 대한 장 설정

한 페이지의 헤더 줄에 대한 장 설정

\pagestyle{scrheadings}헤더에 현재 챕터 이름 을 사용하고 있습니다 . 목차에 나오지 않아야 할 장이 하나 있는데, 이것이 제가 를 사용하는 이유입니다 \chapter*{MyChapter}. 문제는 헤더에 MyChapter의 챕터 이름이 표시되지 않고 이전 챕터의 이름이 표시된다는 점입니다. 단일 페이지의 헤더에 있는 장 이름을 어떻게 변경할 수 있나요?

감사합니다

답변1

KOMA-스크립트 클래스수업 옵션을 설정할 수 있습니다

headings=optiontoheadandtoc

그런 다음 사용할 수 있습니다

\addchap[tocentry={}]{Chapter without tocentry} 

머리글에는 동일한 항목이 있지만 목차에는 항목이 없는 번호가 없는 장을 가져옵니다.

예:

\documentclass[
  headings=optiontoheadandtoc
]{scrreprt}
\usepackage[automark]{scrlayer-scrpage}
\usepackage{lipsum}% only for dummy text
\begin{document}
\tableofcontents
\chapter{First Chapter}
\lipsum
\addchap[tocentry={}]{Chapter without tocentry}
\lipsum
\chapter[Entry in header und ToC]{Another chapter}
\lipsum
\end{document}

관련 정보