Am 14.12.2012 um 16:43 schrieb Andre Caldas <[email protected]>:
>>>> - 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________