1

I would like the name Chapter [No.] on top, below the actual \chapter.

enter image description here <- I want it like this.

enter image description here <- but it looks currently like this.

I would like the format of 1 but not its size of the fonts; the font like in 2.

\documentclass[egregdoesnotlikesansseriftitles,headings=optiontoheadandtoc]{scrreprt}
\usepackage{newtxtext}
\setkomafont{chapter}{\rmfamily \LARGE}
\addtokomafont{subsection}{\normalfont \itshape }

%code below here does not seem to work
\renewcommand*{\raggedchapter}{\centering} %chapter in toc and on page (numbering)
\renewcommand*{\chaptermarkformat}{\chapappifchapterprefix{\nobreakspace}\thechapter\autodot:\enskip}
\let\originaladdchaptertocentry\addchaptertocentry
\renewcommand*{\addchaptertocentry}[2]{%
  \IfArgIsEmpty{#1}
    {\originaladdchaptertocentry{#1}{#2}}
    {\originaladdchaptertocentry{\chapappifchapterprefix{\nobreakspace}#1\autodot}{#2}}%
}
\RedeclareSectionCommand[
  tocentrynumberformat={\def\autodot{:}},
  tocdynnumwidth
]{chapter}

\let\originalappendix\appendix
\renewcommand*{\appendix}{%
  \originalappendix
  %\renewcommand*\chapterformat{}% remove the chapter number  from chapter heading
  %\renewcommand*\chaptermarkformat{}% remove the chapter number from header entry
  \renewcommand*{\addchaptertocentry}[2]{% remove the chapter number from ToC entry
    \originaladdchaptertocentry{}{##2}%
  }%
}
TivV
  • 743
Karl L.
  • 325

1 Answers1

3

The KOMA-Script option for this is called chapterprefix (it can be found in the KOMA Script Manual in section "3.16. Document Structure").

\documentclass[
    egregdoesnotlikesansseriftitles,
    headings=optiontoheadandtoc,
    chapterprefix=true
    ]{scrreprt}

\usepackage{newtxtext}
\addtokomafont{chapter}{\LARGE}
\addtokomafont{subsection}{\normalfont \itshape}

\begin{document}
\chapter{First Chapter}
\end{document}

enter image description here

TivV
  • 743