texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] Re: [TeXmacs] Automatically create maths figures in dr


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] Re: [TeXmacs] Automatically create maths figures in drawing mode
Date: Tue, 26 May 2009 10:57:35 +0200
User-agent: Mutt/1.5.9i

Dear Emmanuel,

On Wed, May 20, 2009 at 10:30:27AM +0200, Corcelle wrote:
> I continue the discussion on this list.
> It is simple to insert figure in drawing mode using for example :
>   ("Triangle ABC" (graphics-set-mode "cline") 
>       (insert '(cline (point "0" "0") (point "5" "0") (point "2" "3")))
>       (tree-insert! (tree-ref (cursor-tree) :up) 0 '("")) (graphics-set-mode 
> "text-at") 
>       (insert '(with "text-at-halign" "center" "text-at-valign" 
> "center"(text-at (math "A") (point "2" "3.3"))))
>       (tree-insert! (tree-ref (cursor-tree) :up) 0 '("")) (graphics-set-mode 
> "text-at") 
>       (insert '(with "text-at-halign" "center" "text-at-valign" 
> "center"(text-at (math "B") (point "-0.3" "-0.1"))))
>       (tree-insert! (tree-ref (cursor-tree) :up) 0 '("")) (graphics-set-mode 
> "text-at") 
>       (insert '(with "text-at-halign" "center" "text-at-valign" 
> "center"(text-at (math "C") (point "5.3" "-0.1"))))
>       (tree-insert! (tree-ref (cursor-tree) :up) 0 '("")))
> For people frequently using the same figures it is time saving.
> This kind of figure can be modified and completed as usual.
> 
> My purpose was to do the same thing attaching objects to others For example 
> attaching the label "A" to the associated summit. Moving the summit (2;3.3) 
> of the triangle would move the label "A" too.
> I tried a lot of things with tree-ref, tree-set, and tree-"relatives" 
> commands but I can't manage to do it.
> Could you tell me if it is (or isn't) doable only with scheme ?

It remains our project that these things should be possible using the graphics 
mode.
In fact, you may use macros in order to achieve this, except that there is
not much support for macros in the graphics mode. It is not likely that
the necessary work will be done soon: the Scheme code of the graphics mode
has never been stabilized and the person who wrote it does other things now.
One of the best solutions would probably be to rewrite a big deal of
the scheme code from scratch. But this requires at least one month of work.
If we ever manage to get some funding for TeXmacs, then this might happen.

Best wishes, Joris




reply via email to

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