Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using KOMA-script scrreprt class.

I know I can use \usepackage{parskip} or \setlength{\parskip}{12pt}, but both of these also affect headings.

Adding \vspace{12pt} manually between all two sequential paragraphs seems to work, but that's anything but convenient. Is there a way to automate it?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

If you use a KOMA-Script class, the solution is already provided by the class itself:

\documentclass[parskip=full]{scrreprt}

(page 49 in the English documentation).

You can also add

\usepackage{etoolbox}
\appto\chapterheadendvskip{\vspace{-1\parskip}}

if you don't want a \parskip added immediately after a chapter title.

For section titles use titlesec. For customizing the amount of the \parskip, use something like

\setparsizes{\parindent}{50pt plus 20pt minus 30pt}{\parfillskip}

in your preamble (adjusting the ridiculous values I put just as an example). It's important to provide stretching and shrinking components to help text fit in the page.

share|improve this answer
    
But this solution too adds vertical space after chapter headings. –  Andres Jul 28 '11 at 14:28
    
You can't add more spacing between paragraphs by this method, however. –  Seamus Jul 28 '11 at 14:32
1  
@Seamus Yes, by using \setparsizes{\parindent}{50pt}{\parfillskip}; the first argument sets the parindent, the second the parskip and the third the parfillskip. Passing the parameters themselves will not change them. –  egreg Jul 28 '11 at 14:39
    
@egreg aha. That looks like it might be closer to solving Andres' problem, I think you should add that to your answer. –  Seamus Jul 28 '11 at 14:58
    
Thanks to both of you, here is what I ended with: pastebin.com/Gizvvszc It actually adds about 1mm to list spacing and removes some millimeters from section and lower level headings' spacing compared to using scrreprt without setting parskip, but as this is customizable it's ok. –  Andres Jul 28 '11 at 15:49

I expect the best way would be to use parskip (KOMA has its own way of affecting paragraph skips I think) and then changing the heading spacing to compensate. Here's an example to show how you might do it with the titlesec package.

\documentclass{scrartcl}
\usepackage{parskip,lipsum,titlesec}
\setlength{\parskip}{50pt}
\titlespacing*{\section}{0pt}{-40pt}{-40pt}
\begin{document}
\section{First}
\lipsum[1-5]
\section{Second}
\lipsum[6-10]
\end{document}

(I've exaggerated the parskip so it's easier to see what's going on.) You may want to add stretch glues to the beforeskip and afterskip arguments of \titlespacing.

share|improve this answer
    
Lists also use paragraph spacing this way. Section titles are okay and this approach can also be used for subsection and etc, but what about chapters? –  Andres Jul 28 '11 at 12:41
    
You have to use \parskip=0pt in the code for chapter make up. –  egreg Jul 28 '11 at 12:45
    
@Andres I've not had time to test this properly. What goes wrong with chapters? Does egreg's comment help? –  Seamus Jul 28 '11 at 12:57
    
Chapter headings appearently use \parskip value and ignoe \titlespacing. –  Andres Jul 28 '11 at 12:59
    
@Andres titlesec can do \titlespacing*{\chapter}... try that? –  Seamus Jul 28 '11 at 13:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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