我如何添加脚步线?

我如何添加脚步线?

我已经建立了一个像这样的文档类

\documentclass[
    11pt,                  % Font size
    final,
    cleardoublepage = plain, % just for page numbers on cleardoublepages
    parskip=half,          % Half a line skipped between paragraphs
    twoside,               % Two-sided document
    openright,             % Chapters start on right pages
    bibliography=totoc,    % Bibliography in ToC
    listof=totoc,          % LoF and LoT in ToC
    footsepline=0.4pt,
]{scrreprt}[2015/09/15]    % Use current version of KOMA-Script
% Author and title of document

% Header and footer
\usepackage[automark,headwidth=textwithmarginpar,footwidth=text,footsepline=0.4pt, headsepline=0.4pt:textwithmarginpar]{scrlayer-scrpage}  % Custom header and footer
\usepackage{lastpage} %needed for page number
\pagestyle{scrheadings}
%\setfootsepline{.4pt} THAT DIDNT WORK__________________________________________
\renewcommand{\headfont}{\normalfont\sffamily}
\makeatletter
\renewcommand{\chaptermark}[1]{\markboth{\@chapapp~\thechapter~--~#1}{}}
\makeatother
\rohead{\rightmark}
\lehead{\leftmark}

页脚分隔线会出现,但只出现在 a) 包含文本且 b) 不是新章节第一页的页面上。我该如何更改,让页脚分隔线出现在每个带有页脚的页面上?

答案1

使用选项plainfootsepline

\documentclass[
    11pt,                  % Font size
    final,
    cleardoublepage = plain, % just for page numbers on cleardoublepages
    parskip=half,          % Half a line skipped between paragraphs
    twoside,               % Two-sided document
    openright,             % Chapters start on right pages
    bibliography=totoc,    % Bibliography in ToC
    listof=totoc,          % LoF and LoT in ToC
]{scrreprt}[2015/09/15]    % Use current version of KOMA-Script
% Author and title of document

% Header and footer
\usepackage[automark,headwidth=textwithmarginpar,footwidth=text,
            footsepline=0.4pt, 
            headsepline=0.4pt:textwithmarginpar,
            plainfootsepline]{scrlayer-scrpage}  % Custom header and footer
\usepackage{lastpage} %needed for page number
\pagestyle{scrheadings}
\renewcommand{\headfont}{\normalfont\sffamily}
\makeatletter
\renewcommand{\chaptermark}[1]{\markboth{\@chapapp~\thechapter~--~#1}{}}
\makeatother
\rohead{\rightmark}
\lehead{\leftmark}

\begin{document}
\chapter{A}

\chapter{B}
\newpage
blblblb

\end{document}

相关内容