2

I'm looking for an environment that controls spacing of paragraphs exactly like the parskip package, e.g.

\begin{document}
Here's a paragraph with regular indentation.

Another, etc.

\begin{parskip}
The paragraphs in this block

will have single space and no indent,

and will not have weird spacing issues with lists.
\end{parskip}

\end{document}

Is such a thing available?

1
  • Welcome to TEX.se. Please provide a minimal working example of fully compilable code starting with \documentclass... and ending with \end{document}. This would help us a lot to help you.
    – JMP
    Apr 18, 2016 at 20:33

1 Answer 1

3

You could just copy the relevant changes form parskip.sty and wrap them in an environment. I named it Parskip (uppercase P!) because \parskip is already defined as a length an thus there can't be an environment named parskip (lowercase p).

\documentclass{article}

\makeatletter

\newenvironment{Parskip}{%
   \par
   \parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt
   \parindent=\z@
   \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@}
   \partopsep=\z@
}{\par}

\makeatother

\usepackage{lipsum}%just for demonstration

\begin{document}
Here's a paragraph with regular indentation.

\lipsum[1-3]

\begin{Parskip}
The paragraphs in this block will have single space and no indent
and will not have weird spacing issues with lists.

\lipsum[2]
\begin{itemize}
   \item One
   \item Two
   \item Three
\end{itemize}
\lipsum[3-4]
\end{Parskip}

\lipsum[2]
\begin{itemize}
   \item One
   \item Two
   \item Three
\end{itemize}
\lipsum[3-4]
\end{document}

result

\makeatletter/-other is to (de)activate @ as part of macro names. I used lipsum to add some more text for this demo, but it is not necessary for your real document.

2
  • This is exactly what I was looking for, but it didn't seem to solve the problem. Whenever one of my paragraphs ends at a line break, an extra parskip is added. I would have thought the parskip package would have corrected this behavior.
    – jwalk
    Apr 18, 2016 at 21:02
  • If you're interested: tex.stackexchange.com/questions/305045/…
    – jwalk
    Apr 18, 2016 at 21:17

You must log in to answer this question.

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