[Tex/LaTex] Redefine default color of todonotes

macrostodonotes

I'm using the todonotes package with the article class to take class notes, and using the todos as markers (date, comments and so on) so I don't want to use the bright orange, which steals focus. I wanted to redefine the default color value as demonstrated in the todonotes readme (and change the color value to my liking):

\newcommand{\todoredefined}[2][]
{\todo[color=red, #1]{#2}}

But nothing changes. Here's a MWE with all the packages I have loaded, should they have some known problems with todonotes:

\documentclass{article}
\usepackage{gensymb}
\usepackage[icelandic]{babel} 
\usepackage[T1]{fontenc}  
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{todonotes}
\usepackage{enumerate}
\usepackage{mhchem}
\usepackage{hyperref}

\newcommand{\todoredefined}[2][]
{\todo[color=red, #1]{#2}}

\begin{document}
    Something\todo{This should be red by now...}
\end{document}

When I compile this code I still get orange todos. Am I overlooking something or is this code sample obsolete?

Best Answer

You get orange todos because you do not use your new command. The todo command is still defined as always, with orange background, but if you use your todoredefined command instead, the background will be red.

However, an easier way of doing this is to add color=red as an option to the package:

\documentclass{article}
\usepackage[color=red]{todonotes}

\begin{document}
Text \todo{Nothing}
\end{document}

Edit: You can set the color of the background, border and line from note to text separately, see the todonotes manual, section 1.2.

Related Question