[Tex/LaTex] Breaking \underbrace over two lines

math-modeunderbrace

How can I have something like the following in LaTeX?

\begin{align}

\underbrace{equation1 \\ (line break) equation 2}_{text}

\end{align}

The problem is the line break.

I don't seem to find any solution online.

Best Answer

As daleif and I said, you should use an environment allowing linebreaks inside the \underbrace. If it's just going to be text \parbox or similar commands are fine. If it's going to be math, you should use an environment such as aligned:

\documentclass[]{scrartcl}
\usepackage{amsmath}

\begin{document}

\begin{align}
    \underbrace{\begin{aligned}&equation1 \\ &(line break) equation 2\end{aligned}}_{text}
\end{align}
\end{document}
Related Question