In KOMA-Script classes, how can I change the appeareance (font size, color, arrangment, content, etc.) of the page created by \part an \chapter?

The pagestyle can be changed easily with KOMA-Script commands, but this only allows changes to the header and footer but not to the actual content, as far as I understood the scrguide.

I tried with titlesec, but this has some drawbacks, because it does not support KOMA's \setpartpreamble and \setchapterpreamble, which I'd really like to use.

  • If you specify the layout I can update my answer. Apr 22, 2013 at 19:48
  • @MarcoDaniel I'm not yet sure about the layout. I hoped to learn how/where to change the layout at all to try some designs out. I have no problems with "low-level stuff" myself (redefining commands), if I just knew which ones are important. ;)
    – Foo Bar
    Apr 22, 2013 at 20:10
  • @FooBar you can do many things using (nearly) only the official interfaces: tex.stackexchange.com/a/94703/5049
    – cgnieder
    Apr 22, 2013 at 21:56

2 Answers 2


KOMA provides the commands \addtokomafont, \setkomafont and \usekomafont. The first and the second command have two mandatory argument. The first one is the name of the element which font should be changed. The second argument is the font definition:


set the part as huge and bold. The command \addkomafont adds the elements of the second mandatory argument to the default definition. With the command \usekomafont you can use a predefined setting.

Related to part and chapter there are the following commands possible:

  • part: set the font of \part
  • partentry: set the font of \part in toc
  • chapter: set the font of \chapter
  • chapterentry: set the font of \chapter in toc

The documentation shows more examples and options. To add a color definition you can use:


The arrangement of part is done by \raggedpart with the default definition

  • 1
    There are also chapterentrypagenumber, chapterprefix, partentrypagenumber and partnumber for other related properties.
    – cgnieder
    Apr 22, 2013 at 19:36
  • @cgnieder: Indeed. But I didn't want to copy the complete table ;-) Apr 22, 2013 at 19:39

The code for \part and \chapter are different from the other sectional units, and like the default document classes, are contained in the class in question. So, if you're using scrreprt.cls, the following is the code that produces the layout (including font size, colour, arrangement and content):


    \ifnum \c@secnumdepth >-2\relax
     \interlinepenalty \@M
     \ifnum \c@secnumdepth >-2\relax
       \vskip 20\p@
     \size@part\sectfont #2\par}%


\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
    \@hangfrom{\ifnum \c@secnumdepth >\m@ne%
              {\raggedsection \interlinepenalty \@M #1\par}}

There is a minor difference in terms of the layout for numbered and unnumbered elements like above (for example, for \part* and \chapter*), but you can find those definitions in the source classes as well.

How would you go about changing them? Either by means of the supplied hooks provided in the KOMA-script documentation, or by updating the above definitions to your liking. For example,

  • Updating the font and colour for \part:

    Update the macro \partformat to include colour. It's currently defined as

    \newcommand*\partformat    {\partname~\thepart\if@altsecnumformat.\fi}

    so using

    \usepackage{xcolor}% http://ctan.org/pkg/xcolor
    \newcommand*\partcolor{\color{blue!50}}% Part is coloured blue
    \newcommand*\partformat    {\partcolor\partname~\thepart\if@altsecnumformat.\fi}

    The above allows you to change only \partcolor rather than reformat the entire \partformat if you want to update the colour (from one \part to another, say).

  • Modify the space after the chapter title:

    Update the definition of \chapterheadendvskip (either via the document class option, or directly). For example,


    would leave a 50pt gap between the chapter title and the start of the chapter text. This is specifically covered in the KOMA-script documentation (section 16.3. Expert Commands, p 285).

The question is very general, as such I've only given some general guidelines as to the modification of these structural units. If the class does not provide adequate control over specific elements of the layout, you'd have to modify the structural parts manually. To that end, a document class is typically considered restrictive, while (compatible) packages provide an extension or flexibility to modify things to your liking, rather than tinkering with the actual code.

  • Sorry but your answer doesn't use the advantages of KOMA. Apr 22, 2013 at 19:28
  • 1
    @MarcoDaniel: Not entirely, sure. Some of the entries in terms of the construction are hooks themselves, and have to be redefined in the traditional way (like \chapterheadendvskip, say). That is, there's not clear KOMA-script hook into setting these values other than using \renewcommand or \def.
    – Werner
    Apr 22, 2013 at 19:35
  • Unfortunately true, this can't be done by any hooks. :-( I am sure Markus will change this. Apr 22, 2013 at 19:38
  • This answer bases on an old KOMA-Script version. There were major changes in the source code. Now there are user commands (e.g. \partlineswithprefixformat , \chapterlineswithprefixformat and \chapterlinesformat) which can be redefined to change the arrangment and content. Version 3.27 introduces additional do-hooks.
    – esdd
    Nov 14, 2019 at 8:53

You must log in to answer this question.

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