mailing-list for TeXmacs Users

Text archives Help


Re: Literate programming in TeXmacs and other wishes


Chronological Thread 
  • From: Joris van der Hoeven <address@hidden>
  • To: address@hidden
  • Subject: Re: Literate programming in TeXmacs and other wishes
  • Date: Mon, 16 Dec 2002 10:30:58 +0100 (MET)


> >4. Because we are now not only using interactive sessions, but also
> >writing a more long code, we would "execute" some parts of the document.
> >May be selecting them and then choosing and "execute marked parts"
> >option or something like that. Every marked part is passed to the
> >respective language "engine" and results of execution are shown. Because
> >of the estructured nature of TeXmacs may be it can be done generating
> >temporaly files of each Code Section and send them to the specified
> >language "engine".
>
>
> This seems like the Mathematica front-end, isn't it?
> There, every document is composed of "cells". Each cell contains code
> (which
> can be executed) or formatted text (with fonts, etc).
>
> I suppose it shouldn't be too dificult to adapt the current code to behave
> something like this:
>
> * You start an interactive session and texmacs inserts a box, but this box
> allows multiline code fragmens. Texmacs assigns some id to the session.
>
> * You submit the box's contents to the engine for execution (say, with
> <Shift+Enter>), and texmacs displays the result.
>
> * You move out of the box, and continue editing your document.
>
> * Later, you insert another code box, but use the id of the session you are
> interested in. So, texmacs doesn't start another session but submits the
> code to the previously started.
>
> * There are commands for manipulating a session, like killing it,
> restarting
> it, etc.
>
> * You can start engines in another machines, not only the local one.
>
> * The result of the execution of a box can be something different than
> plain
> text. An image, for example.

Everything you mention *is* already available inside TeXmacs.
Moreover, it is possible to insert sessions of different types of systems.
Inserting a session with a tag as you mention can be done using
Text -> Session -> Other. For the feature, we rather plan to add some
more editing facilities to sessions (interjection of normal text,
folding inside sessions, removing all outputs, etc.).

> This is actual code:
>
> ------------------
> (define f '(* x y))
> (sup-plot-3d f (x -1 1) (y -1 1))
> ------------------
>
> at this point, the program shows a window with the graph of 'f'. But it
> would be very nice if texmacs would display the image within the document.

It suffices to read the documentation in "Help -> Interfacing" and
improve the Yacas interface such that it outputs encapsulated
postscript to TeXmacs.




Archive powered by MHonArc 2.6.19.

Top of page