# alignat with right curly bracket/cases spanning some but not all lines

Currently I am trying something that should be possible, but I cannot figure out how to make it work. I'm using alignat to make a 2-point align for the entries of five lines of math-code. I want to place a curly bracket on the right side spanning the vertical space of the last four lines and at the tip of the accolade put some math symbols.

On the left side, the curly bracket can be done in cases mode, by using

\begin{cases} ...  \end{cases}


However, this only seems to work outside an environment like align. I have come across the rcases environment, which does give me a curly bracket to the left, but it can only span the whole aligned block, not a part of it.

I have tried to work with \left. in the second line and then placing a \right} at the end of the fifth line, but then alignat goes bananas. The \left \right declarations cannot work across multiple lines, unfortunately.

Does anybody have a solution for me? Maybe it is possible to define a span of several lines as 1 object that I can then give a curly bracket?

In the end I would like to add four more lines of aligned equations inside the same alignat environment that get a new curly bracket on the right with some different symbols.

Best, L.

My MWE:

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

\begin{alignat*}{2}
\psi^\star & \mathcal{H} \; \psi = i \sum_{h=(1,1,1)}^{(M,N,Z)} ( \quad \quad &&\\
A1\quad & AAAAAAAAAA2 && A3 \\
B1 \quad & BBBBBBBBBB2 && B3 \\
C1 \quad &  CCCCCCCCCC2 && C3\\
D1 \quad & DDDDDDDDDD2 && D3 ).
\end{alignat*}

where I want to place a curly bracket to right of the last 4 lines and put the expression $\delta(\alpha-1)$ on the right of the bracket-tip.
\end{document}


I propose one of these layouts, with the drcases environment from mathtools:

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\begin{align*} \psi^\star \mathcal{H} \; \psi = i \smash[b]{\sum_{h=(1,1,1)}^{(M,N,Z)}} ( &\\[-3.75ex]
& \! \begin{drcases}
A1 \quad AAAAAAAAAA2 & A3 \\
B1 \quad BBBBBBBBBB2 & B3 \\
C1 \quad CCCCCCCCCC2 & C3 \\
D1 \quad DDDDDDDDDD2 & D3 ).
\end{drcases}\delta(\alpha-1)
\end{align*}

where I want to place a curly bracket to right of the last 4 lines and put the expression $\delta(\alpha-1)$ on the right of the bracket-tip.
\begin{align*} \psi^\star \mathcal{H} \; \psi = i \sum_{\mathclap{h=(1,1,1)}}^{\mathclap{(M,N,Z)}} \,( \enspace \begin{drcases}
A1 \quad AAAAAAAAAA2 & A3 \\
B1 \quad BBBBBBBBBB2 & B3 \\
C1 \quad CCCCCCCCCC2 & C3 \\
D1 \quad DDDDDDDDDD2 & D3 ).
\end{drcases}\delta(\alpha-1)
\end{align*}

\end{document}


• Awesome! I did need the first line to only hold the things up to the equal sign, since the A,B,C and D rows are too wide to be displayed well like this, I'll investigate. Thanks! – Ludo Nov 25 '15 at 15:27
• Also, is there way to do this with 2 align markers? – Ludo Nov 25 '15 at 15:46
• I'm not sure I understand very well. Could you provide an example of what you want? – Bernard Nov 25 '15 at 18:01

is this what you're looking for?

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

\begin{equation*}
\left.
\begin{alignedat}{2}
\psi^\star & \mathcal{H} \; \psi = i \sum_{h=(1,1,1)}^{(M,N,Z)} ( \quad \quad &&\\
A1\quad & AAAAAAAAAA2 && A3 \\
B1 \quad & BBBBBBBBBB2 && B3 \\
C1 \quad &  CCCCCCCCCC2 && C3\\
D1 \quad & DDDDDDDDDD2 && D3 ).
\end{alignedat}
\right\}
\delta(\alpha-1)
\end{equation*}

\end{document}