# Pass multiple options to \newcommand

I have defined a new command for each of the team members in my project group to add individual todo-notes with different color and name.

Now I would like to add another option, but is having trouble with the syntax.

Here is the current definition of the command:

% TODO thilemann
\newcommand{\thilemann}[2][ ]
{
\ifthenelse{\equal{#1}{inline}}
{\todo[inline, size=\small, color=NavyBlue!35]{\textbf{\color{NavyBlue}{Thilemann:} } #2}}
{\todo[size=\small, color=NavyBlue!35]{\textbf{\color{NavyBlue}{Thilemann:} } #2}}
}


How is it possible to add another option to the above code? What I want is basically to define a todo as "mine" which should underline the name (Thilemann:).

I would like the syntax to be something like \thilemann[mine]{Notes here} or if it is an inline todo \thilemann[mine][inline]{Notes here} (or \thilemann[mine, inline]{Notes here}.

-
Have a look at tex.stackexchange.com/questions/29973/… –  lockstep Oct 9 '12 at 9:49

It would have been easier with a complete document showing which packages you are using (I think this is todonotes). Since you are already using a keyval syntax I think I would use the same here so define

\define@key{mykeys}{mine}[true]{%
...
}

\define@key{mykeys}{inline}[true]{%
...
}


Then in your code activate these with

\setkeys{mykeys}{#1}


so usage would be

\thilemann[mine, inline]{Notes here}.


If it is todonotes I think that uses the extended xkeyval package syntax in which case you should use that.

-
Sorry, I'm quite new to custom commands and it doesn't seem like I can get the syntax put together the right way :/ –  thilemann Oct 9 '12 at 16:43