![](https://secure.gravatar.com/avatar/cf6e5310df1761759e546bd7a6e037f7.jpg?s=120&d=mm&r=g)
Dear list, I’m using colored verbatim code (for course notes). In the past, I modified verb-mp.mkii for the langage I need (SAS). This code works fine with MKII: %—————— \setupcolors[state=start] \definetyping [MP] [option=MP] \starttext A example: \startMP draw (0,0) withpen pencircle 1in withcolor red ; \stopMP \stoptext %—————— I obtain a color syntax output (« draw » in red, « within » in green for example). This code does not work anymore in MKIV (every word is the same color, green). There should be a solution ? Trying to find some help, in the maling list and the « verbatim_text » page on Context garden, I found some solutions, like pretty printing, which should work on MKIV, but "pret-mp.lua » is found nowhere (nor in the context source browser, nor in my recent distribution). I must admit I’m lost in all the solutions I found there and there (most of them never works out of the box on my installation). Can somebody refer me to a simple solution, which permit me to do colored verbatim code, such as I can modify a source to insert the keywords of the langage I use ? Thanks ! Fabrice.
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 8/28/2019 8:14 PM, Fabrice L wrote:
Dear list,
I’m using colored verbatim code (for course notes). In the past, I modified verb-mp.mkii for the langage I need (SAS). This code works fine with MKII:
%—————— \setupcolors[state=start] \definetyping [MP] [option=MP]
\starttext A example: \startMP draw (0,0) withpen pencircle 1in withcolor red ; \stopMP \stoptext %——————
I obtain a color syntax output (« draw » in red, « within » in green for example). This code does not work anymore in MKIV (every word is the same color, green). There should be a solution ? Hard to say without your sas code as this just works:
\setupcolors[state=start] \definetyping [MP] [option=MP] \starttext A example: \startMP draw (0,0) withpen pencircle 1in withcolor red ; \stopMP \usemodule[scite] \startMP draw (0,0) withpen pencircle 1in withcolor red ; \stopMP \stoptext (I suppose that sas is abit like sql so pretty easy to write a lexer for it .. do you hav ean overview of the syntax that you use?) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Fabrice L
-
Hans Hagen