I would like to make a \todo
command and environment whose behavior changes depending whether I define a command \showtodos
. A basic \todo
command is simple to write:
\ifthenelse{\isundefined{\showtodos}}{
\newcommand{\todo}[1]{}
}{
\newcommand{\todo}[1]{#1}
}
Essentially, I would like to hide the content of the \todo
command unless \showtodos
is defined. My question is how to write an environment which does the same thing?
todonotes
package, which you might find useful. If you load it with the package optiondisable
(\usepackage[disable]{todonotes}
), nothing will be displayed. Otherwise, its\todo{Rewrite this chapter}
macro works really well.