2012-09-27 Sietse Brouwer
As I understand it, \define[2] is preferred over \def#1#2 because it refuses to overwrite existing commands.
\define overwrites existing commands with pleasure. In contrast to \def it prints a message to the log file: “\mycommand is already defined”.
Can I use \define, or a related command, to define a command that takes square-bracket arguments, like so: \mycommand[...][...]
\def\mycommand {\dodoubleempty\domycommand} \def\domycommand [#1][#2] {first: #1, second: #2} \mycommand [foo] [bar] \mycommand [foo][bar] \mycommand [foo] Question for the others: What's the difference of \dodoubleargument and \dodoubleempty? I expected \dodoubleargument to throw an error since the arguments are supposed to be mandatory. Marco