4

How do I get different alignments in the same align environment? Here some (pseudo)-code to illustrate my idea:

\begin{align}
a = &2\\
&+ 3 + 4 \notag\\
&= now I would like the equation sign to be aligned with the first equation sign at line 1
\end{align}

Is there any of you LaTeX wizards who can help me?

7

You have a few choices:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
\begin{split}
a &= 2+2+2+2+2 \\
  &\quad +3+4
\end{split}
\\
  &= x+y+z
\end{align}

\begin{align}
a &= \begin{aligned}[t]
       & 2+2+2+2+2 \\
       & +3+4
     \end{aligned}
\\
  &= x+y+z
\end{align}

\end{document}

enter image description here

  • I prefer the first code :-) – Sebastiano Jan 17 at 22:09
2

For my tastes I will do your code with this MWE where there is a perfect vertical alignment between 2 and + as by screenshot and between two equal signs.

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}

\begin{document}
\begin{align}
a &= 2\\
&\phantom{{}=}+ 3 + 4 \notag\\
&= \dotsb
\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.