[Tex/LaTex] Enumitem: Indented list where new paragraphs are not indented

enumitemlists

I want to create an indented list where new (non-itemized) paragraphs inside the list are not indented at all (that is, they are aligned with the left margin of the main text. See image below).

I am using the enumitem package with the following options:

labelsep=8pt,                           
labelindent=0.5\parindent,               
itemindent=0pt,
leftmargin=*,                         
listparindent=-\leftmargin

(the * should serve to calculate the value of \leftmargin from the other parameters and the automatically computed label width). However, this doesn't result as expected (see MWE below). If I set instead

leftmargin=3cm                         
listparindent=-\leftmargin

it works as intended (but I do not want to set the left margin to a particular value, what I want is a fixed \labelindent and \labelsep). Inserting

\noindent\hskip-\leftmargin

at the beginning of the offending paragraph also works, but is not very systematic indeed. How should I set the enumerate options to achieve what I want?

MWE

\documentclass{article}
\usepackage{enumitem}
\setlist[enumerate]{%
labelsep=8pt,%                           
labelindent=0.5\parindent,%               
itemindent=0pt,%
leftmargin=*,%                          
listparindent=-\leftmargin% 
}

\begin{document}
A normal paragraph of text just to show where 
the left margin lies, for comparison. New paragraphs 
inside enumerate should start at that left margin.

\begin{enumerate}[label=Case \arabic*:]
\item By setting the enumerate options in a 
(I think) sensible manner, I don't achieve what I want 

This paragraph shouldn't be indented at all!

\item I want to set the options so that new paragraphs 
behave like the following one

\noindent\hskip-\leftmargin 
This paragraph is indeed not indented at all!
\end{enumerate}

\begin{enumerate}[resume*,leftmargin=3cm,listparindent=-\leftmargin]
\item Setting a specific value for leftmargin also works\dots

But this is not what I want :-(
\end{enumerate}
\end{document}

enter image description here

I'd avoid doing this for all enumerate environment; define a new list for this.

Best Answer

I'm not sure why you want to do this. However, here's the way:

\documentclass{article}
\usepackage{showframe}
\usepackage{enumitem}

\setlist[enumerate]{
  labelsep=8pt,
  labelindent=0.5\parindent,
  itemindent=0pt,
  leftmargin=*,
  before=\setlength{\listparindent}{-\leftmargin},
}

\begin{document}
A normal paragraph of text just to show where 
the left margin lies, for comparison. New paragraphs 
inside enumerate should start at that left margin.

\begin{enumerate}[label=Case \arabic*:]
\item By setting the enumerate options in a 
(I think) sensible manner, I don't achieve what I want

This paragraph shouldn't be indented at all!

\item I want to set the options so that new paragraphs 
behave like the following one

This paragraph is indeed not indented at all!
\end{enumerate}

\begin{enumerate}[resume*,leftmargin=3cm,listparindent=-\leftmargin]
\item Setting a specific value for leftmargin also works\dots

This is what I want.
\end{enumerate}
This is what I want. % just to show the left margin

\end{document}

You have to delay setting \listparindent when the value of \leftmargin has been determined.

enter image description here

Related Question