What is wrong with underbrace please, there is no text below after the compilation
\begin{equation}
\underbrace{{\color{red}I_j (x)} \ast \Delta_j(x,t_l,{\color{red}p})}_{\text{I_j(x)(x-v_j(t,p))}} \mathrm{d}x
\end{equation}
\text
is when the subscript is textual.
You should also prefer \textcolor
and brace the whole \underbrace
construct.
\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor}
\begin{document}
\begin{equation}
{% make the \underbrace an ordinary atom
\underbrace{\textcolor{red}{I_j (x)} \ast \Delta_j(x,t_l,\textcolor{red}{p})}%
_{I_j(x)(x-v_j(t,p))}
}\,\mathrm{d}x
\end{equation}
\end{document}
Why preferring \textcolor
? Because you can redefine it to preserve the nature of math atoms:
\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor}
\makeatletter
\renewcommand{\@textcolor}[3]{%
\relax
\ifmmode
\begingroup\color#1{#2}#3\endgroup
\else
\protect\leavevmode{\color#1{#2}#3}%
\fi
}
\makeatother
\begin{document}
$a\textcolor{red}{=}b$
$a{\color{red}=}b$
\end{document}
\textcolor{...}{...}
should be preferred over {\color{...} ...}
?
\textcolor
uses \begingroup...\endgroup
rather than {...}
, with obvious effects on the math list.
xcolor
package the definition of \@textcolor#1#2#3
is still \protect\leavevmode{\color#1{#2}#3}
.
\begingrup ...\endgroup
is indeed better, for obvious reasons. The same change should be made in the color
package too. The latter is currently maintained by “The LaTeX3 Project”, which includes you. :-)
\text
switches to the text font where _ is not allowed. It ought to work if you remove the text command. And as mentioned, please always post full minimal examples, not sniplets.\text
and it will work.