3

To get a centered line with a length of .25\textwidth above the page number, until now I used the scrpage2 package and this command:

\setfootsepline[.25\textwidth]{.4pt}

This is deprecated now, so I'd like to switch to scrlayer-scrpage, but the equivalent

\usepackage[footsepline=:.25\textwidth]{scrlayer-scrpage}

throws errors. If I insert an absolute value like 5cm just for testing the line is also flush left instead of centered.

How can I get the behaviour of scrpage2's \setfootsepline command with scrlayer-scrpage?

MWE

This shows what I want and – commented out – what I tried.

\documentclass{scrartcl}
\usepackage{scrpage2}
\pagestyle{scrheadings}
\setfootsepline[0.25\textwidth]{0.4pt}
% \usepackage[footsepline=:.25\textwidth]{scrlayer-scrpage}
% \usepackage[footsepline=:5cm]{scrlayer-scrpage}
\begin{document}test page\end{document}

1 Answer 1

5

You could use:

\documentclass{scrartcl}
\usepackage{scrlayer-scrpage}
\KOMAoptions{footsepline=:.25\textwidth,clines}
\begin{document}test page\end{document}

or

\documentclass{scrartcl}
\usepackage[footsepline=:\the\textwidth*25/100,clines]{scrlayer-scrpage}
\begin{document}test page\end{document}

or

\documentclass{scrartcl}
\usepackage[footsepline=:\the\textwidth/4,clines]{scrlayer-scrpage}
\begin{document}test page\end{document}

Note that a length in the optional argument of a package or class will be expanded complettly. So I would suggest to use \KOMAoptions for setting the width of the rule.

Result:

enter image description here

1
  • Thanks, that solves the first problem, however the line isn't centered (as with scrpage2) this way. As I just figured out, \KOMAoptions{clines} will do the trick.
    – dessert
    Commented Oct 17, 2017 at 10:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .