使用该类scrbook
,如何将章节标题放在章节编号下?这是一个 MWE
\documentclass{scrbook}
\usepackage{xcolor, graphicx}
\usepackage[showframe]{geometry}
\definecolor{chaptergrey}{rgb}{0.7,0.7,0.7}
\let\raggedchapter\raggedleft
\addtokomafont{disposition}{\normalfont}
\setkomafont{chapter}{\LARGE}
\renewcommand*{\chapterformat}{%
\scalebox{5}{\color{chaptergrey}\thechapter}%
}
\begin{document}
\chapter{A chapter}
\end{document}
相应的输出是
我想要的是这样的
一旦我能做到这一点,我该如何改变两者之间的垂直空间?
编辑:
\documentclass[chapterprefix]{scrbook}
\usepackage{xcolor, graphicx}
\definecolor{chaptergrey}{rgb}{0.7,0.7,0.7}
\let\raggedchapter\raggedleft
\addtokomafont{disposition}{\normalfont}
\setkomafont{chapter}{\LARGE}
\renewcommand*{\chapterformat}{%
\scalebox{5}{\color{chaptergrey}\thechapter}%
}
%\makeatletter
%\renewcommand{\@chapapp}{}
%\makeatother
\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\fancypagestyle{theorems}{
\renewcommand{\chaptermark}[1]{\markboth{##1}{}}
\fancyhead[LO, RE]{\itshape\nouppercase\leftmark}
\fancyhead[LE, RO]{\thepage}
\fancyfoot{}}
\pagestyle{theorems}
\begin{document}
\tableofcontents
\chapter{A chapter}
\newpage
a
\end{document}
对应标题
答案1
chapterprefix
如果您想要一个带有前缀行的章节标题,并且仅包含格式化的数字,则可以使用选项:
\documentclass[chapterprefix]{scrbook}
\usepackage{xcolor, graphicx}
\usepackage[showframe]{geometry}
\definecolor{chaptergrey}{rgb}{0.7,0.7,0.7}
\let\raggedchapter\raggedleft
\addtokomafont{disposition}{\normalfont}
\setkomafont{chapter}{\LARGE}
\renewcommand*{\chapterformat}{%
\scalebox{5}{\color{chaptergrey}\thechapter}%
}
\renewcommand*{\chaptermarkformat}{\thechapter\autodot\enskip}% If you don't want the chapter name in the running head.
\begin{document}
\chapter{A chapter}
\end{document}
已经有类似章节标题的例子,例如:
请避免fancyhdr
与 KOMA-Script 类一起使用。正如警告消息所告诉您的,使用fancyhdr
会破坏 KOMA-Script 类的几个功能。请scrlayer-scrpage
改用。如果您希望运行头与内边距对齐,页码与外边距对齐,并且运行头中的章节标题不应有章节号,则可以使用:
\renewcommand*{\chaptermarkformat}{}% If you want running heads without
% chapter number.
\usepackage[automark]{scrlayer-scrpage}
\clearpairofpagestyles
\ihead*{\pagemark}% page number also on plain pages
\ohead{\headmark}