0

I have to admit that I am a little bit desperate now, since I have been working the entire day on the following issues and was not able to come up with a proper solution.

  1. I would like to have the chapters in roman numbering the rest should be in arabic. Unfortunately, the roman numbering is then too close to the heading in the ToC. (see III. and IV).
  2. In addition, I cannot set the line spacing in the headings (if they have two or more lines) to single line spacing. (see I.3 in the ToC and in the document).
  3. The subparagraph is unfortunately too far to the right and I don't know how to move it to the far left.

It would be great if anyone of you could help me, please.

MWE:

\documentclass[a4paper,
    bibliography=totoc,
    toc=listof,
    headings=small,
    listof=entryprefix,
    ]
    {scrbook}

%%% === PAKETE === %%% %% --- Allgemein --- %% \usepackage[utf8]{inputenc}
\usepackage{textcomp} \usepackage[]{setspace}
\usepackage[T1]{fontenc}
\usepackage[english,ngerman]{babel}
\usepackage{lmodern}
\usepackage{scrlayer-scrpage}
\usepackage{microtype}
\usepackage{ragged2e} \usepackage[labelfont=bf,format=hang,justification=justified]{caption} \usepackage{etoolbox} \usepackage{pdflscape} \usepackage{lscape} \usepackage{ragged2e}
\usepackage{scrhack}

%% --- Zitieren / Fußnoten --- %% \usepackage[babel,german=quotes,threshold=1]{csquotes}

\usepackage[language=autobib, backend=biber, % switch off if MWE is not working citetracker=true, autolang=other,
style=authoryear-comp,
maxcitenames=2,maxbibnames=99,
uniquename=false,uniquelist=true,
isbn=false,doi=false,
dashed=false ]{biblatex}

% Fußnoten fortlaufend \usepackage{chngcntr} \counterwithout{footnote}{chapter} \usepackage{bigfoot}

% === Allgemein === %% %\usepackage[onehalfspacing]{setspace} % Überschriften Tabellen / Abbildungen kleiner \captionsetup{font={small},justification=raggedright}

%% === Verzeichnisse === %%

% -- Inhaltsverzeichnis -- %

\setcounter{tocdepth}{5}

%% --- Überschriften --- %%
\setcounter{secnumdepth}{5}
\setkomafont{disposition}{\normalcolor\bfseries}
\renewcommand{\partpagestyle}{empty} \renewcommand{\raggedsection}{\RaggedRight}

%% --- Abstände --- %% % Abstand zwischen Absätzen % \setlength{\parskip}{0.5\baselineskip} \setlength{\parindent}{0pt}

%% --- Schusterjungen / Hurenkinder \usepackage[defaultlines=3, all]{nowidow}

% Arabisch/Römisch Nummerierung
\renewcommand{\thechapter}{\Roman{chapter}}


% 5. Gliederungsebene
\newcommand{\myparagraph}[1]{\paragraph{#1}}
\RedeclareSectionCommands[beforeskip=.0\baselineskip,afterskip=.0\baselineskip]{chapter}
\RedeclareSectionCommands[beforeskip=-.5\baselineskip,afterskip=.1\baselineskip]{section,subsection,subsubsection,paragraph}
\RedeclareSectionCommands[beforeskip=-.5\baselineskip,afterskip=.1\baselineskip]{subparagraph}

%%% Größenanpassung Überschriften
\addtokomafont{chapter}{\fontsize{14}{17}\selectfont}
\addtokomafont{section}{\fontsize{12}{17}\selectfont}
\addtokomafont{subsection}{\fontsize{12}{17}\selectfont}
\addtokomafont{subsubsection}{\fontsize{12}{17}\selectfont}
\addtokomafont{paragraph}{\fontsize{12}{17}\selectfont}
\addtokomafont{subparagraph}{\fontsize{12}{17}\selectfont}





%*************************************************************************************

\begin{document}

%%% ----- VERZEICHNISSE ----- %%% \pagenumbering{Roman}

\tableofcontents

\cleardoublepage \pagenumbering{arabic} \onehalfspacing

%*************************************************************************************

\chapter{This is chapter number 1} \section{This is a new section} \section{This is an other one} \section{This is an other one, but the line spacing is very long and therefore looks strange. Any ideas how to fix this? (see page 1)} \subsection{Subsection} \subsubsection{Subsubsection} \paragraph{Paragraph} \subparagraph{Subparagraph}

\chapter{This is chapter number 2} \chapter{This is chapter number 3} \chapter{This is chapter number 4} \chapter{This is chapter number 5} enter image description here %************************************************************************************* \end{document}

enter image description here enter image description here

TRJW
  • 450

1 Answers1

1

First, use the usual font switches to set headings font size

\addtokomafont{chapter}{\Large}
\addtokomafont{section}{\large}
\addtokomafont{subsection}{\large}
\addtokomafont{subsubsection}{\large}
\addtokomafont{paragraph}{\large}
\addtokomafont{subparagraph}{\large}

in place of \fontsize (the second argument of \fontsize set the baseline skip, you can also use a smaller value). This would solve your issue #2.

For the table of content, as you have many levels, maybe the KOMA-Script flat style is more appropriate. You can set it with:

\KOMAoptions{toc=flat}

If you prefer keeping the default style, you can enlarge the numwidth for the chapter (issue #1):

\RedeclareSectionCommands[tocnumwidth=2em]{chapter}

and reduce the indent for the other levels (issue #3):

\RedeclareSectionCommands[tocindent=1em]{section}
\RedeclareSectionCommands[tocindent=2em]{subsection}
\RedeclareSectionCommands[tocindent=3em]{subsubsection}
\RedeclareSectionCommands[tocindent=4em]{paragraph}
\RedeclareSectionCommands[tocindent=5em]{subparagraph}
jlab
  • 1,834
  • 1
  • 13
  • I thank you 100 times for your answer. On thing I do not understand is how I can set the baselineskip properly? Lets say it need 2em between the lines ... How can I do it? – TRJW Mar 18 '24 at 19:06
  • @TRJW Set it with \setlength{\baselineskip}{2em}, or enlarge it with \addtolength{\baselineskip}{2em}. For double or one half spacing, it's best to use the package setspace (see also https://tex.stackexchange.com/a/834/316068). – jlab Mar 18 '24 at 20:35
  • Thx @jlab. Maybe you could also help me with one last topic. Is there a way to control the linespacing in the header? If the chapter/ section title is too long there are then two lines at the very top and the line spacing is rather big .... – TRJW Mar 20 '24 at 20:31
  • @TRJW When you set \fontsize{12}{17} for sections with \addkomafont you set the font size to 12pt and the baselineskip to 17pt. Use the values you want, or add \addtolength{\baselineskip}{-2pt} after \large in \addkomafont. But in my humble opinion the defaults are fine. – jlab Mar 20 '24 at 20:53