Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] literate programming, again. Question about syntax highlighting.

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] literate programming, again. Question about syntax highlighting.


Chronological Thread 
  • From: Joris van der Hoeven <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] literate programming, again. Question about syntax highlighting.
  • Date: Thu, 24 Sep 2009 19:29:31 +0200

On Sat, Sep 12, 2009 at 05:37:19AM +0200, Michael Lachmann wrote:
> The main improvement would be to get easy syntax highlighting.
> Is it possible to have TeXmacs dump a region to an external program,
> then read the result back in, and interpret it as TeXmacs formating?
> Then it would be quite easy to rig something up that gives
> highlighting for code.

Let me detail a bit my current objectives as to syntax highlighting.
At the moment, we just hard-wired highlighting for Scheme, C++ and Mathemagix.
This is OK as far as I am currently concerned, but not very satisfactory and
there are bugs. The C++ code can be found in src/System/Languages.

Another approach to litterate programming is web/noweb.
I have no time for this, but it should be relatively easy (e.g. message by
Edward)
to program such an extension yourself or in collaboration with other hackers.

Yet another approach is to send parts of the document to an external program,
which rewrites it as something else *and* gives information on how to remap
the cursor. Work is in progress on this issue, as part of a much more dynamic
linking system during this academic year. Of course the approach may be slow
on larger documents, if no hacks are used to do the coloring only on parts.

The most solid approach consists of writing a grammar module where languages
can be defined formally and parsers can be created as a function of that.
This is indeed planified since a while (ten years...), but it is possible that
some progress will be made on this too in the near feature, because this is
also important for more semantic editing.

Best wishes, --Joris



Archive powered by MHonArc 2.6.19.

Top of Page