I would like to define a new command to work as an alert command. If I want to alert some part of my text I would simply write \alert{}. But I want the result in red color.
What is the best way to do this? I tried
\def\alert#1{{\color{red}{#1}}}
but I know that there is \textcolor also. I want my command to work both for text and math contents.
What is the difference between them?
colorpackage is required. Is there some color commands which needs only basic packages? – Sigur Dec 08 '12 at 00:38\textcolordoes seem to be a better choice here. See also this accepted answer from Dr. Scharrer. – nam Nov 01 '19 at 22:06