KOMA-Script 允许许多自定义,但我不知道从哪里开始addmargin
在章节头部添加一些额外的水平空间(通过)。它类似于问题这里,但是这指的是memoir
。
基本上,我希望章节标题使用整个可用宽度(\textwidth+\marginparsep+\marginparwidth
),而不是像下图这样排版。我该如何实现这一点(最好采用 KOMA 方式)?
\documentclass[twoside=semi]{scrreprt}
\usepackage[a4paper,left=24.8mm,top=27.4mm,headsep=2\baselineskip,textwidth=107mm,marginparsep=8.2mm,marginparwidth=49.4mm,%
textheight=49\baselineskip,headheight=\baselineskip,asymmetric]{geometry}%
\usepackage{showframe} % for demonstration
\begin{document}
\chapter{Test with a very very very long title}
\end{document}
答案1
您可以重新定义\chapterlinesformat
:
\documentclass[twoside=semi]{scrreprt}
\usepackage[a4paper,left=24.8mm,top=27.4mm,headsep=2\baselineskip,textwidth=107mm,marginparsep=8.2mm,marginparwidth=49.4mm,%
textheight=49\baselineskip,headheight=\baselineskip,asymmetric]{geometry}%
\usepackage{showframe} % for demonstration
\usepackage{lipsum}% for demonstration
\makeatletter
\renewcommand*{\chapterlinesformat}[3]{%
\makebox[\textwidth][l]{% avoid overfull \hbox
\parbox[t]{\dimexpr\textwidth+\marginparsep+\marginparwidth}{% use more width
\raggedchapter
\@hangfrom{#2}{#3}%
}%
}%
}
\makeatother
\begin{document}
\chapter{Test with a very very very long title}
\lipsum
\end{document}