Mojca Miklavec wrote:
On 10/25/06, Aditya Mahajan
wrote: On Wed, 25 Oct 2006, Aditya Mahajan wrote:
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).
\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.
I wanted to warn you about that, but you were faster. A workaround is to create an additional space: so to \type{\commands }like that.
There are many bugs in \type-ing code, but the code is rather complex .... even Taco complaind about complexity.
Hopefully lua will be able to do the task better ;)
actually, the mkiv code does it completely different already, but that's on my machine -) Hans -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------