# Parskip: Suppressing parskip in some places

I use the package parskip, but want to suppress the parskip in some places, i.e. after headings inserted by a specific macro.

A negative vspace doesn't work, since parskip's spacing can stretch.

The only workaround I found is using \\ instead of a paragraph, but that feels wrong. Is there a better way?

\documentclass{article}
\usepackage{parskip}

\begin{document}
foo\par bar\par baz

{\parskip=0pt
foo\par bar\par baz\par}

foo\par bar\par baz
\end{document}


Or as a command:

\documentclass{article}
\usepackage{parskip}
\newcommand\foo[1]{\par#1\par\vspace{-\parskip}}
\begin{document}
bar\par bar

\foo{some nonsense}

bar\par bar

\foo{some nonsense}

bar

\end{document}

• That looks good, thanks. Can I use that to define a macro \foo that prints a paragraph foo after which there is no parskip? The obvious {\parskip=0pt foo\par} doesn't work, since the parskip as applied where a paragraph begins, not where it ends. May 4 '13 at 10:05