KOMA Script 的标题行不显示

KOMA Script 的标题行不显示

阅读完官方文档后,我尝试将其添加headsepline到文档中,但迄今为止却令人沮丧。

以下是 MWE:

\documentclass[11pt, DIV=11, headings=small]{scrreprt}

\usepackage[automark, headsepline]{scrlayer-scrpage}

\clearpairofpagestyles  % Gets rid of the pagemark on the footer by resetting the pagestyle
                        % However, even without this the headsepline doesn't show
\pagestyle{scrheadings}
\lohead*{Author1, Author2}
\cohead*{Title}
\rohead*{\pagemark}

\begin{document}

\chapter{One}

TEST

\chapter{Two}

Tests

\end{document}

是否还有其他我忘记添加的选项可以使其正常工作?顺便说一下,我正在使用 XeTeX。

答案1

章节页面plain默认使用 pagestyle。您必须添加选项plainheadsepline

\documentclass[11pt, DIV=11, headings=small]{scrreprt}
\usepackage[automark, headsepline,
  plainheadsepline% <- added
]{scrlayer-scrpage}% sets pagestyle scrheadings automatically

\clearpairofpagestyles
\lohead*{Author1, Author2}% or \ihead{...}
\cohead*{Title}% or \chead{...}
\rohead*{\pagemark}% or \ohead{...}

\begin{document}
\chapter{One}
TEST
\chapter{Two}
Tests
\end{document}

结果:

在此处输入图片描述

相关内容