0

I encountered a problem regarding the spacing between two lines of an item when wrapping a row of text.

Here is a MWE:

\documentclass[a4paper, 12pt]{article}

\begin{document}
\noindent
Some text some text some text some text some text some text some text.

Some wrapped text some wrapped text some wrapped text some wrapped text:

\begin{enumerate}
    \item Some other text some other text some other text some other text some other text some other text.

    Here lies the problem.

    \item Some other text some other text some other text some other text some other text some other text.
\end{enumerate}
Some boring text again some boring text again some boring text again. 

\end{document}

Which gives the following image as an output:

enter image description here

As can be seen, the vertical space between the lines of the top text is different than the one between the lines of the first item.

I could fix it by using the enumitem package and setting parsep=0pt, but doing so also changes the spacing between the two items, which is given by \itemsep + \parsep, and I don't want that.

Another way could be to set a negative vertical space before the wrapped line using the \vspace{} command, but I'm unable to find the correct value of vertical space to remove and it also feels a bit sloppy to me.

How can I get correct line spacing for the wrapped line of the item, by maintaining all other spacings the same?

Thank you for your time, it is very appreciated.

  • this is intended (deliberately designed) features. i would not change it. however, using enumitem you can easily changes vertical distances by defining new values for topsep, partopsep, parsep and itemsep. – Zarko Feb 8 at 10:12
  • @Zarko, thanks, I've tried setting parsep=0pt but by doing so it also changes the spacing between items, and I don't want that to happen. It's the first time I use an enumerate environment so I very likely might have misunderstood something. – Edoardo Serra Feb 8 at 10:22
  • unfortunately documentation of enumitem doesn't contain image of lists layout. so you need to find it somewhere else, that you will see what define each mentioned distances . if you have installed memoir package, you will find it on page 137 of its documentation. – Zarko Feb 8 at 10:37
  • 1
    you can also find sketch of list layout on texblog.net/latex-beginners-guide/examples/chapter-4 – Zarko Feb 8 at 10:51
  • 1
    @Zarko perhaps a feature request? github.com/jbezos/enumitem – daleif Feb 8 at 10:55
1

You can set \parsep to 0pt, and increase the value of \itemsep of the default value of \parsep (5pt). Also add paragraph indent inside the list. All this is easy with package enumitem.

\documentclass[a4paper, 12pt]{article}
\usepackage{enumitem}

\begin{document}
\noindent
Some text some text some text some text some text some text some text.

Some wrapped text some wrapped text some wrapped text some wrapped text some wrapped text:

\begin{enumerate}[parsep = 0pt, listparindent=1em, itemsep=10pt]
    \item Some other text some other text some other text some other text some other text some other text.

    A problem? What problem?

    \item Some other text some other text some other text some other text some other text some other text.
\end{enumerate}
Some boring text again some boring text again some boring text again.

\begin{enumerate}
    \item Some other text some other text some other text some other text some other text some other text.

    Here lies the problem.

    \item Some other text some other text some other text some other text some other text some other text.
\end{enumerate}

\end{document} 

enter image description here

  • Thank you very much, I think that the indentation in a 12pt document is of 1.5em. I read it somewhere, can't remember where though. – Edoardo Serra Feb 8 at 10:56
  • 1
    I guess this is an American standard. I'm using a European standard, which looks better in my opinion for a list (there's already a global indentation of the list…) – Bernard Feb 8 at 10:59

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.