mailing-list for TeXmacs Users

Text archives Help


[TeXmacs] literate programming sample


Chronological Thread 
  • From: "Sam Liddicott" <address@hidden>
  • To: address@hidden
  • Subject: [TeXmacs] literate programming sample
  • Date: Tue, 20 Jul 2010 17:37:40 +0100
  • Envelope-to: address@hidden
  • Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAADxQTFRF NTdQY2Z/i286eHFugnNXoJBwm5GCs5VeoqO0ua+fwLCQ4c2q19C81NDF4eLr/unQ/PTf/fXW+/rq /f/7XKo76wAAAAlwSFlzAAALEwAACxMBAJqcGAAAAi9JREFUSMetloGSqyAMRVsFNAQkxP//15cE 62rFdt/MZqbTVu/hBhLEx/qf8fgDIAN455wHyPk7wCIe9nA+fwGSH87hgD8AHPfRpy2GwdMtcBh+ mg4Ech9Ih+RNixJKDLEL0GF8VLkSojePHrDlryNijbFW8zBg8PUKbBOI6D1WCV5Rf2DzxCtgBlMs tRRVW5LyVW3ew1TfAZZ6RcQicpb4yZmaC74DJADK6BdATOrUAbJzsZie+K22ZnEBknNYysvhVH6u 1X8CqAe4DuANoPoOrAbsHXUARJ5knc5z4EyyTnHoAqj7xvkYIdk65AwhyEZKMusOIDV2QQQaCnDQ gBiDR3RdIEb5CBESt2wgQJI0Yx/Agphg1MgNsD+QkszM9wHVPx/PeQOW+fmcR9DF8+4CyCJhCuP8 fDzmBbLqs8JzMODqYNfDvKhoGYM2lDosy5jlRozccRAgrPM8iygQS3Mv87IugUgKlC7NZ6liuy4r uresVq5QuQAr09ZKEga8OkluyKXeQ6Bs3SrtqgC1pWLNqAfwDhBnB+sK8OrVL4D4h1B4zWPWhJhu gPUHKA5EwSMYUMsdQK+UKDhIOTSHeg+8HCoTOGtB/gwcl4mSdGybwXegPWhM/RHYKwchkckhUNMX 6j7ueQNScLbZZOPRxaADyO2UQCJpl7wbnE6gQ+ksWjpngxOwF1tF5ecP3R6KB+AQxPfHLncQ+nKw 06fhu68OTIfJ869eTtg22l+9zfwDK3mKl5BFHMYAAAAASUVORK5CYII=

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