[Tex/LaTex] Indentation in list environment

indentationlistsspacing

How can I specify explicitly both the indentation of the label and the actual item's text from the left margin in a list environment. I would like to achieve the following:

Best Answer

Your specifications are not very clear; the following could be what you need:

\usepackage{enumitem,lipsum} % in your preamble


\begin{description}[leftmargin=2cm,itemindent=0cm,
  labelindent=1cm,labelwidth=\dimexpr1cm-.5em\relax,
  labelsep=!,align=left]
\item[X] \lipsum*[4]
\item[First] \lipsum*[2]
\item[Second] \lipsum*[3]
\end{description}

(As always, lipsum is used only to provide dummy text.)

If you want to be able to set the dimensions at usage time, you can define a personal environment, such as

\newenvironment{xdesc}[2]
  {\begin{description}[leftmargin=#2,
     labelindent=#1,labelwidth=#1,
     labelsep=0pt,align=left,style=multiline]}
  {\end{description}}

to be called as

\begin{xdesc}{1cm}{3cm}
\item[X] \lipsum*[4]
\item[First] \lipsum*[2]
\item[Second and more] \lipsum*[3]
\end{xdesc}

where the first argument is, in your notation, sep1 and the second argument is sep2.

Related Question