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 am currently writing a set of steps for my lecture notes on circles but when the description of the step is too long, becomes multiline, the enumerated environment does not left indents properly as I would like it to be. See my example below at the third step, the word "sides" should be directly below the word "Take":

\documentclass[letterpaper]{article}
\usepackage{fullpage}
\usepackage{amsmath,amssymb,amsthm,enumitem}

\begin{document}
To convert from general form to standard form, we will follow these steps:
\begin{enumerate}[itemindent=1cm,label=\bfseries Step \arabic*.]
  \item Ensure the coefficient of the terms in $x^2$ and $y^2$ are 1 respectively.
  \item Group the terms containing $x$ and $y$ respectively. Move the constant to the RHS.
  \item Take half of the coefficient of the linear terms in both $x$ and $y$, square it and add it to both sides.
  \item Rewrite the result in factored form.
\end{enumerate}
\end{document}

Result:

enter image description here

I am currently reading How to indent second line of an item in list environment? and Leftalign labels with enumitem but I do not quite get how to achieve it with my example in a simple and precise manner. Any help would be highly appreciated.

share|improve this question
    
And how exactly do you want the indention to be? –  Gonzalo Medina May 21 '12 at 17:43
    
The word "sides" should be directly below the word "Take", thus maintaining the same left indentation for the item content. –  azetina May 21 '12 at 17:47
add comment

1 Answer

up vote 18 down vote accepted

Instead of setting itemindent, you can change the values for leftmargin and labelindent:

\documentclass[letterpaper]{article}
\usepackage{fullpage}
\usepackage{amsmath,amssymb,amsthm,enumitem}

\begin{document}
To convert from general form to standard form, we will follow these steps:
\begin{enumerate}[leftmargin=*,labelindent=16pt,label=\bfseries Step \arabic*.]
  \item Ensure the coefficient of the terms in $x^2$ and $y^2$ are 1 respectively.
  \item Group the terms containing $x$ and $y$ respectively. Move the constant to the RHS.
  \item Take half of the coefficient of the linear terms in both $x$ and $y$, square it and add it to both sides.
  \item Rewrite the result in factored form.
\end{enumerate}

\end{document}

enter image description here

In fact, if some of your lists will have 10 or more items, the following settings would be preferable:

\documentclass[letterpaper]{article}
\usepackage{fullpage}
\usepackage{amsmath,amssymb,amsthm,enumitem}

\begin{document}
To convert from general form to standard form, we will follow these steps:
\begin{enumerate}[labelwidth=1.5cm,labelindent=10pt,leftmargin=2.2cm,label=\bfseries Step \arabic*.,align=left]
  \setcounter{enumi}{8}% just for the example
  \item Ensure the coefficient of the terms in $x^2$ and $y^2$ are 1 respectively.
  \item Group the terms containing $x$ and $y$ respectively. Move the constant to the RHS.
  \item Take half of the coefficient of the linear terms in both $x$ and $y$, square it and add it to both sides.
  \item Rewrite the result in factored form.
\end{enumerate}

\end{document}

enter image description here

With the help of the layouts package and the following simple code

\documentclass{article}
\usepackage{layouts}

\begin{document}

\begin{figure}
\listdiagram
\caption{List parameters}
\end{figure}

\end{document}

you get a diagram showing the various lengths associated to a list:

enter image description here

the enumitem package adds another parameter \labelindent for the blank space from the margin of the enclosing list/text to the left edge of the label box. Here's the dependencies between the relevant horizontal parameters:

\leftmargin + \itemindent = \labelindent + \labelwidth + \labelsep

Only modifying itemindent changes the indention for the first line of the first paragraph of each \item, and this produces the undesired result in your example code; modifying leftmargin changes the indention for all the lines. Compare the results in this simple example:

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{enumitem,lipsum}

\begin{document}

\begin{enumerate}[itemindent=3cm]
\item text
\item \lipsum[2]
\end{enumerate}

\begin{enumerate}[leftmargin=3cm]
\item text
\item \lipsum[2]
\end{enumerate}

\end{document}

enter image description here

share|improve this answer
    
I was trying to use those two options but I did not really understand their properties thought the names may be self explanatory. Can you elaborate on their effects here in your answer? –  azetina May 21 '12 at 17:55
    
@azetina I updated my answer with some explanation. –  Gonzalo Medina May 21 '12 at 18:36
    
I greatly appreciate your explanation. :-). Thanks –  azetina May 21 '12 at 18:39
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.