texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Scheme interface for the graphical mode


From: Giovanni Piredda
Subject: Re: [Texmacs-dev] Scheme interface for the graphical mode
Date: Wed, 25 Nov 2020 00:39:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2

Hi Max,

thanks for the answer. I will continue the post with the code I wrote, which is simple and does what I want although it may make graphical lists redundant and difficult to read.

For the visibility: does tm-define-macro also define globally-visible macros? As I find that using define-graphics, which is defined in progs/graphics/graphics-markup.scm with tm-define-macro, gives Unbound variable: define-graphics.

Or maybe it is the whole of graphics-markup.scm which is never loaded by TeXmacs?

At any rate the answer is that one should not yet use the built-in Scheme functions for graphics manipulation (which look like a good system of functions to me), so for the post I will use the few functions I wrote and say that in TeXmacs a comprehensive set of functions has been sketched and partly implemented and documented but it is not yet ready.

G.

On 25.11.20 00:02, Massimiliano Gubinelli wrote:
Dear Giovanni,
  procedures declared with tm-define are visible globally, while procedures 
declared with define are only visible within the module. I think this answers 
your question.

Of course in the future it is possible to imagine to enhance the module with 
additional procedures, useful for graphic programming, but for the moment I 
think would be better to experiment with code external to the main code-base.


Max



On 24. Nov 2020, at 23:47, Giovanni Piredda <pireddag@posteo.de> wrote:

Dear all,

I am writing a small blog post for modular graphics and I realized that two out 
of the three functions that I wrote for that already exist in TeXmacs (and 
maybe the third too ... but I do not know).

To orient myself better: what is the status of the functions in 
progs/graphics/? Is one expected to be able to use them from Scheme?

I tested a few in a Scheme session. Some work ((stree->tree '(rectangle (point 
0 0) (point 1 1))) draws a square), some don't (example: Unbound variable: 
enhanced-tree-property-set!), some work differently from how I expect them to.

Example for the last case: (enhanced-tree->radical '(with "color" "red" (gr-group (point 1 0) 
(point 1 1)))) outputs (with "color" "red" (gr-group (point 1 0) (point 1 1)))

A short explanation of the status would help me to rewrite what I have already 
written (or to put it in the context of what already exists).

As far as I can see, the whole documentation for these functions is in 
Help→Scheme extensions→Scheme interface for the graphical mode.

Looking forward to some info.

Giovanni


_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/texmacs-dev

_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/texmacs-dev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]