![设置内容列表和其他列表单倍行距](https://linux22.com/image/297831/%E8%AE%BE%E7%BD%AE%E5%86%85%E5%AE%B9%E5%88%97%E8%A1%A8%E5%92%8C%E5%85%B6%E4%BB%96%E5%88%97%E8%A1%A8%E5%8D%95%E5%80%8D%E8%A1%8C%E8%B7%9D.png)
按照 KOMA-Script 文档第 40 页的建议,我想将所有列表和标题页的间距设置为单倍行距,尽管我的文本是半倍行距。现在每个列表的第二页也是单倍行距。这是正确的。但问题在于页眉和页脚。第一页和第二页的行和文本不同。我该如何解决这个问题?这是一个最小的例子:
\documentclass[BCOR=10mm,DIV=11]
{scrreprt}
\usepackage{setspace}
\usepackage{blindtext}
\usepackage[
automark, %% Kapitelangaben in Kopfzeile automatisch erstellen
headsepline,
footsepline,
plainheadsepline,
plainfootsepline
]{scrlayer-scrpage}
\setkomafont{captionlabel}{\bfseries} %% Label-Bildunterschrift fett
\setkomafont{pageheadfoot}{\small} %% Kopfzeile klein
\setheadsepline{0.4pt} %% Kopf-Linie
\setfootsepline{0.4pt} %% Fuß-Linie
\pagestyle{scrheadings}
\ihead[]{}
\chead[]{}
\ohead[\headmark]{\headmark}
\ifoot[]{}
\cfoot[\pagemark]{\pagemark}
\ofoot[]{}
\AfterTOCHead{\singlespacing}
\onehalfspacing
\KOMAoptions{DIV=last}
\begin{document}
\begin{spacing}{1}
\title{Titel}
\author{1}
\end{spacing}
\begin{spacing}{1}
\maketitle
\end{spacing}
\tableofcontents
\chapter{Test}
\subsection{1}
\subsection{2}
\Blindtext
\chapter{Test1}
\subsection{1}
\subsection{2}
\Blindtext
\chapter{Test2}
\subsection{1}
\subsection{2}
\Blindtext
\chapter{Test3}
\subsection{1}
\subsection{2}
\Blindtext
\chapter{Test4}
\subsection{1}
\subsection{2}
\Blindtext
\chapter{Test4}
\subsection{1}
\subsection{2}
\Blindtext
\chapter{Test4}
\subsection{1}
\subsection{2}
\Blindtext
\chapter{Test4}
\subsection{1}
\subsection{2}
\Blindtext
\chapter{Test4}
\subsection{1}
\subsection{2}
\Blindtext
\chapter{Test4}
\subsection{1}
\subsection{2}
\Blindtext
\end{document}
答案1
有选项可以使用页面样式的钩子。为确保所有页眉和页脚都是半间距插入
\KOMAoptions{onpsinit=\onehalfspacing}
加载包后scrlayer-scrpage
。
\documentclass[BCOR=10mm,DIV=11]{scrreprt}
\usepackage{setspace}
\usepackage{microtype}
\usepackage{blindtext}
\usepackage[
automark,
headsepline=.4pt,% but .4pt is the standard value
footsepline=.4pt,% but .4pt is the standard value
plainheadsepline,
plainfootsepline,
]{scrlayer-scrpage}
\KOMAoptions{onpsinit=\onehalfspacing}% header and footer one half spaced
\pagestyle{scrheadings}
\clearpairofpagestyles% to clear the header and footer
\ohead[\headmark]{\headmark}
\cfoot[\pagemark]{\pagemark}
\setkomafont{captionlabel}{\bfseries}
\setkomafont{pageheadfoot}{\small}
\AfterTOCHead{\singlespacing}
\onehalfspacing
\KOMAoptions{DIV=last}
\begin{document}
\title{Titel}
\author{1}
\begin{spacing}{1}
\maketitle
\end{spacing}
\tableofcontents
\Blinddocument
\Blinddocument
\Blinddocument
\Blinddocument
\Blinddocument
\end{document}
请注意命令\setheadsepline
和\setfootsepline
已弃用。您可以将这些线宽设置为选项headsepline
和的值footsepline
。