23

I would like items in a list to have a hanging indent (that is, for all lines after the first to be indented by a space or more), but the traditional \hangindent command doesn't work for this.

\documentclass{article}

\begin{document}
\hangindent=1cm This line of text has a hanging indent that looks fine, as long as it is outside a list environment.
\begin{enumerate}
\item \hangindent=1cm This line is inside a list environment and doesn't have a hanging indent- how can I add one?
\end{enumerate}
\end{document}

enter image description here

How can I add a hanging indent within a list?

1 Answer 1

25

You can use the enumitem package:

\documentclass{article}
\usepackage{enumitem}
\usepackage{lipsum}% just to generate text for the example

\begin{document}

\begin{enumerate}[leftmargin=!,labelindent=5pt,itemindent=-15pt]
\item \lipsum[4]
\item \lipsum[4]
\end{enumerate}

\end{document}

enter image description here

Another option, not requiring packages would be to use the TeX primitive \parshape:

\documentclass{article}
\usepackage{lipsum}

\newlength\listindent
\setlength\listindent{20pt}

\begin{document}

\begin{enumerate}
\parshape 2 0cm \linewidth \listindent \dimexpr\linewidth-\listindent\relax
\item \lipsum[4]
\item \lipsum[4]
\end{enumerate}

\end{document}

enter image description here

2
  • Why is \itemindent using a negative value? Commented May 11, 2014 at 10:05
  • @JonathanKomar The whole paragraph is shifted to the right, so the first line is "un-indented", so to speak.
    – Cicada
    Commented Jun 15, 2022 at 5:32

You must log in to answer this question.

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