[NTG-context] In-line syntax highlighting for type

Mojca Miklavec mojca.miklavec.lists at gmail.com
Wed Oct 25 16:28:19 CEST 2006


On 10/25/06, Aditya Mahajan <adityam at umich.edu> 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 ;)

Mojca


More information about the ntg-context mailing list