I've done some styling for my chapter titles, based upon tikz and the titlesec package.

Unfortunately, the KOMA-Script packages gives me numerous warnings about titlesec. In order to get rid of the titlesec-package, I've tried to accomplish the same chapter style with the build-in \chapterformat of KOMA-Script. This works quite well, until I noticed that the \chapter*-like headings (e.g. TOC and so on) were not affected.

After doing some research, I've found the - trivial - reason for this behaviour. \chapterformat affects only the number part of the title. All the \chapter* have no chapter number, so \chapterformat does not work.

The Question

Is it possible to format both \chapter and \chapter* with pure KOMA-Script, or does this require titlesec or a similar package?



    \begin{tikzpicture}[remember picture,overlay]
        \draw[fill=gray,draw=none] (0,0) rectangle (1cm,1cm);

\chapter{The Chapter}
\chapter*{The Chapter without number}

compiled MWE

MWE, compiled with pdflatex/miktex 2.9/KOMAScript 3.18

Just for info

This is maybe not really part of the question, however that's the current \chapter style in my document. \chapter* should have the same position and background, without the orange bar. The one above is only a MWE for demo purposes.

This is the styled chapter

  • Welcome to TeX.SX! It's (well-known) that one should not use KOMA and titlesec together. Either KOMA xor titlesec, then use a different class, report, for example.
    – user31729
    Jul 27, 2015 at 17:07
  • @ChristianHupfer Does this mean, that there is no way to have a styled \chapter* in KOMA? By the way, what exactly is the reason for this advice? I've already used them both together and I've never experienced any problems, only the warnings from KOMA. Is this some kind of a 'It could crash with the next version'-problem? Jul 27, 2015 at 20:20
  • 1
    Well, as you wrote: It could crash with the next version. KOMA and titlesec both do 'strange' things to the sectioning commands and their headings and both do it differently, as far as I know. I think, many of the stuff done with titlesec can be done with KOMA macros too, but I have to admit, that I am no fan of neither KOMA nor titlesec, so others should provide real answers. This is of course only a comment
    – user31729
    Jul 27, 2015 at 20:23

1 Answer 1


Since KOMA-Script version 3.19 the command \chapterlinesformat can be redefined to change the layout of chapter titles which have no prefix line. Now it is possible to position the chapter title in a graý box on top of the page without using scrlayer-scrpage. And chapter titles with more than one line are possible.

%\providecommand*\Ifstr{\ifstr}% needed up to and including KOMA-Script version 3.27, see https://komascript.de/faq_deprecatedif
%\providecommand*\Ifthispageodd{\ifthispageodd}% needed up to and including KOMA-Script version 3.27, see https://komascript.de/faq_deprecatedif


  beforeskip=1sp minus 1sp,
  afterskip=4\baselineskip plus .2\baselineskip minus .2\baselineskip,




\chapter{The chapter}

\chapter*{The Chapter without number}
\chapter{A long long long long chapter title with more than one line}

Run twice (because of \Ifthispageodd) to get

enter image description here

You must log in to answer this question.

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