2

How can I break the first line

\begin{equation}
\begin{aligned}[2]
& some stuff \left\{ stuff' + stuff'' \right\} \\
& = some other stuff
\end{aligned}
\end{equation}

in a way such that the following graphical output is obtained

stuff { ...
       + ... }
= some other stuff

for the graph parentheses, using \right. etc.?

jj_p
  • 627

3 Answers3

5
\documentclass{article}
\usepackage{mathtools,calc}
\begin{document}

\begin{align}
 some stuff \bigg\{ & stuff' \nonumber\\
                    & + stuff'' \bigg\} \\
 \makebox[\widthof{$some stuff \bigg\{$}][l]{$= some other stuff $}\nonumber
\end{align}

\end{document}

enter image description here

1010011010
  • 6,357
  • Thanks for the answer, but that's not what I meant: I edited my question, perhaps now its more clear: i.e. the third line should align again with the first – jj_p May 07 '14 at 16:10
  • @jj_p, it is still very unclear what you want. You cannot break a \left...\right construction over a linebreak. So where exactly is Herbert doing it wrong? To me it looks more like you want to place an additional aligned inside the \{...\}. Note in that case that the \{ goes before the aligned, aligned should have an additional [t] option, and the \} goes inside the aligned. – daleif May 07 '14 at 17:04
  • @daleif: The only thing I can think of is that the OP wants the last line some other stuff to be aligned on the left in which case a \mathclap variant may be needed. – Peter Grill May 07 '14 at 17:15
  • @PeterGrill, not really see my extended comment. Replace the \MoveEqLeft with a & and you get the ascii drawing, I just prefer this version. – daleif May 07 '14 at 17:20
  • @PeterGrill that's correct: can you expand on this \mathclap story? – jj_p May 07 '14 at 17:22
  • @jj_p: See my edited answer –  May 07 '14 at 17:53
2

Just to elaborate on my comment

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

\begin{align}
\begin{split}
 \MoveEqLeft some stuff \bigg\{ 
   \!\begin{aligned}[t] & stuff' \\
                    & + stuff'' \bigg\}
      \end{aligned}
     \\
                    & = some other stuff
\end{split}
\end{align}

\end{document}
daleif
  • 54,450
1

I think the main problem you are having is that last line being longer is affecting the alignment of the lines above it. So, you can use mathrlap so that the last line's length does not affect the alignment:

enter image description here

Note that the = is right aligned to the alignment point specified. This is because the usual alignment is: stuff to the left of an equal sign is right aligned, and stuff to the right of the equal is left aligned.

However, if you want the last text to be left aligned then I would recommend using an alignedat instead:

enter image description here

Code: aligned

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

\begin{align}
\begin{aligned}
 \text{some stuff} \bigg\{ & \text{stuff }' \\
                           & + \text{stuff }'' \bigg\} \\
 =\mathrlap{\text{some other stuff}}
\end{aligned}
\end{align}

\end{document}

Code: alignedat

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

\begin{align}
\begin{alignedat}{3}
 &\text{some stuff} \bigg\{ && \text{stuff }' \\
 &                           && + \text{stuff }'' \bigg\} \\
 &=\mathrlap{\text{some other stuff}}
\end{alignedat}
\end{align}

\end{document}
Peter Grill
  • 223,288
  • Thanks, this trick indeed does the business, although if the last lines (some other stuff1,2,..) are too long they might overlap with the equation number – jj_p May 08 '14 at 08:38