Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

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.

share|improve this answer
    
Ah.. It's always so embarrassing to find out what I did wrong :/ –  Jóhann Jan 12 '11 at 11:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.