On Wed, 25 Oct 2006, Hans Hagen wrote:
Aditya Mahajan wrote:
Hi,
How can I define a command that is the inline version of \startTEX ... \stopTEX. (I need to show inline commands in color). There had been a discussion on this in the past, and Taco had suggested a solution
http://archive.contextgarden.net/thread/20050907.093522.baf795f5.en.html
which is also posted on the wiki.
http://wiki.contextgarden.net/Verbatim_text#In-line_text
However, due to the recent changes in verbatim code, that solution no longer works. Can anyone suggest how to fix it?
\setupcolors[state=start]
\setuptype[option=TEX]
\definetype[typeTEX][option=tex]
\starttext
\type+\type{\type is a wonderful macro}+, isn't it?
\typeTEX+\typeTEX{\typeTEX is a wonderful macro}+, isn't it?
\stoptext
Thanks, that looks easy :-) However, there seems to be a bug, sometimes the color spills across the type boundary. \setupcolors[state=start] \setuptype[option=TEX] \definetype[typeTEX][option=tex] \starttext The options \type+before=\startsolutionbackground+ and \type+after=\stopsolutionbackground+ take care of putting a frame, which can {\black The options \typeTEX+before=\startsolutionbackground+ and \typeTEX+after=\stopsolutionbackground+ take care of putting a frame, which can } \stoptext Aditya