ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Eric Détrez" <info@eric-detrez.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: \installprettytype problem
Date: Fri, 21 Aug 2015 20:54:49 +0200	[thread overview]
Message-ID: <73c69b0648d12e062eeeb4f92f5c6839@eric-detrez.fr> (raw)
In-Reply-To: <fc396fdb-79d4-4e72-83f9-3ac93ba2fdce@email.android.com>

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@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
http://modules.contextgarden.net/dl/t-vim/doc/context/third/vim/vim.txt

\usemodule[vim]

\definevimtyping [C]  [syntax=c]

\starttext
\startC
   int func(int a){
     if(a > 4)
       return 0; // comment
     else        /* comment */
       return 10;
   }
\stopC
\stoptext

-- 
Eric Détrez
Informatique
Lycée Faidherbe, Lille
http://eric-detrez.fr
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2015-08-21 18:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-20 20:43 Matthieu Leroy
2015-08-20 22:21 ` Renaud AUBIN
2015-08-21  9:54   ` Matthieu Leroy
2015-08-21 11:30     ` root
2015-08-21 11:43     ` Renaud AUBIN
2015-08-21 11:58       ` Matthieu Leroy
2015-08-21 18:54   ` Eric Détrez [this message]
2015-08-21 20:51     ` Aditya Mahajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73c69b0648d12e062eeeb4f92f5c6839@eric-detrez.fr \
    --to=info@eric-detrez.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).