mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] literate programming sample


Chronological Thread 
  • From: Michael Lachmann <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] literate programming sample
  • Date: Tue, 20 Jul 2010 18:56:37 +0200

Wow! Looks really amazing!

Who does the syntax-highlighting? 

Just a side-note:
One feature I always wished in literate programming was reverse-packing. So that you can create hello-world.c, then edit it, and then repack it to the original file. For that you probably need to add comments in the resulting file of which chunk generated which sections of the file.

thanks! Can't wait to try it out,
Michael

On 20 Jul 2010, at 6:37PM, Sam Liddicott wrote:

At the end of this link: https://savannah.nongnu.org/task/download.php?file_id=21016 you will find a sample of literate programming on texmacs using a new stylesheet, based on the noweb style as used by me with Lyx and Latex.

* <label> in a code chunk generates reference text like" 2d line 3"
* each named chunk automatically generates a label that can be accessed like <chunk-reference|message-printf|1> (to get the first block named chunk-reference).
* line numbers are automatically continued between chunks of the same name

Now I just need to adapt my extraction tool (at new.fangled.org).

Features I intend to add to the texmacs stylesheet are:

* optional in-place expansion if referenced chunks (for illustrative purposes)
   [depends on me getting recursive expansion of document tree to insert new <item> at right point (for line numbering)]
* decoration of expanded referenced chunks using braces or over-braces
* parameterized chunks (use to write algorithms - sort of like poor-mans STL/generics)
* in-place expansion of parameters in parameterized chunks (for illustrative purposes)

To get this to work well I need to know how to read the results of <write|...|...>

I note that langle and rangle come out badly in html (literally langle and rangle) and not at all in text

Comments invited.

Sam
--
Sam's signature




Archive powered by MHonArc 2.6.19.

Top of page