38

Is there a way to change how description lists are indented?

I have something like:

Normal text

List item
List Item

I would like something like:

Normal text

    List item
    List Item
onewhaleid
  • 1,257
Tiago Veloso
  • 4,599

4 Answers4

61

I recommend to use the enumitem package which offers a lot of features for customizing lists - both fine tuning and also consistent list adjustment. For example, just by \setlist[description]{leftmargin=1cm,labelindent=1cm} you could indent the description list by 1 cm. Raise leftmargin or use any value you like for the arguments. More can be found in the package documentation.

A complete example:

\documentclass{article}
\usepackage{enumitem}
\setlist[description]{leftmargin=\parindent,labelindent=\parindent}
\begin{document}
\section{Test}
left aligned text
\begin{description}
 \item[One] first item
 \item[Two] second item
 \item[Three] third item
\end{description}
\end{document}

enter image description here

With enumitem, you could even specify it locally, case-by-case, using optional arguments:

\begin{description}[labelindent=1cm]
...
Harrison
  • 145
Stefan Kottwitz
  • 231,401
  • 1
    Note: \parindent doesn't work if you have another description within a description item. cm seems to be ok. – Karoly Horvath Jul 23 '13 at 08:26
  • 1
    Multi-line description items might look better if they're indented with hanging indent: \setlist[description]{leftmargin=1cm,labelindent=0cm}. Cheers! – lmat - Reinstate Monica Feb 06 '21 at 21:39
  • 2
    A quick note: enumitem is in conflict with beamer. – Yan Foto Mar 01 '21 at 21:45
  • \parindent also won't work as expected if it is in fact set to zero, e.g. by using the parskip package. I find that using labelindent=\leftmargin (which defaults to 25pt BTW) works well. Modifying leftmargin itself isn't necessary. – chsk Nov 16 '21 at 14:36
13

I like Stefan's answer a lot, but if you'd prefer not to install a new package and are okay with a hacky solution, you could just enclose the description in a quote or quotation environment.

Punya
  • 723
  • 1
    What would this hacky solution be in this case? I am new to LaTeX and do not know how I would implement this. – dylanvanw Jun 28 '20 at 13:58
8

redefine the environment:

\documentclass{article}
\renewenvironment{description}[1][0pt]
  {\list{}{\labelwidth=0pt \leftmargin=#1
   \let\makelabel\descriptionlabel}}
  {\endlist}

\parindent=0pt
\begin{document}
\rule{\linewidth}{1pt}

default text
\begin{description}
 \item[foo] bar
 \item[foobar] bar
 \item[foo] bar
\end{description}

\begin{description}[1cm]
 \item[foo] bar
 \item[foobar] bar
 \item[foo] bar
\end{description}
\end{document}

enter image description here

1

Also, if you don't want to install another package, you can do what I've done below, since embedded lists are indented. You'll have to hit for each time you do this when you compile, though.

\begin{description}

\begin{description}

 \item[One]first item

 \item[Two]second item

 \item[Three]third item

\end{description}

\end{description}
dustin
  • 18,617
  • 23
  • 99
  • 204
  • Are you sure that it works? – karlkoeller Jul 06 '13 at 05:35
  • 3
    It works, but throws an error for a missing \item. Like Punya answered, using quote instead of description is then cleaner. – iled Nov 14 '16 at 06:22
  • If it throws an error, then by definition it doesn't work. It's Very Poor Practice Indeed (VPPI) to ignore (La)TeX's error messages because the final output looks OK. – chsk Nov 16 '21 at 14:26