[NTG-context] \installprettytype problem

Eric Détrez info at eric-detrez.fr
Fri Aug 21 20:54:49 CEST 2015

Le 21-08-2015 00:21, Renaud AUBIN a écrit :
> Bonsoir Matthieu,
> Give a try to https://github.com/nibua-r/pretty-c and tell me if
> anything goes wrong…
> It's basically a rewrite of Peter's module adapted to mkiv + new
> verbatim (new at the time of writing)

> Le 20 août 2015 10:43 PM, Matthieu Leroy <matt57.leroy at orange.fr> a 
> écrit :
>> Hello,
>> I want to use the "
>> C-Pretty-Printing" module.
>> According to the "Verbatim" page of the Context garden, I have to use 
>> the \installprettytype command, but this one doesn't work (error : 
>> "undefined control sequence").

Nobody did mention the use of vim package ?
You have to installe vim in your system
The package asks vim to get the lexed source code.
Next the package color it.
It doesn't seem obvious to change the colors.

Doc at


\definevimtyping [C]  [syntax=c]

   int func(int a){
     if(a > 4)
       return 0; // comment
     else        /* comment */
       return 10;

Eric Détrez
Lycée Faidherbe, Lille

More information about the ntg-context mailing list