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 want to have the split equation on LHS to be left aligned. My 2 attempts are shown below, i.e., option A and option B. Please see the source code for the details.

enter image description here

\documentclass[10pt]{article}
\usepackage[a6paper,vmargin=15mm,hmargin=5mm]{geometry}
\usepackage{mathtools}

\begin{document}
\begin{enumerate}
    \item Hey baby!
    \item
    $\!
    \begin{aligned}[t]
    2-3x(x-1)\\
    {}-3(x-2y)(x+2y)
        &=  \!
                \begin{multlined}[t][4cm]
                    2 -3x^2 +3x\\
                    {}-3(x^2 +2xy -2xy -4y^2)
                \end{multlined}\\
        &=  \!
                \begin{multlined}[t][4cm]
                    2 -3x^2 +3x\\
                    {}-3(x^2 -4y^2)
                \end{multlined}\\
        &=  \!
                \begin{multlined}[t][4cm]
                    2 -3x^2 +3x\\
                    {}-3x^2 +12y^2
                \end{multlined}\\
        &= -6x^2 +3x +12y^2 +2
    \end{aligned}
    $
    \item
    $\!
    \begin{aligned}[t]
    \begin{multlined}[t][4cm]
    2-3x(x-1)\\
    {}-3(x-2y)(x+2y)
    \end{multlined}\\
        &=  \!
                \begin{multlined}[t][4cm]
                    2 -3x^2 +3x\\
                    {}-3(x^2 +2xy -2xy -4y^2)
                \end{multlined}\\
        &=  \!
                \begin{multlined}[t][4cm]
                    2 -3x^2 +3x\\
                    {}-3(x^2 -4y^2)
                \end{multlined}\\
        &=  \!
                \begin{multlined}[t][4cm]
                    2 -3x^2 +3x\\
                    {}-3x^2 +12y^2
                \end{multlined}\\
        &= -6x^2 +3x +12y^2 +2
    \end{aligned}
    $
\end{enumerate}
\end{document}

How to solve this problem?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

this will give you option b:

\documentclass[10pt]{article}
\usepackage[a6paper,vmargin=15mm,hmargin=5mm]{geometry}
\usepackage{mathtools}

\begin{document}
\begin{enumerate}
\setcounter{enumi}{2}
\item
$
  \begin{multlined}[t]
  2-3x(x-1)\\
    \begin{aligned}
    {}-3(x-2y)(x+2y)
    &=  \!
            \begin{multlined}[t][4cm]
                2 -3x^2 +3x\\
                {}-3(x^2 +2xy -2xy -4y^2)
            \end{multlined}\\
    &=  \!
            \begin{multlined}[t][4cm]
                2 -3x^2 +3x\\
                {}-3(x^2 -4y^2)
            \end{multlined}\\
    &=  \!
                \begin{multlined}[t][4cm]
                    2 -3x^2 +3x\\
                    {}-3x^2 +12y^2
                \end{multlined}\\
        &= -6x^2 +3x +12y^2 +2
    \end{aligned}
  \end{multlined}
$
\end{enumerate}

\end{document}

enter image description here

share|improve this answer
    
Is \! needed for the outer multlined? –  Please don't touch Apr 16 '13 at 16:38
    
@Bugbusters -- \! actually shouldn't be needed anywhere (in my example code); placing the & before the = establishes the correct spacing for the sign of relation. you don't want to start the expression with \! to avoid placing it too close to the item number, making that look like it's part of the equation. –  barbara beeton Apr 16 '13 at 16:50

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.