I have the following equation:
J_\pi(x_0)=\left(\underbrace{g_N(x_N)}_{\mathclap{\substack{\text{Terminal}
\\\text{cost}}}}+\underbrace{\sum_{k=0}^{N-1}g_k(x_k,u_k,w_k)}_
{\mathclap{\substack{\text{Accumulated}\\\text{cost}}}}\right)
Which outputs:
I want to get rid of the "extra height" on the parentheses (circled above in red) that's created due to the underbrace. How do I do this? Thank you!
Solution: I used biggl
and biggr
as per the suggestions, it works:
Thank you!
\left
and\right
overreacts. IMHO just set the delimiter size manually, like\biggl(
and\biggr)
.\mathclap
s are superfluous here.\bigg
approach, if you want your underbraces to vertically align, try:\documentclass{article} \usepackage{mathtools,stackengine} \begin{document} \[ J_\pi(x_0)=\biggl(\underbrace{\addstackgap[10.6pt]{$g_N(x_N)$}}_{\mathclap{\substack{\text{Terminal} \\\text{cost}}}}+\underbrace{\sum_{k=0}^{N-1}g_k(x_k,u_k,w_k)}_ {\mathclap{\substack{\text{Accumulated}\\\text{cost}}}}\biggr) \] \end{document}