I would like to create a command \comment{} which would not compile anything inside of { }.
Why would I not use % or \begin{comment} bla bla \end{comment} from the \usepackage{comment}? Because I want to put some text inside brackets and comment it.
The reason I want to do this is because I have a lot of text in red using \textcolor{red}{bla bla} and I would like to redefine \textcolor{red} so that I can delete everything in red from my document (note that I have a lot of parts in red...).
In a nutshell, my current code
x=x+1 \\
\textcolor{red}{
I don't want to see this
}
produces this
Instead I would like it to produce this
without having to comment manually every part with \textcolor{red}. I would instead like to redefine this command so that it would comment the text in red.
Note: I want the red text not to be compiled and not to appear invisible, creating blank spaces.




todonotespacakge. That can do waht you want, plus a lot more. – Peter Grill Oct 19 '21 at 16:23\renewcommand\textcolor[2]{\ignorespaces}otherwise you need to include a test forred– David Carlisle Oct 19 '21 at 16:30\textcolor{red}by\comment. Then you only need\newcommand \comment[1]{\textcolor{red}{#1}}to show the comments in red or\newcommand \comment[1]{\ignorespaces}}to hide the comments. – Fran Oct 19 '21 at 16:49