How can I make a horizontal rule below the top header (where the current chapter page or section is written)? And last but not least on the even pages in the header it is written

  1. Chapter title

but I would like it to have

Chapter 1. Chapter title

Is this possible?

My code is the following:





    % **** Defining chapter style start ****




    \addtokomafont{chapterentry}{\normalcolor}% entrys in tableofcontents not blue



    \setcounter{secnumdepth}{\subsectionnumdepth}% subsubsection and lower unnumbered




        \par\nobreak\vspace*{-\parskip}% <- changed
        \par\nobreak\vspace*{-\parskip}% <- changed

    % **** Defining chapter style end ****


            pdfauthor={Rafael Wampfler},
            pdftitle={Engagement Detector: Modelling engagement dynamics in virtual environments},
            pdfsubject={The report of the master thesis about the modelling engagement dynamics in virtual environments.},
            pdfkeywords={machine learning, engagement dynamics, classification, virtual environments, calcularis, learning, minecraft},



    \topmargin -0.5in
    \textheight 9.3in
    \textwidth 6.3in
    \oddsidemargin 0.18in
    \evensidemargin -0.22in
    \parskip 0.1in
    \parindent 0in











    % ---- MAIN PART ----

      \chapter{Chapter Title}
      \section{Section Title}
      \addsec{Unnumbered Section Title}
      \subsection{Subsection Title}
      \subsubsection{Subsubsection Title}

    % ---- END MAIN PART ----





  • 2
    Much of your code doesn't seem to be relevant to the question you're asking here. Could you lessen your example to only the code required to show the header? You can have a look at this guide for how to prune your code for this purpose. Jan 27 '16 at 23:17
  • Isn't that the effect of chapterprefix=false? Check the documentation - I don't remember, but it sounds suspicious.
    – cfr
    Jan 28 '16 at 0:01
  • @cfr With chapterprefix or chapterprefix=true there is also a prefix line fo the chapter title in the document. AFAIK the OP does not want a two line chapter title..
    – esdd
    Jan 28 '16 at 0:25
  • @esdd Oh, I see. You may be right. I guess it seems odd to me to want it in the header and not in the title of the chapter, but that would make sense of the question.
    – cfr
    Jan 28 '16 at 0:53
  • @cfr It is following up tex.stackexchange.com/q/288737/43317
    – esdd
    Jan 28 '16 at 0:58

To get a sepline below the header on pages using page style scrheadings use option headsepline.


If the chapter prefix should be in the page header and there should be a prefix line before the chapter title you could use the option chapterprefix or one of the aliases twolinechapter, chapterwithprefix, chapterwithprefixline.

AFAIK you do not want a two line chapter title with the prefix in the first line. Then you have to change the apperance of the chapter number in the page header redefining \chaptermarkformat:

\renewcommand*\chaptermarkformat{\chapapp\ \thechapter\autodot\enskip}

enter image description here


\usepackage{blindtext}% dummy text

\renewcommand*\chaptermarkformat{\chapapp\ \thechapter\autodot\enskip}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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