我想修改附录标题的外观。为此,我使用带有以下选项的附录包:
\documentclass[
numbers=noenddot
]{scrreprt}
\usepackage[
automark, %% Kapitelangaben in Kopfzeile automatisch erstellen
plainheadsepline, %% Linie
plainfootsepline %% Linie
]{scrpage2}
\usepackage[ngerman]{babel} %% Deutsches Sprachpaket
\usepackage[utf8]{inputenc} %% Eingabezeichensatz UTF-8
\usepackage[T1]{fontenc} %% Kodierung für Umlaute
\usepackage[
titletoc,
toc,
page,
title,
header
]
{appendix}
\addtokomafont{pageheadfoot}{\small} %% Kopfzeile klein
\setheadsepline{0.4pt} %% Kopf-Linie
\setfootsepline{0.4pt} %% Fuß-Linie
\clearscrheadfoot
\pagestyle{scrheadings}
\ihead[]{}
\chead[]{}
\ohead[\headmark]{\headmark}
\ifoot[]{}
\cfoot[\pagemark]{\pagemark}
\ofoot[]{}
\begin{document}
\tableofcontents
\clearpage
\chapter{chapter}
\begin{appendices}
\chapter{Main}
...
\chapter{Practical implementation}
...
\end{appendices}
\end{document}
但不幸的是,选项 title 和 header 似乎不起作用。它应该看起来像这样:
可能是什么原因?
答案1
\KOMAoption{chapterprefix}{true}
启动附录后使用。
\documentclass[
ngerman,
numbers=noenddot,
headsepline,
footsepline
]{scrreprt}
\usepackage[
automark,
]{scrlayer-scrpage}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{translator}
\usepackage{lmodern}
\usepackage{setspace}
\usepackage{mwepage}
\usepackage[
titletoc,
toc,
page,
title,
header
]{appendix}
\usepackage[stretch=10]{microtype}
\setkomafont{captionlabel}{\bfseries}
\addtokomafont{pageheadfoot}{\small}
\clearpairofpagestyles
\renewcommand{\chapterpagestyle}{scrheadings}
\ohead{\headmark}
\cfoot{\pagemark}
\begin{document}
\tableofcontents
\begin{appendices}
\KOMAoption{chapterprefix}{true}
\chapter{Wombat}
\chapter{Capybara}
\end{appendices}
\end{document}