2

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!

2
  • 2
    Welcome to TEX.SE! Please provide a full minimal working example which reproduces the issue, possibly starting with \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.
    – campa
    Mar 21 at 19:49
  • So you want the a + b to be underlined in red in math mode too? Mar 21 at 20:29

0

You must log in to answer this question.

Browse other questions tagged .