[NTG-context] An idea

Hans Hagen pragma at wxs.nl
Sun Dec 4 20:00:34 CET 2005

Christopher Creutzig wrote:

>Nikolai Weibull wrote:
>>this than I have is welcome to finish it.  The \highlight command should
>>be defined something like this (pseudo-tex-code):
>>  {\bgroup
>>   \setupcolorforgroup[#1]%
>>   \type{#2}%
>>   \egroup}
>>#1 is a group name, such as Statement, Operator, or Comment.  #2 may
>>contain multiple lines, and I don�t know how well this will work on the
>>TeX side.  It may also contain special characters like {, #, &, and so
>>on.  Suggestions?
> The most simple one I expect to work would be
>  \bgroup
>  \setuphighlightcolors[{#1}]% never forget those {},
>%                            % since [] aren't balanced!
>  \processinlineverbatim\egroup}% \egroup is an argument to
>%                               % \processinlineverbatim here
> (I did have some mildly elaborate low-level code here, but upon
>searching for the ConTeXt way of switching of everything, I came upon
>\processinlineverbatim, which probably does everything you want.  If it
>does not, please come back and I'll send you something more low-level
>that should.)
there is no need for verbatim mode when you convert anyway!


More information about the ntg-context mailing list