I have to send a paper to two different people. For the first person, I have a bunch of questions that I would like to add throughout the paper and in color. For the second person I don't want the questions to appear. Is there any command I could define that I could use to do this? For instance, define some kind of command \crazytext[parameter] so that when parameter=1 the text will be blue, but when parameter=0 it is not inserted into the paper. This way I put a 1 in the preamble for the person I want to see blue text and a 0 in the preamble for the person for which I don't want text compiled.

1 Answer 1


Yes. Define \crazytext in the following ways:

\usepackage{xcolor}% http://ctan.org/pkg/xcolor
\newcommand{\crazytext}[1][blue]{\textcolor{#1}}% parameter=1
%\newcommand{\crazytext}[1]{\ignorespaces}% parameter=0

In the first instance, \crazytext will insert \textcolor{<color>} as the replacement text for \crazytext. That is, \crazytext{abc} will result in \textcolor{blue}{abc}, while \crazytext[red]{abc} will result in \textcolor{red}{abc}.

In the second instance (commented above), \crazytext will gobble its argument and ignore any spaces following the command (to avoid spurious spaces).

  • Works just like I want.
    – J126
    Jul 23, 2014 at 15:42
  • Does the todo/todonotes package not satisfy this need ?
    – Carel
    Nov 6, 2015 at 12:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .