18 Apr
2010
18 Apr
'10
7:25 p.m.
Am 18.04.10 21:12, schrieb Vyatcheslav Yatskovsky: > Hello, > > Patrick posed a good question on wiki at > > http://wiki.contextgarden.net/Reference/en/define > > "is there any bonus when I use \define instead of \def?" 1. \define checks if the command you try to create already exists, if this is the case no new command is created but you get a message on the terminal 2. you can give the number of arguments as a number (e.g. \define[2]\...{}) while \def expects them with the hash (e.g. \def\...#1#2{...}) 3. depending on your style you can avoid one '%' at the end of the first line \def\...#1#2% {...} vs. \define[2]\... {...} 4. a disadvantage is that you can't create commands with optional arguments, Hans showed a different which made this possible in mkiv but it made it in the official version of \define 5. the wiki page mentions you can create \long macros with \define but this isn't the case in mkiv because each macro is no \long Wolfgang