4

I have an equation block within an enumeration. I want that equation block to be left-aligned with the enumeration (see red line). How can I do that?

enter image description here

\documentclass[11pt]{article}
\usepackage{enumerate}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{enumerate}[(t=1)]
\item $w^{(1)} = (w_1^{(1)},w_2^{(1)},w_3^{(1)}) = (1,1,1)$

\item $w^{(2)} = (w_1^{(2)},w_2^{(2)},w_3^{(2)}) = (0.5,1,0.5)$

\begin{equation*}
\begin{split}
    w_{1}^{(2)} = (1 - 0.5)^{L_{11}} w_{1}^{(1)} = (0.5)^{1}.1 = 0.5. \\
    w_{2}^{(2)} = (1 - 0.5)^{L_{21}} w_{2}^{(1)} = (0.5)^{0}.1 = 1. \\
    w_{3}^{(2)} = (1 - 0.5)^{L_{31}} w_{3}^{(1)} = (0.5)^{1}.1 = 0.5. 
\end{split}
\end{equation*}

\end{enumerate}
\end{document}

3 Answers 3

5

Set each element as a separate, in-line piece of math:

enter image description here

\documentclass{article}

\usepackage{enumerate}

\begin{document}

\begin{enumerate}[(t=1)]
  \item $w^{(1)} = (w_1^{(1)},w_2^{(1)},w_3^{(1)}) = (1,1,1)$

  \item $w^{(2)} = (w_1^{(2)},w_2^{(2)},w_3^{(2)}) = (0.5,1,0.5)$

  $w_{1}^{(2)} = (1 - 0.5)^{L_{11}} w_{1}^{(1)} = (0.5)^{1}.1 = 0.5$

  $w_{2}^{(2)} = (1 - 0.5)^{L_{21}} w_{2}^{(1)} = (0.5)^{0}.1 = 1$

  $w_{3}^{(2)} = (1 - 0.5)^{L_{31}} w_{3}^{(1)} = (0.5)^{1}.1 = 0.5$
\end{enumerate}

\end{document}
4

I would use a single align* for this. This will ensure alignment at all the = signs. Only label has to be entered manually.

\documentclass[11pt]{article}
\usepackage{enumerate}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}

\begin{align*}
(t=1)\quad w^{(1)} &= (w_1^{(1)},w_2^{(1)},w_3^{(1)}) = (1,1,1)\\
(t=2)\quad w^{(2)} &= (w_1^{(2)},w_2^{(2)},w_3^{(2)}) = (0.5,1,0.5) \\
    w_{1}^{(2)} &= (1 - 0.5)^{L_{11}} w_{1}^{(1)} = (0.5)^{1}.1 = 0.5. \\
    w_{2}^{(2)} &= (1 - 0.5)^{L_{21}} w_{2}^{(1)} = (0.5)^{0}.1 = 1. \\
    w_{3}^{(2)} &= (1 - 0.5)^{L_{31}} w_{3}^{(1)} = (0.5)^{1}.1 = 0.5. 
\end{align*}

\end{document}

enter image description here

3

As a complement to Werner's fine answer, I propose a few refinements:

\documentclass[11pt]{article}
\usepackage{enumitem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{showframe}

\begin{document}

\begin{enumerate}[label={($t=\arabic*)$},itemsep=0pt,leftmargin=*,align=left]
\everymath{\displaystyle}% local setting
\item $w^{(1)}_{\vphantom{1}} = (w_1^{(1)},w_2^{(1)},w_3^{(1)}) = (1,1,1)$

\item $w^{(2)}_{\vphantom{1}} = (w_1^{(2)},w_2^{(2)},w_3^{(2)}) = (0.5,1,0.5)$\\[\parsep]
      $w_{1}^{(2)} = (1 - 0.5)^{L_{11}} w_{1}^{(1)} = (0.5)^{1}\cdot1 = 0.5.$ \\[\parsep]
      $w_{2}^{(2)} = (1 - 0.5)^{L_{21}} w_{2}^{(1)} = (0.5)^{0}\cdot1 = 1.$ \\[\parsep]
      $w_{3}^{(2)} = (1 - 0.5)^{L_{31}} w_{3}^{(1)} = (0.5)^{1}\cdot1 = 0.5.$ 
\end{enumerate}

\end{document}

The label is set in math mode and it's easier to do with enumitem that also avoids the label sticking in the margin by using leftmargin=*.

Inside the environment I set \everymath{\displaystyle}, so we emulate display math; the exponents in the first two formulas are pushed a bit up by adding a phantom subscript, so they are at the same height as the superscripts in the last three formulas as well as those inside the first two formulas.

Between the four formulas in the second item I added vertical space of size \parsep, so all formulas are equally spaced.

I changed the period before the final 1's into \cdot: the period should never be used to denote multiplication.

In order to produce the picture below I loaded \usepackage{showframe} that you should remove, it's just to show the margins of the text block.

enter image description here

You must log in to answer this question.

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