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):

\pdef\highlight[#1]{#2}%
 {\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

\def\highlight[#1]{%
 \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!

Hans
_______________________________________________
ntg-context mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to