2

I am currently writing my master thesis with KOMA-Class srcreprt and I am a little bit weird about blank lines in paragraphs, parskips and sectioning vertical space.

As I have learned usage of \\ as shown in the following mwe is some kind of bad style:

\documentclass[a4paper,12pt,chapterprefix=true]{scrreprt}

\usepackage[ngerman]{babel}
\usepackage{blindtext}

\setlength{\parindent}{0em}

\usepackage[onehalfspacing]{setspace}

\RedeclareSectionCommands[
beforeskip=1em,
afterskip=1sp
]{paragraph,subparagraph}

\begin{document}
    \chapter{Ein Kapitel}
    \blindtext

    \paragraph{Ein Absatz}
    \blindtext \\

    \blindtext
\end{document}

It produces the following output:

Bad style example

As I have read, it is better to use \usepackage{parskip}, remove \setlength{\parindent}{0em} and use blank lines instead of \\. This gives a slightly different look, but is almost the same. But pdflatex now throws the following warning:

Usage of package `parskip' together(scrreprt) with a KOMA-Script class is not recommended.

I figured out, that KOMA-Script offers the parameter parskip which can be used instead of \usepackage{parskip}. But this creates big vertical spaces for the sections. Especially there seems to be no way to reduce the spacing between the \paragraph and the following text:

KOMA-Script parskip

So my question is: What is the "best" solution to go for? I guess it is the KOMA-Script option parskip. But how can I reduce the vertical Spacings? Especially the afterskip of \paragraph?

I also came across the following: When using \usepackage[onehalfspacing]{setspace} one should DVI=last. I did not really understand this. Also in combination with the scrmanual it confused me more then anything else. Is this something I should take care of?

Thank you for your help!

2

KOMA-script makes the spacing before, within and after the heading dependent on \baselineskip and parskip, which the packages setspace and parskip increase. A document with 1.5 linespacing, no paragraph indenting, but space between paragraphs, tries to copy Word-layout, and will never look nice, even though it will look better than a Word-document.

Correct syntax to set fontsize in KOMAscript is fontsize=12pt. Also, you may omit the a4paper option, since this is the default for all KOMA-Script classes.

The line

\usepackage[onehalfspacing]{setspace}

also increases the spacing before, within and after the headings. In addition, when you increase the parskip value to have blank line between paragrapgh, this will increase spacing in headers. Use the internal command parskip=true or parskip=half to have blank lines between paragraphs.

In KOMAscript, you may redeclare the sectioning commands individually to revert (decrease) the added space.

Chapter is pretty easy, as you see from my example. To remove additional space after \section, \subsection , \paragraph and \subparagraph commands, use \RedeclareSectioncommand and set runin false and afterskip to a negative value.

enter image description here

\documentclass[fontsize=12pt, chapterprefix=true, parskip=half]{scrreprt}

\usepackage[ngerman]{babel}
\usepackage{blindtext}

%\setlength{\parindent}{0em} % Not needed when 

\usepackage[onehalfspacing]{setspace}

\RedeclareSectionCommand[%
innerskip=0.05\baselineskip,
afterskip=1\baselineskip plus .1\baselineskip minus .12\baselineskip,
beforeskip=-2\baselineskip%
]{chapter}

\RedeclareSectionCommands[
runin=false,              %% NB! Important
afterskip=-0.5\parskip
]{section,subsection}


\RedeclareSectionCommands[
beforeskip=1em,
runin=false,
afterskip=-\parskip
]{paragraph,subparagraph}

\begin{document}
    \chapter{Ein Kapitel}
    \vspace{-0.5\baselineskip}
    \blindtext

\section{Ein Section}
\blindtext

    \paragraph{Ein Absatz}
    \blindtext

    \blindtext
\end{document}
  • Your mwe uses the \\ solution, which is considered to be kind of bad latex style tex.stackexchange.com/questions/82664/… And in addition, I don't want to reduce the spacings in the first image. That look fine. My question is, how to reduce the spacing, when using \documentclass[parskip]{scrreprt} since this makes big spacing. Another question: What does afterskip=1.25\baselineskip plus .1\baselineskip minus .12\baselineskip mean? Why can't i just say 1.23\baselineskip (1,25+0,1-0,12=1,23) – The Shadow Sep 8 at 15:54
  • @TheShadow I just copied you MWE. I will update the MWE. Regarding afterskip: This is the way you get some stretch before and after the heading. The first figure is the normal space, the next is how much additional space Latex may add if necessary, and the third how much space it may remove if necessary to get a OK page break. – Sveinung Sep 8 at 16:00
  • thank you for your help. In your updated MWE the blank lines between the two paragraphs is removed when removing the two \\ , because parskip option is missing. Whith \documentclass[a4paper,12pt,chapterprefix=true,parskip]{scrreprt} the vertical space between \paragraph{Ein Absatz} and \blindtext is again very big, which i want to have reduced to just a normal \newline. So the actual Question is: How to replace \\ , since it is considered to be bad style AND keeping the normal line break after paragraph in KOMA-Script? Package parskip does it, but throws a warning – The Shadow Sep 8 at 16:15
  • Let me explain: I do want to have a linebreak after the paragraph title \paragraph{title}, but I don't want to have spacing between the title and the following text. Additionally I want to have a blank line between paragraphs, but not a indent in the firstline. So the given mwe gives me the output I actually want to achieve, but it uses \\ for linebreaks, which should not be used regarding to a lot of form posts (here and elsewhere). – The Shadow Sep 8 at 17:24
  • 1
    @TheShadow Have a look at the updated answer. The new code should work according to you description. – Sveinung Sep 8 at 18:57

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.