The KOMA-pagestyle-package^{∗}

Markus Kohm

1995/07/08

Abstract

This is scrpage.sty. This package is part of the KOMA-script-bundle. It defines a new userinterface for pagestyle-definition. It’s something like fancyheadings but not the same. You may use scrpage or fancyheadings. You may use scrpage with standard classes, too.

Contents

1 Introduction

There is a simple user-interface and a expert-interface. Using the user-interface you can define a lot of different pagestyles. But there are combinations, you cannot define. Using the expert-interface you can do allmost all you may ever want. To do more, you should learn more about defining macros yourself.

1.1 Interface for all users

\headfont

This font is used to write pageheads and -foots. You may change it using \renewcommand, e.g.

\renewcommand\headfont{\normalfont\slshape}.
\headmark

Using twoside-option this is \leftmark at left/even pages and \rightmark at right/odd pages. Using oneside-option there are only right pages, so it is \rightmark.

\pnumfont

This font is used to write pagenumbers at \pagemark. You may change it using \renewcommand (see

\headfont).
\pagemark

This is the number of the actual page written with \pnumfont.

\deftripstyle {name}[olw][ilw] {headleft}{headmiddle}{headright} {footleft}{footmiddle}{footright} Defines a new pagestyle. You can activate this pagestyle using \pagestyle or \thispagestyle. Without optional argument this defines a page like this:

∗This file has version number v1.2, last revised 1995/07/08.

1 Introduction

headright headmiddle  headleft left page footright  footmiddle  footleft headleft  headmiddle headright right page footleft  footmiddle  footright

Using one optional argument [ilw] (means inner line width) you get a separationline between head and text and between text and foot like this (ilw=0.5pt):

headright headmiddle  headleft left page footright  footmiddle  footleft headleft  headmiddle headright right page footleft  footmiddle  footright

Using both optional arguments [olw] (means outer line width) and [ilw] you get a separationline between head and text and between text and foot and a line above head and below foot like this (olw=2pt, ilw=0.5pt):

headright headmiddle  headleft left page footright  footmiddle  footleft headleft  headmiddle headright right page footleft  footmiddle  footright

You can define new pagestyles and you can redefine existing pagestyles. If you redefine an active pagestyle, this doesn’t change the actual shown pagestyle. To activate you have to use always a

\pagestyle- or \thispagestyle-command.

You can change the standard pagestyle headings to. If you want to change pagestyle myheadings, you should use the star-version of the command:

\deftripstyle *{name}[olw][ilw] {headleft}{headmiddle}{headright} {footleft}{footmiddle}{footright} this defines a my-version pagestyle. This means, section- and chapter-commands or perhaps \tableofcontents don’t change the marks. Only \markboth and \markright change them. But if

you don’t use \headmark, \leftmark or \rightmark, star- and starless version of \deftripstyle

are almost the same.

1.2 Interface for experts

\defpagestyle {name}{head-definition}{foot-definition} defines a new pagestyle name. head-definition defines the head at the new pagestyle. It contains five part: (toplinelength,toplinewidth) {evenpagehead}{oddpagehead}{onesidepagehead} (headseplinelength,headseplinewidth) These five parts have to be one argument! So you should put them together in group-braces (“{” and “}”).

foot-definition analogous defines the foot at the new pagestyle.

\newpagestyle {name}{head-definition}{foot-definition} defines a real new pagestyle. If there’s already a pagestyle named name, you’ll get an error. Otherwise it’s the same like \defpagestyle.

\renewpagestyle {name}{head-definition}{foot-definition} redefines a old pagestyle. If there isn’t a pagestyle named name, you’ll get an error. Otherwise it’s

the same like \defpagestyle.

\providepagestyle {name}{head-definition}{foot-definition} defines a new pagestyle, if it is realy new. If there is already a pagestyle named name, it does nothing (but writing an info to the log file). Otherwise it’s the same like \defpagestyle.

You may use the user-interface-macros \pagemark and \headmark, too.

1.3 Configuration file

There’s a configuration file scrpage.cfg, included at the end of scrpage.sty, if it exists. There you can define your own default pagestyles using all the commands above.

1.4 Example

The pagestyles of this documentation was defined using:

\renewpagestyle{headings}{(\textwidth,1pt)%
{\headmark\hfill}{\hfill\headmark}{\hfill\headmark\hfill}%
(\textwidth,.4pt)}%
{(\textwidth,.4pt)%
{\pagemark\hfill%
 Copyright $\copyright$ Markus Kohm, 1994-1995}%
{Package \texttt{scrpage}\hfill\pagemark}%
{\rlap{Package \texttt{scrpage}}\hfill%
 Copyright $\copyright$ Markus Kohm, 1994-1995\hfill%
 \llap\pagemark}%
(\textwidth,1pt)}
\renewpagestyle{plain}{(\textwidth,1pt)%
       {\hfill}{\hfill}{\hfill}%
       (\textwidth,.4pt)}%
      {(\textwidth,.4pt)%
       {\pagemark\hfill}%
       {\hfill\pagemark}%
       {\hfill\pagemark\hfill}%
       (\textwidth,1pt)}
\pagestyle{headings} % activate new version