Am 07.12.2012 um 10:26 schrieb Marco Patzer <[email protected]>:

> On 2012–12–07 Wolfgang Schuster wrote:
> 
>> The argument for the command keys has to be a macro with two parameters,
>> the first parameters contains the formatted header and the second argument
>> the formatted content of the environment.
> 
> That's how I used it in the past, but after an update I got an error
> which vanished after I removed the two arguments. I thought the
> interface might have changed.
> 
> I used it as follows. What's wrong with that?
> 
> %% macros=mkvi
> \usemodule [annotation]
> 
> \defineannotation
>  [myannotation]
>  [alternative=command,
>   command=\cmd]
> 
> \starttexdefinition cmd #first #second
>  \placeannotationcontent
> \stoptexdefinition


Commands need to be unexpandable because when you use the “command”.

This is necessary because I check for a command and this needs \unexpanded\def 
to work.

You can create a unexpandable command with \starttexdefintion by adding
the unexpanded keyword as first argument to the environment.

\starttexdefinition unexpanded cmd #first #second
 \placeannotationcontent
\stoptexdefinition

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
___________________________________________________________________________________

Reply via email to