# align inside \left ... \right

I am trying to split an equation over multiple lines. To improve readability, I want to make the second line line up with the right side of the left brace of the first line as is almost achieved in the image below. Doing this, I stumbled upon the issue that alignment marks (&) do not work inside \left, \right. This question pointed me to the \biggl operators that circumvent this problem. I was however wondering: is there a way to make alignment marks inside \left and \right work as expected?

Example and code to generate it:

\documentclass[twocolumn]{article}
\usepackage{amsmath}
\begin{document}
\def\leftside{\upsilon_{N, cw}(\omega)}
\def\prefix{- \frac{1}{\Delta} \Gamma}
\def\firstline{i\omega - \xi_{cc}\bar N + \frac{\Delta\Gamma}{2}}
\def\lastline{{+}\:\left.\frac{|\kappa|^2}{2\Delta\Gamma} \exp(-i\omega\tau)}
\begin{align}
\begin{split}
\leftside =& \prefix
\begin{aligned}[t]
&\left(\firstline\right.\\
&\left.\lastline\right)
\end{aligned}
\end{split}
\end{align}
\end{document}

• You might find it interesting to have a look at the documentation of the mathtools package (open a terminal emulator window and type texdoc mathtools): see bottom of p. 28 – p. 29.
– GuM
Feb 8, 2017 at 17:13
• Left... Right form a group, effectively hiding the & from align, thus will never work. Also using left right in the manner you do here is a bit dangerous, as the size depends on the content, thus you may end up with a ( that has a different size than ), therefore manual scaling is best in this case (as it is in general) Feb 8, 2017 at 17:18

There's a solution with Sébastien Gouezel's \MTkillspecial command and \DeclarePairedDelimiter command from mathtools: I define a \brkparens command, which adds an implicit pair of \left … \right in its starred version. For fine tuning, the non-starred version accepts an optional argument (\big, \Big, &c.):

\documentclass[twocolumn]{article}
\usepackage{mathtools}
\newcommand\MTkillspecial[1]{% helper macro
\bgroup
\catcode\&=9
\let\\\relax%
\scantokens{#1}%
\egroup
}
\DeclarePairedDelimiter\brkparens()
\reDeclarePairedDelimiterInnerWrapper\brkparens{star}{
\mathopen{#1\vphantom{\MTkillspecial{#2}}\kern-\nulldelimiterspace\right.}
#2
\mathclose{\left.\kern-\nulldelimiterspace\vphantom{\MTkillspecial{#2}}#3}}

\begin{document}

\def\leftside{\upsilon_{N, cw}(\omega)}
\def\prefix{- \frac{1}{\Delta} \Gamma}
\def\firstline{i\omega - \xi_{cc}\bar N + \frac{\Delta\Gamma}{2}}
\def\lastline{{+}\:\frac{|\kappa|^2}{2\Delta\Gamma} \exp(-i\omega\tau)}
\begin{align}
\begin{split}
\leftside =& \prefix
\begin{aligned}[t]
&\brkparens*{\firstline\\
&\lastline}
\end{aligned}
\end{split}
\end{align}

\end{document}


• Yes indeed: this is exactly what I was suggesting! :-)
– GuM
Feb 8, 2017 at 17:28
• @Gustavo Mezzetti: Actually, I've already given this kind of answer (maybe for braces), and it would have been more judicious to post a link in a comment, but I don't remember which question it was, nor when! Feb 8, 2017 at 17:37

In the definition of \lastline at line 7, you have one unbalanced \left., you should either remove this or remove the other one repeated at line 13. Also, you may get rid of the split environment since the \\ inside aligned will automatically split the equation over two lines.

\documentclass[twocolumn]{article}
\usepackage{amsmath}
\begin{document}
\def\leftside{\upsilon_{N, cw}(\omega)}
\def\prefix{- \frac{1}{\Delta} \Gamma}
\def\firstline{i\omega - \xi_{cc}\bar N + \frac{\Delta\Gamma}{2}}
\def\lastline{{+}\:\frac{|\kappa|^2}{2\Delta\Gamma} \exp(-i\omega\tau)}

\begin{aligned} \leftside = \prefix & \left( \firstline \right. \\ & \left. \lastline \right) \end{aligned}

\end{document}


• You should probably been using equation instead of align in this specific case, since you are aligning nothing... Feb 8, 2017 at 19:41
• Yes, of course, I just kept the OP's format for easy comparison, thanks. Feb 8, 2017 at 19:49

I'm curious, if the following simple elementary solution enabled by use of package mathtools fit to your expectation:

\documentclass[twocolumn]{article}
\usepackage{mathtools}

\usepackage{lipsum}

\begin{document}
\lipsum[1]
$$\begin{multlined} \upsilon_{N, cw}(\omega) = - \frac{1}{\Delta} \Gamma \left(i\omega - \xi_{cc}\bar N + \frac{\Delta\Gamma}{2}\right. \\ \left. + \frac{|\kappa|^2}{2\Delta\Gamma} \exp(-i\omega\tau) \right) \end{multlined}$$
\lipsum[2]
\end{document}


• You're missing a +` sign, it seems. Feb 8, 2017 at 19:51
• oh, error due to unaccurate copy-past ... added Feb 8, 2017 at 20:09