我正在使用scrbook
文档类。我想更改附录如图所示这里. 除了单词之外,它工作得很好章节在黑色矩形中\appendix
。如何将单词更改为附录因此?
答案1
替换\chaptername
为\chapapp
并添加选项numbers=noenddot
.¹
例子:
\documentclass[numbers=noenddot]{scrbook}% <- changed
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{charter}
\definecolor{mybluei}{RGB}{28,138,207}
\definecolor{myblueii}{RGB}{131,197,231}
\addtokomafont{disposition}{\usefont{T1}{qhv}{b}{n}\selectfont\color{myblueii}}
\addtokomafont{chapter}{\fontsize{30pt}{30pt}\selectfont}
\newkomafont{chapternumber}{\fontsize{50}{120}\selectfont\color{white}}
\newkomafont{chaptername}{\itshape\rmfamily\small\color{white}}
\addtokomafont{section}{\fontsize{14pt}{14pt}\selectfont}
\newkomafont{sectionnumber}{\fontsize{18pt}{18pt}\selectfont\rmfamily\color{white}}
\addtokomafont{subsection}{\fontsize{12pt}{12pt}\selectfont}
\newkomafont{subsectionnumber}{\fontsize{16pt}{16pt}\selectfont\rmfamily\color{white}}
\renewcommand\chapterformat{%
\raisebox{-6pt}{\colorbox{mybluei}{%
\parbox[b][60pt]{45pt}{\centering%
{\usekomafont{chaptername}{\chapapp}}% <- changed
\vfill{\usekomafont{chapternumber}{\thechapter}}% <- changed
\vspace{6pt}%
}}}\enskip}
\renewcommand\sectionformat{%
\setlength\fboxsep{5pt}%
\raisebox{-4pt}{\colorbox{mybluei}{%
\enskip\usekomafont{sectionnumber}{\thesection\autodot}\enskip}%
\quad%
}}
\renewcommand\subsectionformat{%
\setlength\fboxsep{5pt}%
\raisebox{-4pt}{\colorbox{mybluei}{%
\enskip\usekomafont{subsectionnumber}{\thesubsection\autodot}\enskip}%
\quad%
}}
\makeatletter
\renewcommand\sectionlinesformat[4]{%
\makebox[0pt][l]{\rule[-5pt]{\textwidth}{1pt}}%
\@hangfrom{#3}{#4}%
}
\makeatother
\usepackage{blindtext}% only for dummy text
\begin{document}
\tableofcontents
\chapter{Chapter Title}
\section{Section Title}
\blindtext
\addsec{Unnumbered Section Title}
\blindtext
\subsection{Subsection Title}
\blindtext
\subsubsection{Subsubsection Title}
\blindtext
\blinddocument
\appendix% <- added
\chapter{Appendix Chapter Title}
\blindtext
\end{document}
¹请注意,我也更改了我的链接答案。