Page LayoutSpaces between Paragraphs but not after Headings

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
ocs
Posts: 3
Joined: Sun Jul 17, 2011 4:56 pm

Spaces between Paragraphs but not after Headings

Post by ocs »

Hi,

I am creating a big document, and would like to have space between each paragraph.

I have tried

Code: Select all

\setlength{\parindent}{0pt}
\setlength{\parskip}{\baselineskip}
but it adds space after each chapter and section heading as well.

I saw that there are

Code: Select all

\usepackage{parskip}
\usepackage[parfill]{parskip}
Are they the correct package to use?

What is a difference between them and how to use them, i.e. how to set the option?

A simple example on how to use them would be much appreciated.

Thank you in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Spaces between Paragraphs but not after Headings

Post by localghost »

ocs wrote:[…] Are they the correct package to use? What is a difference between them and how to use them, i.e. how to set the option? […]
It is the same package loaded without options (first line) and loaded again with an option (second line). This doesn't make sense. It just needs one line in the preamble of your document.

Code: Select all

\usepackage[parfill]{parskip}
No more, no less. For further details refer to the parskip manual. If already installed on your machine, you can access the manual on the command line.

Code: Select all

texdoc parskip
This package is no replacement for a properly designed document class like those from the KOMA Script bundle or the memoir class.


Best regards and welcome to the board
Thorsten
ocs
Posts: 3
Joined: Sun Jul 17, 2011 4:56 pm

Spaces between Paragraphs but not after Headings

Post by ocs »

Thank you for your reply.

Sorry for a novice question, I have just started learning latex and still not familiar it.

Code: Select all

\usepackage[parfill]{parskip}
I have looked at the manual but still do not know how to set the space between the paragraphs to \baselineskip?

Are you suggesting that I should use KOMA Script bundle or the memoir class instead?

Thank you.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Spaces between Paragraphs but not after Headings

Post by localghost »

ocs wrote:[…] Sorry for a novice question, I have just started learning latex and still not familiar it. […]
Then you should be interested in some stuff for beginners [1]. The list contains some very helpful documents.
ocs wrote:[…] I have looked at the manual but still do not know how to set the space between the paragraphs to \baselineskip? […]
The package sets this space to 0.5\baselineskip plus 0.2pt, thus a rubber length that can be stretched if necessary. You still can assign another value to this length.

Code: Select all

\setlength{\parskip}{\baselineskip}
But do this after loading the package. Note that a fixed length is not really advisable.
ocs wrote:[…] Are you suggesting that I should use KOMA Script bundle or the memoir class instead? […]
Exactly. These classes are much more sophisticated.
Post Reply