i have to adhere to a style guide which dictates newline after a chapter/section/etc number, i.e. instead of the usual
1.2 Heading
its supposed to be
1.2
Heading
This has to work for both the headings themselves and for the TOC. So far i'm using an ugly clutch by simply writing \section{\\Heading}
, which causes some problems, e.g. with the hyperref
package. I'm using KOMA-Script (scrreprt
), and tried solving this by redefining \sectionformat
, which sadly ignores any \newline
commands. Is there a clean way to achieve this? I know there is the twolinechapter
option which kind of solves it for the chapter headings, although not for the TOC or any other sectioning commands.
Thanks in advance!
EDIT: I found another clutch, which works for the headings and is probably also applicable in some way to the TOC (don't know how to format TOC items jet, will try to find out):
\renewcommand*{\chapterformat}{\makebox[0pt][l]{\raisebox{17.5pt}{\thechapter}}}
This simply raises the numbering, and the \makebox
avoids the indenting (negative \vspace
/ \hspace
doesn't work for some reason). Doesn't feel right, but at least better than a newline the beginning of the heading itself.
EDIT A minimal Example of my current method:
\documentclass{scrreprt}
\usepackage{blindtext}
% Styling the Headings
\renewcommand*{\chapterformat}{\makebox[0pt][l]{\raisebox{17.5pt}{\thechapter}}}
\renewcommand*{\sectionformat}{\makebox[0pt][l]{\raisebox{17.5pt}\thesection}}
\renewcommand*{\subsectionformat}{\makebox[0pt][l]{\raisebox{12pt}\thesubsection}}
\begin{document}
\tableofcontents
\blinddocument
\end{document}
Now all that remains is Styling the TOC. Is there a similar version of \chapterformat
(etc.) for the TOC? I know I can redefine the TOC indents with \RedeclareSectionCommand
, and set different toc styles. But nothing similar to what I want to achieve.
titlesec
is pretty straightforward.