I am trying to underline specific terms in math mode in color. Right now, I have defined a command:
\newcommand{\ula}[1]{{\setulcolor{red}\ul{#1}}}
While this command works on normal text, it doesn't work at all in math mode. For instance, if I tried to do this:
$\ula{a + b} = c$
The result is a red underline without the a + b, and the only text that appears is "= c". Some help on this would be appreciated. Thank you!
\documentclass{...}
and ending with\end{document}
. In this way we can copy-paste the code and look at the problem without resorting to wild guesses about what you are doing.a + b
to be underlined in red in math mode too?