2

I have been using scrpage2 for more than 10 years. Since it is obsolete, I want to switch to the newer scrlayer-scrpage package.

The documentation however does not seem to list the package options, it only contains several examples.

\usepackage[%
%%% Lines
   % headtopline,
   % plainheadtopline,
   % headsepline,
   % plainheadsepline,
   % footsepline,
   % plainfootsepline,
   % footbotline,
   % plainfootbotline,
   % ilines,
   % clines,
   % olines,
% column titles (content, style)
   automark,
   % autooneside,% ignore optional argument in automark at oneside
   komastyle,
   % standardstyle,
   % markuppercase,
   % markusedcase,
   nouppercase,
]{scrpage2}

Only from the log messages

Package scrlayer-scrpage Warning: You've used obsolete option `komastyle'.
(scrlayer-scrpage)                Usage of this option is deprecated.
(scrlayer-scrpage)                You should simply replace `komastyle'
(scrlayer-scrpage)                by `pagestyleset=KOMA-Script'.

I could figure out these changes

  • komastyle -> pagestyleset=KOMA-Script
  • nouppercase -> markcase=ignoreuppercase

How can I gather the complete list? If it is in the manual, which section or page?

EDIT: I have further problems to set up the options. I could not find an example in the documentation for this:

\setheadsepline{.4pt}[\color{black}] % configures the line below the header

Is according to the log not valid anymore

(scrlayer-scrpage)                You should use KOMA-Script options
(scrlayer-scrpage)                `headsepline', `headtopline', `footsepline',
(scrlayer-scrpage)                or `footbotline' with values
(scrlayer-scrpage)                `<line thickness>:<line length>' to setup
(scrlayer-scrpage)                the line length and thickness, and
(scrlayer-scrpage)                `\setkomafont' or `\addtokomafont' to
(scrlayer-scrpage)                setup the colour on input line 74.

An example for this would help.

10
  • 1
    The German scrguide has a section "18.5. Das obsolete Erbe von scrpage2", at which's end the following note can be found: "Im KOMA-Script-Buch [Koh18a] finden sich an dieser Stelle weitere Informationen." (English translations: "18.5 The obsolete heritage of scrpage2" and "More information can be found In the KOMA-Script-book [Koh18a].")
    – Skillmon
    Sep 18, 2018 at 19:27
  • Correct. But this section does not answer any of my questions. Sep 18, 2018 at 19:32
  • See chapter »5. Headers and Footers with scrlayer-scrpage« for the options of scrlayer-scrpage; especially sections »5.4. Using Predefined Page Styles« and »5.5. Manipulating Page Styles«. The options are using a key-value-syntax.
    – esdd
    Sep 18, 2018 at 19:35
  • 1
    Chapter 5 shows the options and macros in blue(documentation) or gray(book) boxes followed by their explanation.
    – esdd
    Sep 18, 2018 at 19:52
  • 2
    Replace \setheadsepline{.4pt}[\color{black}] by option headsepline=.4pt and \addtokomafont{headsepline}{\color{black}}
    – esdd
    Sep 18, 2018 at 19:57

2 Answers 2

4

In chapter 5 »Headers and Footers with scrlayer-scrpage« all the macros and options are explained.

The headsepline can be configured by option headsepline=<thickness>:<lenghth>. You can omit the values. Default thickness is 0.4pt, default length is the symbolic value head.

\KOMAoptions{headsepline} -> head sepline with thickness 0.4pt and width of the head as length

\KOMAoptions{headsepline=1pt} -> head sepline with thickness 1pt and width of the head as length

\KOMAoptions{headsepline=:10cm} -> head sepline with default thickness and length 10cm

\KOMAoptions{headsepline=1pt:10cm} -> head sepline with thickness 1pt and length 10cm

headsepline can be used as package option. But if the values of the key are macros, lengths or counters it is recommended to use \KOMAoption or \KOMAoptions.

To change the alignment of the headsepline with the head you can use one of the options ilines, clines or olines (this is the same as with scrpage2). Default is ilines, ie aligned to the inner margin of head.

To set the color of headsepline change the font element headsepline using \addtokomafont or setkomafont.

So you can replace the outdated scrpage2 code \setheadsepline{.4pt}[\color{black}] by

\KOMAoptions{headsepline=.4pt:head}% .4pt and head are the defaults
\addtokomafont{headsepline}{\color{black}}

Example:

\documentclass[twoside]{scrartcl}
\usepackage{blindtext}% only for dummy text
\usepackage{xcolor}
\usepackage{scrlayer-scrpage}% sets page style scrheadings automatically
\KOMAoptions{headsepline=4pt:5cm,olines}
\addtokomafont{headsepline}{\color{orange}}
\begin{document}
\blinddocument
\end{document}

enter image description here

3

There is an alpha-version of a command which can be used to get information about the options set in the preamble or by the packages itself for scrlayer-scrpage and scrlayer. scrlayer-scrpage loads and uses scrlayer. See Abfrage der gesetzten Optionen (German).

% based on https://komascript.de/node/1893
\documentclass{scrartcl}
\usepackage{scrlayer-scrpage}
\usepackage{url}

\begin{document}
\noindent\KOMAScriptVersion\par\bigskip

\minisec{scrlayer-scrpage.sty:}
\KOMAoptionsOf[\url]{scrlayer-scrpage.sty}

\minisec{scrlayer.sty:}
\KOMAoptionsOf[\url]{scrlayer.sty}

\end{document}

Result:

enter image description here

You must log in to answer this question.

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