Skip to Content.
Sympa Menu

texmacs-users - Re: Literate programming in TeXmacs and other wishes

Subject: mailing-list for TeXmacs Users

List archive

Re: Literate programming in TeXmacs and other wishes


Chronological Thread 
  • From: address@hidden
  • To: address@hidden
  • Subject: Re: Literate programming in TeXmacs and other wishes
  • Date: Mon, 16 Dec 2002 11:48:50 -0500

Hi Juan Pablo,

El dom, 15-12-2002 a las 15:18, Juan Pablo Romero escribió:
>
>
>
>
> >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).
>

Well I was not thinking in Mathematica, but now that you mention, yep
its seems similar. I was thinking about it because of the Literate
Programming (LP) paradigm and the use of DrScheme. DrScheme, in
difference with guille is intended for educational uses. But its writing
interface is not nice as the TeXmacs Interface. I was thinking that If I
want to lear scheme (for example) in a literate way I must, at least, be
able to write the exercise text and then put the proper code to solve
it. To made verifications of the code, this part of the document must be
"executable".

> 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.
>


Well, if you can made this things already, as Joris says, I think that I
can use this to start my literate way to learn TeXmacs. Thanks Javier
and Joris for your input. How can I put the "engine" argument for the
inserted code?

> * The result of the execution of a box can be something different than
plain
> text. An image, for example.
>
>
> I'm particularly interested in this feature, because some time ago I
wrote a
> program (called "superficie") that is something like a 3d surface
viewer. It
> reads a file containing 3d data for surfaces, points and lines and
display
> these objects in a window using opengl. It's like a light version of
> geomview.

Hey! so you're the author of Superficie, nice to meet you Javier. Is a
good work. I explore it in one of my previous classes. Can you reply
what about future planes to it? Do you think that is posible to use it
in conjuntion with Maxima? (in a private mail if you prefer, because of
the Off-topic matter).

> Anyway, the point is, I also wrote routines in several languages
> (mathematica, yacas, scheme) that mimics some Mathematica graphic
funtions
> (ParametricPlot3D, Plot3D).
>
> This program can also generate pixmaps or postscript. So, the output
image
> could be saved in some temp file and automatically displayed by texmacs.
>
> 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.
>

Yep. It would be a nice feature. I think that the code must specify a
name for the ps graphic so it can be put as a paramether in the
"Insert->Image" markup. Would be nice to have a paramether for the
defaults (for example the coordinates of the point of view) so if the
parameters are changed the graphic is updated. May be if some one click
on the image the "superficie" windows is shown so (s)he can change the
image interactively and then paste again to the editor.

>
> Regards.
>
> Juan Pablo
>

Cheers,

Offray





Archive powered by MHonArc 2.6.19.

Top of Page