0

Possible Duplicate:
More than one optional argument for newcommand

Is it easy to define a new command with several optional arguments, that one would call as follows :

\mycom[opt1=2,opt2=blabla]{some arg}
  • 2
    If you mean a keyval argument, see tex.stackexchange.com/questions/34312/… – Joseph Wright Jan 5 '12 at 12:38
  • 2
    You can also use the package keycommand: ctan.org/pkg/keycommand – Marco Daniel Jan 5 '12 at 12:39
  • 2
    @MarcoDaniel I suggest you add a suitable answer to the linked question :-) – Joseph Wright Jan 5 '12 at 12:41
  • I find the version \command[arg1][arg2] not optimal, since i will never remember which one is which one, if i want to give only one of them. I will look at the other suggestions. – nicolas roy Jan 5 '12 at 12:53
  • well both packages keyval and keycommand seem to do exactly that...i just have now to choose ! Any suggestion ? – nicolas roy Jan 5 '12 at 12:57