Skip to Content.
Sympa Menu

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

Subject: mailing-list for TeXmacs Users

List archive

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


Chronological Thread 
  • From: Michael Lachmann <address@hidden>
  • To: address@hidden
  • Subject: [TeXmacs] literate programming, again. Question about syntax highlighting.
  • Date: Sat, 12 Sep 2009 05:37:19 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=C1hj1HlQU3PF9+zKHKElG52I1c8U/ziN0m7KBzuRR7X4nfc5+tUUr9Lt2uaDwEcK8J Wqq1n918oZoG+y25d/wnzwvFr5qpo/6FvBfDz7LTZIWW2pEXzXc9vhs8xwyaFzlgNk5C 7Uf/1FwEVYSRfwYCMpnZsm7BviLqeEacF6YU4=

I was playing around with literate programming. I tried LyX, Emacs,
but it seems they all have problems.

Finally I tried TeXmacs, though it has no literate programming built
in. The attached file (I don't know if I can attach a file on the
list...)
Shows an example. basically I use noweb syntax, in text that is
inserted as "code".
I save it as verbatim, and then run noweb on the result (see bottom of file).

I think this works pretty well.

I haven't tried to debug the resulting program. But I'm coding in D,
so the debugger doesn't work anyway.

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.

Or, maybe it is easier to do it from within TeXmacs?

P.S. What is the easiest way to turn off the conversion of << to « and
\ (backslash) to 'start macro' within a verbatim or code environment?

Thanks,
Michael

Attachment: test.tm
Description: Binary data




Archive powered by MHonArc 2.6.19.

Top of Page