For those trying out, m-\ (windows \) can be used to enter nodes
like <label|...> and <nf-ref|...> in a code block
without any messy cut-n-paste.
Sam
On 21/07/10 12:11, Sam Liddicott wrote:
Thanks to great help from Joris I am able to offer a preview of
the literate programming stylesheet for texmacs.
I still need to update the newfangle tool to generate the actual
programs from the document. (It is currently designed to work on
tex output from lyx).
You can get the style file and sample document and try it out from
here:
https://savannah.nongnu.org/task/index.php?10516
Put the style file in your packages directory (for me,
~/.TeXmacs/packages/)
Joris, I may need your help to do something about the enormous
number of page references that get generated in the references
section at the end of the document which never get pruned. Because
labels are generated based on a live field, new labels get
generated every time the user makes a change to a listing name
(i.e. each time they type the next letter of the listing name!) It
may not be simple to know if a reference no longer has \label
todo:
* work out how to assign actions to key-shortcuts to insert nodes
at a certain point of the tree.
for instance: \nf-ref can't be typed into a listing box because
(thankfully) the \ comes out literally. So I need a keystroke
combination to allow insertion of nodes. I would prefer a general
key that makes \ become magic again, but others may also prefer
keystrokes (and menus) to insert specific nodes like \label and
\nf-ref (yes \label works)
* Fix text output so I can amend newfangle to generate programs.
I need a <specific|...> tag that triggers for text exports.
There seems to be one for tex, html, printing, images and pretty
much everything except text.
* add a shortcut that does document->update three times. Maybe
one that does update a lot of times until the references section
of the document stops changing (with an upper limit).
* fix html output which looks pretty rotten
(insert-go-to `(inactive (nf-ref ,"")))
* align the langle with the border of the listing. (I don't quite
grock the difference between \move and \resize)
* work out how to use literate programming inside .ts files
(rather than generate .ts from the .tm)
I've been using Lyx for literate programming of some large-ish
commercial projects but I find although Lyx is further ahead with
some features, I much prefer TeXmacs and the concepts behind it -
I find it to be absolutely genius.
Texmacs treats the document as a program - not in the sense that
html+_javascript_ does when you have a global state for the whole
document, but in the tex sense (or SH) sense where the next part
of the document is affected by the previous part of the document
and affects the next part of the document.
For a long time I have wanted an editor where I can script
document generation and latex was the closest I got (but it's too
opaque) but TeXmacs is it! Thanks Joris and everyone else!
Sam
--
Sam's signature
--
Sam's signature
|