Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 10 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
add comment

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.