im trying to color part of an expression with a percent symbol and its not working, the area comes out blank after running latex, other stuff works, but anything containing a percent sign ends up messed up if i try to color it
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{color}
\title{\LaTeX}
\date{}
\begin{document}
This works:\\
{\color{red} (\mathrm{\\045 21})} \\
this does not:
{\color{red} (\mathrm{\%o21})}
\end{document}
how do i do that?


$....$or\[...\]. Once you do that, everything works :) – cmhughes Jun 08 '13 at 21:30! LaTeX Error: \mathrm allowed only in math mode.which is unrelated to color. Do you mean your example to be in math mode, or did you intend to use\textrm? – David Carlisle Jun 08 '13 at 21:32