[Tex/LaTex] Underbrace without pushing equation

horizontal alignmentmath-modetext;

I'm using \underbrace{}_\text{} to explain the meaning of a variable:
equation using underbrace
As you can see in the image, underbrace pushes the equations aside to make space for the text. I would like to get something like this instead:
enter image description here

Question: Is it possible to remove this pushing behavior to get the desired result?

Thanks for helping! 😀

Best Answer

Yes, there is a way: you can use \makebox[0pt] and the relevant text size (\footnotesize or scriptsize), or \clap, defined in mathtools. Using some code in mathtools, we can define an \EV and a \given commands for the expected value of a random variable, which has variable-sized delimiters:

\documentclass{article}
\usepackage[utf8]{inputenc}%
 \usepackage{mathtools}

\providecommand\given{}
\DeclarePairedDelimiterXPP\EV[1]{E}[]{}{
\renewcommand\given{\nonscript\:\delimsize\vert\nonscript\:}
#1}

\begin{document}

\[ \EV{R_{i, t}\given I_{t-1}} = γ_{0,t-1} + \underbrace{\gamma_{0,t-1}}_{\makebox[0pt]{\footnotesize conditional market risk premium}}β_{i, t-1} \]%
\bigskip
\[ \EV[\big]{R_{i, t}\given I_{t-1}} = γ_{0,t-1} + \underbrace{\gamma_{0,t-1}}_{\clap{\scriptsize conditional market risk premium}}β_{i, t-1} \]%

\end{document} 

enter image description here