장 제목 번호 앞에 키워드 장을 추가하고 싶습니다. 나는 다음 템플릿을 사용하고 있습니다.명제. 예를 들어, 첫 번째 장은 테스트입니다. \chapter{test}
다음 헤더는 "1 Test"입니다. 변경하려는 헤더는 "Chapter 1: Test"와 같이 만들고 다음은 변경될 코드라고 생각합니다(CLS 파일의 위의 템플릿):
% Simple interface for the user to customize the chapter titles
\ProvideDocumentCommand{\abovechapterskip}{}{\vspace*{20pt}}
\ProvideDocumentCommand{\chapterbelowskip}{}{\vspace*{40pt}}
\ProvideDocumentCommand{\chapterinbetweenskip}{}{\vspace*{20pt}}
\ProvideDocumentCommand{\autodot}{}{}
\ProvideDocumentCommand{\mdtChapapp}{}{}
\ProvideDocumentCommand{\chapteralign}{}{\raggedright}
\ProvideDocumentCommand{\chapterfont}{}{\Huge\bfseries}
\ProvideDocumentCommand{\chapterprefixfont}{}{\LARGE\bfseries}
\DeclareDocumentCommand{\@makechapterhead}{ m }{%
\abovechapterskip
{\parindent \z@ \chapteralign \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\ifbool{chapteroneline}{%
\chapterfont \mdtChapapp\thechapter\autodot\enspace
}{%
\chapterprefixfont \@chapapp\space \thechapter
\par\nobreak
\chapterinbetweenskip
}%
\fi
\fi
\interlinepenalty\@M%
\chapterfont #1\par\nobreak
\chapterbelowskip
}
\thispagestyle{\chapter@p@gestyle}
}
\def\@makeschapterhead#1{%
\abovechapterskip
{\parindent \z@ \chapteralign
\normalfont
\interlinepenalty\@M
\chapterfont #1\par\nobreak
\chapterbelowskip
}
\thispagestyle{\chapter@p@gestyle}
}
% Addchap provides unnumbered chapters with an entry in the table of contents as well as an updated header
\ProvideDocumentCommand{\addchap}{ s o m }{%
\chapter*{#3}%
\markboth{}{}%
\IfBooleanTF{#1}{%
}{%
\IfNoValueTF{#2}{%
\addchaptertocentry{#3}%
\markboth{\MakeMarkcase{#3}}{\MakeMarkcase{#3}}%
}{%
\addchaptertocentry{#2}%
\markboth{\MakeMarkcase{#2}}{\MakeMarkcase{#2}}%
}%
}%
}%
\ProvideDocumentCommand{\addsec}{ s o m }{%
\section*{#3}%
\markright{}%
\IfBooleanTF{#1}{%
}{%
\IfNoValueTF{#2}{%
\addcontentsline{toc}{section}{#3}%
\markright{\MakeMarkcase{#3}}%%
}{%
\addcontentsline{toc}{section}{#2}%
\markright{\MakeMarkcase{#2}}%
}%
}%
}%
답변1
해결책은 댓글 chapterinoneline
옵션 이었습니다