ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Subject: Re: lgrind...
Date: Wed, 14 Sep 2005 18:05:11 +0200	[thread overview]
Message-ID: <6faad9f005091409056d805f66@mail.gmail.com> (raw)
In-Reply-To: <4.3.1.2.20050913111054.02e01810@cits1.stanford.edu>

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

  reply	other threads:[~2005-09-14 16:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13  8:08 lgrind Andre van der Vlies
2005-09-13  8:44 ` lgrind Taco Hoekwater
2005-09-13 15:09   ` lgrind Andre van der Vlies
2005-09-13 18:24   ` lgrind Brooks Moses
2005-09-14 16:05     ` Mojca Miklavec [this message]
2005-09-14 16:13       ` lgrind Hans Hagen
     [not found] ` <36174.192.168.54.1.1126645119.squirrel@vandervlies.xs4all. nl>
2005-09-13 21:35   ` lgrind (An intro to LaTeX package conversion) Brooks Moses
2005-09-14  9:34     ` Andre van der Vlies

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=6faad9f005091409056d805f66@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --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).