I would like to have an overbrace inside an underbrace (not overlapping braces). Here is an equation I have been trying:
\begin{equation}
\max_{a \in A} \left\{\underbrace{ \left(v_a + v_y y \right) a - C(a)}_{\text{blabla}}
\mathrlap{\overbrace{\phantom{v_y y ) a - C(a)}}^{\text{blablabla}}}
+ \mu_a \mathbb{E}(v_a | a, y) - \mu_y \mathbb{E}(v_y|a,y)\right\}.
\end{equation}
So far, I am obtaining an overbrace shifted far to the right:
Best Answer
Here's a solution that gets by without
\mathrlap
. Note also the declaration of\E
as a "math operator", the use of\mid
instead of|
(in order to obtain some whitespace on both sides of the vertical bars), and the use of\biggl\{
and\biggr\}
instead of\left\{
and\right\}
(to avoid getting unnecessarily large curly braces).