3

Edit If you prefer some additional space between paragraphs, you can't simply do

\setlength{\parskip}{<length>}

as this will also modify settings for list environments, the table of contents,... headings.

The parskip package takes care of list environments and the table of contents but not headings as can be seen in this code

\documentclass{book}
\usepackage{lipsum}%parskip}
\usepackage{eso-pic,tikz}

\AddToShipoutPicture{%
\begin{tikzpicture}[overlay,remember picture]
  \draw[blue!20!white,thin]
       (current page.south west) grid [xstep=10mm,ystep=4mm] (current page.north east);
\end{tikzpicture}}


\begin{document}
\chapter{test}
\section{test}
\lipsum[1-4]
\end{document}

enter image description here

enter image description here

How can we change the amount of space between paragraphs without changing any thing else?

Original question When I modify the usual \parskip it adds space to everything: formulas, titles,.. I want to change spacing only between paragraphs, not any other things. The parskip package does not help.

How can I avoid that?

cfr
  • 198,882
user14416
  • 838
  • Sorry, but this is very unclear. – egreg Apr 26 '15 at 22:15
  • \usepackage{parskip}. – cfr Apr 26 '15 at 22:16
  • @egreg is it clear now? – user14416 Apr 26 '15 at 22:36
  • @cfr This does not work. – user14416 Apr 26 '15 at 22:36
  • Sorry but 'does not work' is not at all clear. How doesn't it work? Does your document not compile? Does your computer have a tantrum and refuse to get ready for bed? The parskip package is designed to do exactly what you say you want to do. Without an example or any sort of information at all, I obviously can have no idea in what way it fails to meet your requirements or why it does so. For all I know, you aren't even using LaTeX. That was just a guess. If not, obviously it won't work. – cfr Apr 26 '15 at 22:38
  • @egreg what i understand is that the OP want to change vertical space separete text paragraphs without changing sepacing of pargraphs used in chapter ans so like by the command \par used internely therein. when i read this question the first time it comes to me the answer: add vertical space manully. – touhami Apr 27 '15 at 05:59
  • @touhami yes, you understood it right. Then the question is is it possible to do by latex automatically, or I need to do it manually for all the paragraphs. – user14416 Apr 27 '15 at 22:03
  • it may be possible for some one like @egreg. But you shoud edit your question before it will be closed – touhami Apr 27 '15 at 22:19
  • there is two way to end paragraph: with \par command or with blank line, the idea is redefine one of them to be slightly different – touhami Apr 27 '15 at 22:29
  • @cfr can you edit this question – touhami Apr 27 '15 at 22:33
  • @touhami Why don't you edit it? I'm not objecting to being asked: I'm just confused about what you want me to do. Shouldn't the OP edit it? – cfr Apr 27 '15 at 23:19
  • @user14416 The parskip package is designed to do just what the you seem to want. It makes adjustments so that the things which use \parskip for spacing don't all end up inserting too much vertical space when \parskip is set to a non-zero minimum. At least, that's how I understand its purpose. As far as I know, that's the reason to use parskip rather than setting \parskip & \parindent manually. Just saying it 'doesn't work' is not helpful. If you say in which specific ways it falls short, it might be possible to suggest additional changes to better realise your ideal. – cfr Apr 27 '15 at 23:24
  • @cfr you are right the OP should do but may be he don't know that the question will be closed soon, I can't edit because of my english. – touhami Apr 28 '15 at 06:41
  • @touhami If you want to edit it and ping me, I'll tidy up the English if you like. I think your English is pretty good anyway, but I'd be happy to check. I'm not sure how to edit the question because I don't understand why parskip doesn't work. – cfr Apr 28 '15 at 12:14
  • @cfr i will try to edit this question and indeed parskip doesn't answer the OP's need it change spacing – touhami Apr 28 '15 at 20:04
  • @cfr i edit the question – touhami Apr 28 '15 at 20:25
  • @AlanMunn may be duplicated but the answers therein don't fill need here – touhami Apr 28 '15 at 20:55
  • @touhami Edited as promised... ;). – cfr Apr 28 '15 at 22:59
  • OK. So it isn't true that parskip 'doesn't help' which suggested to me that the problem was some completely different one. The issue is that the package does not solve all of the issues. Is that right? – cfr Apr 28 '15 at 23:02

1 Answers1

2

See the titlesec package documentation:

after-sep is the separation between title and text—vertical with hang, block, and display, and horizontal with runin, drop, wrap and ...margin. By making the value negative, you may define an effective space of less than \parskip

\titlespacing*{\section}{0pt}{before-sep}{after-sep}

You should be able to get the result you want by using this command to "undo" the additional spacing created after section headings when using \setlength{\parskip}{<length>} to adjust the inter-paragraph spacing.