4

I have a set of equations that have multiple alignments, and one of these equations I want to break since it is long. The following MWE illustrates my current solution to this problem, but it's not an elegant solution:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{alignat}{2}
zero   \,\, &: \,\, 0 = + 2 -2  \\
one    \,\, &: \,\, 0 = + 2 -2 \\
            &\hphantom{\,\,:\,\, 0=}+ 2 -2
\end{alignat}

\end{document}

Is there a better solution to this than to use hphantom?

6
\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{alignat}{3}
  \text{zero:}\, & 0 = & \, + 2 - 2 \\
  \text{one:} \, & 0 = & \, + 2 - 2 \\
                 &     & \, + 2 - 2
\end{alignat}
\end{document}

output_crop

  • 2
    You might wish to use \text{zero} and \text{one}. – Steven B. Segletes Apr 12 '16 at 11:15
  • 1
    @StevenB.Segletes -- I guess rather the O.P. wants to ;) Thank you anyways! – Ruben Apr 12 '16 at 11:21
4

You can get by with providing a single & alignment point.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{align}
\text{zero}:\quad 0 = &+ 2 -2 \\
\text{one}:\quad  0 = &+ 2 -2 \\
                      &+ 2 -2
\end{align}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.