TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 13 down vote accepted

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

share|improve this answer
    
Exactly what I was looking for, thanks! – David Robinson Nov 1 '12 at 5:17
    
Why is \itemindent using a negative value? – macmadness86 May 11 '14 at 10:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.