我正在使用 koma-sciript 类。基于如何在 KOMA 脚本中将章节编号放在章节标题后面
我已经创建:
\makeatletter
\renewcommand\chapterlinesformat[3]{%
\ifstr{#1}{chapter}
{\hfill\makebox[0pt][r]{#2}\makebox[0.5\textwidth][l]{\parbox[b]{0.5\textwidth}{#3}}}%
{\@hangfrom{#3}{#2}}% original definition for other commands with style=chapter
}
\makeatother
我是否应该将章节号和章节标题放在单独的小页面中?如果是,应该怎样做?
答案1
你可以使用
\documentclass{scrbook}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\renewcommand*\familydefault{\sfdefault}
\makeatletter
\renewcommand\chapterlinesformat[3]{%
\ifstr{#1}{chapter}
{\hfill{\upshape#2}\parbox[b]{0.5\textwidth}{\raggedchapter #3}}%
{\@hangfrom{#2}{#3}}% original definition for other commands with style=chapter
}
\makeatother
\addtokomafont{chapter}{\slshape}
\usepackage{lipsum}
\begin{document}
\chapter{Short title}
\lipsum[1-2]
\chapter{Long, long, long chapter title}
\lipsum[1-2]
\end{document}
结果: