[NTG-context] Syntax highlighted output

Chris Rawnsley rawprawns at gmail.com
Sun Apr 29 17:56:20 CEST 2007


On 29/04/07, Aditya Mahajan <adityam at umich.edu> wrote:
> The nuts and pieces are there, but right now there is no such
> function. Here is what you can do. Write a batch script which calls
> 2context (see the complete command in \runvimsyntax in t-vim). Run it
> on the file that you want. After loading t-vim, add the following line
>
> \let\runvimsyntax\gobbleoneargument

I can't get it to work. I've added that line and then I've used the
syntax you posted previously:

\typevimfile[convert=no][copy.tmp]

Returns the error:

File does not exist. (Or more precisely:
[file [ does not exist]
Copy.tmp] )

> For making the line numbers always appear on the left, add this code
> after loading t-vim.
>
> \unprotect
>
> \def\showvimlinenumber
>    {\inleft%was \inmargin%TODO: make configurable
>        {\dostartattributes\??vs\c!numberstyle\c!numbercolor\empty
>         \countervalue{vimlinenumber}
>         \dostopattributes}}
>
> \protect
>

That works a charm. Thanks you for doing this so quick!

> Strange, I thought that with your font setup ConTeXt should fall back
> to latin modern mono. Anyway, Wolfgang's suggestion should work and
> will give you latin modern mono scaled properly to match Palatino's
> height.

Yep. It's sorted itself out now.

> Don't worry. I made this module to just have the features that I
> needed. As a result, there are lot of things that are missing from the
> module. Your effort to make the module work has been a good feedback
> to me.

Ah that's good. Well I'll try and give as much as you can bear! :)

--
Chris


More information about the ntg-context mailing list