Am 14.12.2012 um 16:43 schrieb Andre Caldas
- maybe switch to mkvi as named parameters make rewriting macros a breeze
Would you elaborate a bit further?
You can use for the parameter in your macros names instead of number, as you can see below the first definition uses “#1” for the argument while the second uses “#text”.
You can force MkIV mode when you add “% macros=mkvi” at the top of the file. When your code is a external file (e.g. a module) you can give it “mkvi” as file extension (instead of the normal “tex” or “mkiv”) and don’t need this line anymore.
I had tried named parameters and I didn't know why it was not working... now I know! :-)
The file extension/first line is necessary because TeX itself still expects numbered parameters and context has to convert the names to numbers before TeX sees them. To know when such a conversion is necessary the file extension is a hint for context.
I have one question: - What does it happen when there is a quotation mark (") inside the parameter? Do I need to "escape" the contents passed to the macro?
No you don’t have to but you could have checked yourself :) \starttext \bold{"} \stoptext Wolfgang