I'm trying to typeset a lot of C code in the latest ConTeXt (MKIV). It tried:
\startC
printf("Hello, world\n");
\stopC
only to find that \startC
macro is undefined. It is defined in verb-c.mkii.
I even tried to put
\input verb-c.mkii
before using \startC
but it fails on another undefined macros. What is the proper way to typeset C? The manual recommends \startC
but it doesn't state how to switch it on except of \definetyping
(which doesn't hightlight the syntax).
It actually works in MKII version of ConTeXt but it fails in MKIV.
Best Answer
This ConTeXt Garden page lists the pret-c module. So the following should work.
Maybe you need to install the module first: