![](https://secure.gravatar.com/avatar/6ecb29fbbdc534d6e5684c573aa7b16f.jpg?s=120&d=mm&r=g)
Hi all,
Here is a simplistic C syntax highlighter. I hope I've extracted
comments/strings/numerics (more or less) correctly.
shenchen
On Wed, Oct 1, 2008 at 11:44 AM, Chen Shen
Hi,
Thanks for the pointers. It seems that the syntax-highlighter only need supply "function buffers.visualizers.mp.flush_line_()", which returns a buffer containing the typesetting commands. Will try playing with it.
At the moment, I am looking for the feature with \setuptyping[option=commands]. I saw "\mksetupcommandsintype" defined, and "buffers.visualizers.enableescape = true" set in core-ver.mkiv, but it isn't handled in the default visualizer.
------------------- \starttext \setuptyping[option=commands] \starttyping abc <<abc>> <> /BTEX{\sl abc}/ETEX \stoptyping \stoptext -------------------
regards, shenchen
On Wed, Oct 1, 2008 at 1:15 AM, Wolfgang Schuster
wrote: Am 30.09.2008 um 18:37 schrieb Chen Shen:
Hi Wolfgang,
I guess you are referring to mkii features. It seems that formatting in verbatim doesn't work in mkiv yet, or did I miss out something? None of the wiki verbatim examples worked for me.
Syntax hyghlighting is implemented in different ways for MkII and MkIV, MkII use TeX code while MkIV use Lua code to show the keywords etc.
Hans added only files for TeX, MetaPost and Lua in MkIV but you could write files for more languages, you find the rules in the verb-*.lua files.
Regards, Wolfgang
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________