Felix Breuer wrote:
A simple implementation that serves both purposes might look as
follows. Suppose snippets of code in the document are wrapped in an
environment like

  <lp-code|label|body>

where label is an arbitrary string that marks which snippets belong
together and body is an arbitrary TeXmacs tree that is "the code".

A slightly more general but useful extension of this would be to use two labels, one for "import" and one for "export". This would allow you to have multiple files/sessions that shared initial segments (i.e., file/session trees). For example,

    <lp-code||common|body0>
    <lp-code|common|branch1|body1>
    <lp-code|common|branch2|body2>

would create two files/sessions with bodies body0+body1 and body0+body2. This would be more in line with languages that have the means to do #include's, and would also make possible a kind of "exploratory" session, where different approaches to the main line can be highlighted and developed without interfering with the main-line development.

Todd Wilson



_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to