I have a question regarding the curvy brackets in tex. Didn't find a good solution for the problem yet:
I have the following formulas:
\begin{equation}
\begin{aligned}
f(x) &= x + 1 \\
g(x) &= x + 2 \\
h(x) &= x + 3 \\
k(x) &= x + 4 \\
l(x) &= x + 5
\end{aligned}
\end{equation}
Now I want to have a curly bracket around f(x) and g(x) on the right side and want to write some stuff behind the curly bracket. And I also want a curly bracket behind h(x), k(x) and l(x). How can I manage that and also make sure, that all five equations are aligned on the "="-sign?
I just tried to put the formulas in a \begin{rcases} … \end{rcases}, but then the formulas are no longer aligned.
Thank you very much in advance!
Best regards!
Best Answer
You can use
nicematrix
and its powerful methods.The strange setting to
\tracinglostchars
is to avoid spurious warnings (but they deserve some investigation).The specifications for the columns are the usual ones to mimic
aligned
, including the setting to\arraystretch
. We build two “submatrices”, with empty delimiter on the left and braces on the right, plus two blocks spanning two and three rows respectively.A couple of LaTeX runs are necessary for the output to stabilize, because ornamentations are set in successive steps after the object has been measured.