Is it possible to make a command that changes the color of both text and math, including in equations, for everything between brackets.
So for example something that does either
Either:
\toRed{
text
\begin{equation}
1+1=2
\end{equation}
}
or
{\toRed text
\begin{equation}
1+1=2
\end{equation}
}
such that both the equation and the text are shown red.
P.S. If it screws up formatting it is okay with me as long as it is readable as this would be used only to put comments which won't be in any final product.
Update:
I had tried
\textcolor{red}{text
\begin{equation}
1+1=2
\end{equation}
more text
some more text
}
which gives an error. The problem was that the paragraph ended before the textcolor was closed. I see that \color
as suggested in the answer does allow closing in a different paragraph. Since I want this to be allowed and prefer a command that opens and closes over including color within brackets I chose to go with:
\newcommand{\myname}[1]{ {\color{red} #1 }}
marginnote
- it is great for non-permanent comments in the compiled document. sharelatex.com/learn/Margin_notes{\color{red} text \begin{equation}....