76

Sorry, because I think it's a many times asked topic. But I don't find an example which help me to understand how to create a white space between paragraphs.

I think parskip is the package I need to use but I don't know how to use it.

I have this sample of LaTeX trying to understand how to use parskip package. What am I doing wrong?

\documentclass{report}

\usepackage{parskip}

\begin{document}
\setlength{\parskip}{0pt} % 1ex plus 0.5ex minus 0.2ex}
\setlength{\parindent}{0pt}

\section{Section Headings}

We explain in this section how to obtain headings
for the various sections and subsections of our
document.

\subsection{Headings in the `article' Document Style}

In the ``article'' style, the document may be divided up
into sections, subsections and subsubsections, and each
can be given a title, printed in a boldface font,
simply by issuing the appropriate command.
\parskip
Lorem ipsum `comillas simples' sit amet, consectetur adipiscing elit.
Fusce at augue nisi. Mauris vel metus velit. Nunc vitae augue justo, non euismod risus.
Nullam et bibendum nisl. Vestibulum nec leo lectus. Phasellus non dui et ipsum malesuada
venenatis vitae ut risus. Phasellus tincidunt erat sollicitudin leo auctor sed porta leo
commodo. Nullam et adipiscing libero. Ut et mi ac dui facilisis faucibus. Fusce eget magna
a quam volutpat accumsan. Duis dictum luctus ligula, at facilisis leo blandit sit amet.
Phasellus congue ornare lectus scelerisque malesuada. Praesent et cursus nulla. Quisque
aliquam felis ac nunc scelerisque a consectetur elit mattis.
\\

\end{document}

Will this spacing work in the entire document?

3
  • 6
    I refurbished your question a bit, hope you don't mind; in particular the title, in order to make your question different from tex.stackexchange.com/q/42/4012; and your code: I took out several lines that weren't related to your current problem. Please have a look at our meta-question about minimal working examples (MWEs) so that you'll be able to write even better question next time :).
    – doncherry
    Jan 8, 2012 at 11:58
  • The \setlength commands should come before \begin{document}
    – Rodolfo
    Dec 3, 2015 at 23:57
  • If I move the \setlength commands to the preamble, I still get the error ! Missing number, treated as zero. Dec 4, 2015 at 0:04

1 Answer 1

83

Just load the parskip package and don't change the \parskip and \parindent lengths manually. In the document body, don't use \parskip but a blank line to separate paragraphs.

BTW, there's normally no need to add manual line breaks (\\) in the text.

\documentclass{article}

\usepackage{parskip}

\begin{document}

We explain in this section how to obtain headings
for the various sections and subsections of our
document.

In the ``article'' style, the document may be divided up
into sections, subsections and subsubsections, and each
can be given a title, printed in a boldface font,
simply by issuing the appropriate command.

\end{document}

enter image description here

5
  • 7
    I would load the package with the parfill option as this addresses some issues that can arise with 'square' paragraphs.
    – Joseph Wright
    Jan 8, 2012 at 12:10
  • This does not change indents in quotation environments. Sep 21, 2013 at 18:10
  • 2
    @MariusHofert Have a look at tex.stackexchange.com/questions/2396/…
    – lockstep
    Sep 21, 2013 at 18:17
  • What if you want parskip but want to insert the occasional paragraph indent? Is there a command for a one-off thing?
    – user71207
    Jun 19, 2021 at 7:08
  • No newline will be inserted, when using \\ at eol a new line will be there. Dec 9, 2022 at 11:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .