mailing-list for TeXmacs Users

Text archives Help


Re: shortcut for tables..


Chronological Thread 
  • From: Giovanni Piredda <address@hidden>
  • To: address@hidden
  • Subject: Re: shortcut for tables..
  • Date: Thu, 10 Dec 2020 01:37:43 +0100


Am 09.12.2020 um 23:30 schrieb Massimiliano Gubinelli:
Dear Vincent,

On 9. Dec 2020, at 23:03, Vincent Douce Mathoscope <address@hidden> wrote:

i take the occasion of speaking programmation of this thread to ask (maybe i should open a new thread ?) if anyone has made a video explaining step by step how you can execute a python/matplotlib program inside TeXmacs. i mean, can i open a python session and call the .py file i have written before ?


I'm not sure what you mean. You can open a Python shell, which will give you a prompt. There you can load a script in any way python allows you. I do not know the language well, sorry. Maybe look here:

https://stackoverflow.com/questions/5280178/how-do-i-load-a-file-into-the-python-console

in order to have graphics embedded in your document, you have to tell to matplot lib to produce a ps or pdf.

Running Python scripts that generate matplotlib figures opens the figure in a separate window on Windows. As far as I remember, in Linux as well.

This means that at least for the moment in order to have figures generated with matplotlib in a TeXmacs document, one needs to save them to file, then display them (by linking or copying).

With Maxima someone (can find who it is, but right now can't access the TeXmacs-dev which I need to find them out) added the "inline" feature to the plugin, so now one can get images generated by Maxima inline or even embedded if they set the Maxima commands in a Fold->Executable environment (analogous to what one can do using TikZ in the Graph plugin, pls see here for a step-by-step description: https://texmacs.github.io/notes/docs/embedding-tikz-figures-short.html).

I do not know at all the steps that the softwares go through to generate the image, so I do not know if it is possible to get the matplotlib plots to appear inline in a python session in TeXMacs (I have seen on the Internet that it is possible with IPython).

On the other hand the textual output of Python sessions can be embedded using the Fold->Executable.

For your other question

but i aslk wether anybody would have made a video about how to write some scheme command for TeXmacs.

I have started writing something, even if my knowledge of Scheme is at an elementary level. It is here: https://texmacs.github.io/notes/docs/scheme-graphics.html

But despite what I wrote being elementary, it may be necessary to go first through a bit of even more introductory material (I like both the Wikipedia book Scheme programming---https://en.wikibooks.org/wiki/Scheme_Programming--- and Yet Another Scheme Tutorial---http://www.shido.info/lisp/idx_scm_e.html--- by Takafumi Shido, I have placed the links in the blog post as well).

If one looks at the first sections of those online courses, it is a good occasion to figure out if one likes to program in Scheme or does not---I think this is important and if I were you, this is the first step I would take, as Scheme is quite different from procedural/imperative languages (I have a vague grasp of the difference between the "procedural" and "imperative" concepts so I put them both together ...).

Finally, there is another issue, that I have tackled only in part, that is Scheme plays different roles within TeXmacs (as far as I understand)---one is that TeXmacs trees can be written in Scheme form and can be manipulated via Scheme, a different one (please Max, Joris, others, correct me if this is wrong) is that one can use Scheme to control the TeXmacs editor (I do not know if there is anything else).

G.








Archive powered by MHonArc 2.6.19.

Top of page