1

The todonotes package has options for specifying the author name and also an option for specifying the colour of the individual note. However my question is that, is there a provision to set a colour for a specific author?

For instance if I use \todo[author=AK]{simple to do}, it should be equivalent to \todo[author=AK,color=green]{simple to do} and \todo[author=PG]{simple to do}should be equivalent to \todo[author=PG,color=red]{simple to do}.

How exactly can this be achieved?

2
  • 1
    \newcommand\todoAK[1]{\todo[author=AK,color=red]{#1}}
    – Fran
    Commented Jul 11, 2020 at 10:40
  • 1
    My coauthors and I have used @Fran 's approach for many years. Commented Feb 10, 2021 at 1:51

1 Answer 1

4

You can define new meta keys:

\documentclass{article}
\usepackage{todonotes}
\makeatletter
\define@key{todonotes}{AK}[]{%
    \setkeys{todonotes}{author=AK,color=green}}%
\makeatother        
\begin{document}
blub\todo[AK]{something}   
 \end{document}

You must log in to answer this question.

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