2

If you want vertical space between your paragraphs and no indentation, then as I have seen, the best solution is to use the parskip package. But in the documentation that package has no options, so how do you change that vertical space if you want to add more or less of it?

15
  • Not sure what the package offers, but you can do it package free, with \parindent=0pt\relax and \parskip=<your dimension>\relax in your preamble (or anywhere where you want it to change), where <your dimension> is the desired amount of \parskip. – Steven B. Segletes May 2 '16 at 19:13
  • 1
    @StevenB.Segletes But that's not recommended as parskip makes adjustments to mitigate the inevitable side-effects. (Not complete adjustments, but much better than nothing.) – cfr May 2 '16 at 19:16
  • @cfr side effects? this is news to me. Do you have a pointer? – Steven B. Segletes May 2 '16 at 19:16
  • @StevenB.Segletes I was thinking exactly the same as cfr. Actually I have read some answers by you concerning \parindent. :) – Adam May 2 '16 at 19:17
  • 1
    @StevenB.Segletes And since so many things are lists, list spacing has rather wide ranging effects i.e. not just on the things which 'look like' lists but all the other 'trivial' lists .... – cfr May 2 '16 at 19:39
3

Here, I take parskip.sty, rename it as myparskip.sty and make the following changes:

1) change to \ProvidesPackage{myparskip}

2) change

\parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt

to

\ifdim\parskip>0pt\relax
  \advance\parskip by 0pt plus 2pt
\else
  \parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt
\fi

This has the effect if called with a zero value of \parskip, it mimics what the parskip package would do (which is to set \parskip to a value of 0.5\baselineskip). On the other hand, if \parskip is specified to a non-zero value in advance of calling the package, it will take that as the new default value and do the other things the parskip package would do, such as adding glue to the \parskip dimension, and adjusting vertical dimensions associated with list making.

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{myparskip}

\ifdim\parskip>0pt\relax
  \advance\parskip by 0pt plus 2pt
\else
  \parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt
\fi
\parindent=\z@

%
% from a suggestion by Donald Arseneau on comp.text.tex:

\DeclareOption{parfill}{\setlength{\parfillskip}{30\p@ \@plus 1fil}}
\ProcessOptions

% To accompany this, the vertical spacing in the list environments is changed
% to use the same as \parskip in all relevant places (for normalsize only):
%   \parsep = \parskip
%   \itemsep = \z@ % add nothing to \parskip between items
%   \topsep = \z@ % add nothing to \parskip before first item

\def\@listI{\leftmargin\leftmargini
   \topsep\z@ \parsep\parskip \itemsep\z@}
\let\@listi\@listI
\@listi

\def\@listii{\leftmargin\leftmarginii
   \labelwidth\leftmarginii\advance\labelwidth-\labelsep
   \topsep\z@ \parsep\parskip \itemsep\z@}

\def\@listiii{\leftmargin\leftmarginiii
    \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
    \topsep\z@ \parsep\parskip \itemsep\z@}

% and, now...
%   \partopsep = \z@ % don't even add anything before first item (beyond 
%                    % \parskip) even if the list is preceded by a blank line
\partopsep=\z@

% Note that listiv, listv and listvi don't change vertical parameters.

% deal with a problem raised on comp.text.tex in april 2001
%
% don't expand the table of contents any further
%
% first: check that the definition of \@starttoc is unchanged from
% that in latex.ltx
\@ifundefined{CheckCommand}{}{%
  \CheckCommand*{\@starttoc}[1]{%
    \begingroup
      \makeatletter
      \@input{\jobname.#1}%
      \if@filesw
        \expandafter\newwrite\csname tf@#1\endcsname
        \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
      \fi
      \@nobreakfalse
    \endgroup}}
%
% now having generated any warning that might help, redefine
\renewcommand*{\@starttoc}[1]{%
  \begingroup
    \makeatletter
    \parskip\z@
    \@input{\jobname.#1}%
    \if@filesw
      \expandafter\newwrite\csname tf@#1\endcsname
      \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
    \fi
    \@nobreakfalse
  \endgroup
}

\endinput

Consider this MWE, which gives the default parskip package behavior:

\documentclass{article}
\usepackage{lipsum}
%\parskip\baselineskip
\usepackage{myparskip}
\begin{document}
\lipsum[1]
\begin{itemize}
\item the first
\item the second
\item the third
\end{itemize}
\lipsum[2-6]
\end{document}

enter image description here

When the \parskip value is set in advance (uncomment the one line in the preamble), it affects the paragraph and list-making spacing both:

enter image description here

2

Just do

\usepackage{parskip}

\setlength{\parskip}{0.75\baselineskip plus 2pt}

which will override the default value 0.5\baselineskip plus 2pt.


If you want a packaged version, save the following as oparskip.sty

\ProvidesPackage{oparskip}[2016/05/02]

\DeclareOption{parfill}{\PassOptionsToPackage{parfill}{parskip}}
\DeclareOption*{\edef\oparskip@factor{\CurrentOption}}

\ExecuteOptions{0.5} % default

\ProcessOptions\relax

\RequirePackage{parskip}

\setlength{\parskip}{\oparskip@factor\baselineskip plus 2pt}

\endinput

Then you can call

\documentclass{article}
\usepackage[0.75]{oparskip}

\usepackage{lipsum}

\begin{document}
\lipsum[1]
\begin{itemize}
\item the first
\item the second
\item the third
\end{itemize}
\lipsum[2-6]

\end{document}

If you want the equivalent of \usepackage[parfill]{parskip} with a modified factor, call

\usepackage[0.75,parfill]{oparskip}
0
0

As of today, the revised parskip package wants the skip value specified in the option, like so:

\usepackage[skip=0.75\baselineskip plus 2pt]{parskip}

As Frank says in the documentation, it isn't perfect. I notice squishing when the page has elements that aren't in the main body of the test, such as tables, equations, and footnotes.

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.