1

I am using compactenum in the paralist package. I wish to have spacing between paragraphs within an item, but no additional spacing between items. The option:

\plparsep: Space between paragraphs within an item the parskip for this environment.

seems like this should be it. But using this also produces space between two items. How can I get additional vertical space but only within an item?

MWE

\documentclass[12pt]{report}
\usepackage{paralist}
\plparsep 0.2in

\begin{document}
  \begin{compactenum}
   \item foo

   bar

   \item foo
   \item bar
  \end{compactenum}
\end{document}

As written, I get the spacing within the first item like I want, but I also get additional spacing between the 2nd and 3rd items. Commenting out \plparsep 0.2in gives exactly the opposite: no spacing within the first item and no spacing between the 2nd and 3rd items.

3
  • Something like this? \plparsep=0.2in \plitemsep=-0.2in
    – Malipivo
    Apr 12, 2014 at 19:50
  • @Malipivo: I thought of doing something along those lines, but it felt like more of a hack to me. Going through the documentation more thoroughly, it seems like this is the only decent solution using compactenum. I'd accept this as an answer.
    – RghtHndSd
    Apr 12, 2014 at 20:30
  • We could modify it to you needs, but in that case you must describe it more precisely. Also there are some other packages capable of handling itemize lists.
    – Malipivo
    Apr 12, 2014 at 20:40

2 Answers 2

2

We used \plparsep=0.2in and negative value in \plitemsep: \plitemsep=-0.2in. For now this is our result.

%! *latex mal-spacing.tex
\documentclass[12pt]{report}
\pagestyle{empty}
\usepackage{paralist}
\plparsep=0.2in
\plitemsep=-0.2in
\begin{document}
Text before.
  \begin{compactenum}
   \item foo\par
   bar1\par
   bar2\par
   \item foo
   \item bar
  \end{compactenum}
Text after.
\end{document}

mwe

1

You can have the same result with the enumitempackage, which is much more versatile.

Here are two examples, in which I chose to make the label indentation equal to paragraph indentation:

\documentclass[12pt, a4paper]{report}

\usepackage[utf8]{inputenc}
\usepackage[textheight = 24cm]{geometry}
\pagestyle{empty}
\usepackage{lipsum}
\usepackage{enumitem}
\setlist[enumerate, 1]{labelindent=\parindent, labelwidth=0.5em, leftmargin=!, align=left}

\begin{document}

\lipsum[1]
  \begin{enumerate}[noitemsep, parsep = 0.5cm, itemsep = -\parsep ]
   \item foo\par
   bar1\par
   bar2\par
   \item foo
   \item bar
  \end{enumerate}

  \lipsum[2]
  \begin{enumerate}[nosep, parsep = 1cm, itemsep = -\parsep ]
   \item foo\par
   bar1\par
   bar2\par
   \item foo
   \item bar
  \end{enumerate}

  \lipsum[3]

\end{document} 

enter image description here

You must log in to answer this question.

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