mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] dynamic text (external program output)


Chronological Thread 
  • From: Joris van der Hoeven <address@hidden>
  • To: Vaclav Smilauer <address@hidden>
  • Cc: <address@hidden>
  • Subject: Re: [TeXmacs] dynamic text (external program output)
  • Date: Mon, 29 Dec 2003 11:35:57 +0100 (CET)


Hi,

On Mon, 29 Dec 2003, Vaclav Smilauer wrote:
> I would like to insert something like "<py-eval|x=4> [some text,
> formatting etc] <py-eval|x**2>" into texmacs document and have texmacs
> call (for example) python for every py-eval and put the output (created
> by the python-side, of course) into the document (e.g. x=4 ... ^2=4^2=16
> ...), with the possiblity of later changing the input again.
>
> How is this possible? Is there a precedent, something similar, already?
> How would I call e.g. some python function for _all_ expressions in
> py-eval's in the entire document one after another, how can I do it for
> one expression at the time?

This should be quite easy to do. The best solution would be to first
write a small plug-in for Python and then create a style file with
py-eval and other markup you might need. All this (and much more)
is explained in detail in

Help -> Interfacing
Help -> Manual -> TeXmacs plugins
Help -> Manual -> TeXmacs as an interface

with several examples. It will probably take you a day or so to
read this stuff and get something working. This would be quite useful,
because several people have already been requesting for a Python plug-in.
So please read the documentation and ask us again if something
is not clear.

> It seems to me that math sessions are similar, except that here input
> would be hidden (replaced by output), and scattered through other text
> and formatting. Or am I just talking about the planned "universal
> spreadsheet"?

No, sessions are rather enriched shells for different systems,
and very useful when you want to do computer algebra,
numerical analysis, etc. I have the impression that
you are rather looking for something to make the text more dynamic.
TeXmacs also allows you to do that, although this possibility
has not been exploited much yet. So we would be very glad if
you want to do so :^)

Best wishes, Joris




Archive powered by MHonArc 2.6.19.

Top of page