Mojca Miklavec wrote:
But, I finally understand why I was confused yesterday.
\setupcolors[state=start] \setuptype[option=TEX] \type{\a}
does nothing (and this was what I first tried and thought that this is not supported yet; non-existing options never raise an error anyway).
I reported this bug back in April but no one replied. The problem is that the first character is read and then not given back the right catcode so that the typing stuff can process it correctly. This mainly affected me when I was trying to write inline C code, such as \type{int a}, because the int wouldn't be highlighted as a keyword.
I'm thinking about piping the code to vim, letting the vim process it and return something like \highlight[Conditional]{if}\highlight[Delimiter]{(}\highlight[Identifier]{i} ... One should modify the 2html.vim file (vim can already nicely transform the highlighted code into HTML, so ConTeXt shouldn't be so difficult). Vim already has over 400 sytax file definitions (probably equivalent to some hundred thousans lines of syntax definitions in ConTeXt). Well, I don't know (yet) how to do it, but if someone on the list has more experience with vim, please feel free to contribute.
Yes, this would definitely be a good alternative way of getting highlighting (for free). Writing a converter shouldn't be that hard, and writing ConTeXt code shouldn't be impossible either. Alas, I don't have time at the moment. I need to find myself a job first; which sadly probably won't be found in Sweden...Sweden is such a boring place when it comes to IT, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}