I have a problem with the koma-script scrbook class. I want to have a two lines chapter title like:

enter image description here

I tried:

%%% classe de base (KOMA-Script)
\LoadClass{scrbook}                 %% classe report (KOMA-Script)

%%% extensions minimales
\RequirePackage[T1]{fontenc}            %% fontes de caractère
\RequirePackage[utf8]{inputenc}     %% format d'encodage
\RequirePackage{lmodern}                %% fontes latin modern
\RequirePackage[frenchb]{babel}     %% typographie française
\RequirePackage[babel]{csquotes}        %% guillemet

\RequirePackage{lipsum}             %% lorem ipsum (exemple)

%%% extensions complémentaires
\RequirePackage{scrhack}    %% macros et en-tête/pied de page personnalisés (KOMA-Script)
%%% paramètres
\pagestyle{scrheadings}             %% style de page
\addtokomafont{pagenumber}{\small\sffamily} %% style de numero de page

As well as:

%%% classe de base (KOMA-Script)
\LoadClass{scrbook}                 %% classe report (KOMA-Script)

But I always get the result:

enter image description here

What is wrong in my code?


closed as unclear what you're asking by egreg, Mensch, Svend Tveskæg, Werner, Martin Schröder Dec 20 '15 at 19:58

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • I can't see this behavior. – egreg Sep 21 '15 at 10:29
  • You mean that my code is OK but that I have a bug? – baptiste Sep 21 '15 at 10:33
  • 1
    I mean that if I prepare a document with that code as preamble, with \documentclass replacing \LoadClass, and just \chapter{Title} after \begin{document} I get “Chapter 1” and “Title” on separate lines. So there must be something else you're not including in your code. Please, try making a minimal example that does show the problem. – egreg Sep 21 '15 at 10:37

I found the oringin of the error. That come from the package sectsty who change the headings. (as my style sheet was extremely long, I didn't display it completely, sorry for that). I will check the sectsty documentation. Thank's to egreg

  • 1
    Note that it is not recommended to use package sectsty together with a KOMA-Script class. – esdd Sep 23 '15 at 7:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.