For those who use it: what are the main highlights of lgrind? I only
googled a bit, but I didn't install it yet, so I can't say anything
about it yet.

What do you think about idea of letting the code pass through vim? I
already asked about it, but here are also some preliminary results:
    http://pub.mojca.org/tex/vim/fromlgrind/
Just to show that it's not that hard. I only deleted 70% of the
2html.vim and replaced one line or two. (To get really good results
more has to be done of course, but for the beginning ...)

I took the example assembler code from lgrind (vim support for
assembler is not perfect as there are hundreds of assembler dialects,
so please don't comment on bad recognition of syntax units or on my
bad taste for style, but just to show some preliminary results and to
be able to compare the results with those of lgrind).


I produced HTML code out of the example and two PDFs, one with default
original colors in my vim and one with some arbitrary style. OK, I
admit, I cheated a bit when making PDFs (manually added header and
footer, manually added the first space [\obeyspaces ignores the first
ones], manually added colors), but this can be programmed. I don't
know enough of ConTeXt internals to be able to start programming the
support for it - I need syntax highlighting too, so I would be ready
to invest some time and effort, but I can't do it without someone's
help. However, supporing lgrind wouldn't be any easier I suppose, only
the "vim" part is much more trivial than writing own parser and
highlighting schemes for different languages.

Vim is present on probably 99% of linux/unix systems and can be
downloaded for Windows. The major problem is perhaps in achieving a
kind of consistency (different vim settings on different computers,
which have to be obeyed or discarded depending on user wish).

The syntax for defining styles could look approximately like that:
\setupsyntax[Identifier][color=darkblue,style=bold]
\setupsyntax[Comment][color=gray,style=italic]

Mojca
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to