[Tex/LaTex] Latex bracket on multiple lines

brackets

enter image description here

How can I code the equations with big brackets on the right and left sides shown in the picture? Thank you for your help!

Best Answer

This works because stackengine can set equations with fixed baselineskip.

\documentclass{article}
\usepackage{tabstackengine,amsmath}
\TABstackMath
\stackMath
\begin{document}
\[
%\setstackgap{L}{1.1\baselineskip}% VERTICAL SPACING OF CENTER EQUATIONS
%\renewcommand\stacktype{L}% GIVES LEFT/RIGHT EQS SAME VERTICAL SPACING AS CENTER EQS
\Centerstack{
\\
\\
\alignstackanchor{a=&b}{a=&b}{\left\{\begin{aligned}\\\\\end{aligned}\right.}\\
\\
\\
\alignstackanchor{a=&b}{a=&b}{\left\{\begin{aligned}\\\\\end{aligned}\right.}\\
\\
}
\alignCenterstack{
a=&b\\
a=&b\\
a=&b\\
a=&b\\
a=&b\\
a=&b\\
a=&b\\
a=&b
}
\Centerstack{
\smash{\phantom{\left.\begin{aligned}\\\\\end{aligned}\right\}}}a = b\\
\\
\\
{\left.\begin{aligned}\\\\\end{aligned}\right\}}\alignstackanchor{a=&b}{a=&b}\\
\\
\\
{\left.\begin{aligned}\\\\\end{aligned}\right\}}\alignstackanchor{a=&b}{a=&b}\\
}
\]
\end{document}

enter image description here