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: Corcelle
Subject: Re: [Texmacs-dev] Re: [TeXmacs] Automatically create maths figures in drawing mode
Date: Tue, 16 Jun 2009 23:13:12 +0200 (CEST)

Hello,

For the moment, I didn't succeed in "attaching" objects to others and I think I 
still have a long way to go...

So I started with something in between. I wrote procedures to automatically 
create objects :
1- Some entries give a complete figure :
  ("Rectangle" (graphics-set-mode "cline") 
        (make-fig-polygon-lab '(0 4 4+2i +2i) '("D" "C" "B" "A") '("" "" "L" 
"l"))   ;; polygon with n complex summits 
        (make-fig-mark-right 4 0 +2i 0.3)   ;; angle (4 0 +2i) of size 0.3
        (make-fig-mark-seg 0 4 "double" 0.2 +i)   ;; double mark on segment (0 
4) of size 0.2 and angle argument(+i)
        (make-fig-mark-seg +2i 4+2i "double" 0.2 +i))

2- Others give an interactive access to the different objects, the scheme 
command is given in the footer and can be modified afterwards (I chose to use 
complex numbers for an easier use) :
  ("Polygone"
        ((tm-property (footer-eval cmd)
                (:argument cmd "Command ->")
                (:proposals cmd '("(make-fig-polygon-lab '(0 4 3+2i +2i) 
'(\"A\" \"B\" \"C\" \"D\") '(\"d\" \"c\" \"a\" \"b\"))" 
                                  "Help : '(Affixes des points) '(Labels des 
points) '(Labels des cotes)")))
         (interactive footer-eval)))

I have two little question about this :
1- All my procedures are called "fig-something" to clearly distinguish them 
from TeXmacs ones. Is it necessary to do that or not ?
2- The interactive insertion of figure works really well but it seems a little 
tricky. Is it a problem and if it is could you give me an other way to do that 
in a proper way ?

Thanks in advance.

Emmanuël
        



> > > 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.
> I would be most grateful if someone could give me a hint or an example
> of attaching a point and a label. Afterward, I could extend it to more
> complex figures.
> 
> > 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.
> Unfortunaltely I wouldn't be able to do such a thing (I would like
> to).
> 
> > If we ever manage to get some funding for TeXmacs, then this might
> > happen.
> > 
> Thank you for these precisions. 
> I'll continue to try on my own (knowing that it is possible).
> 
> Have a good day.
> 
> Emmanuël
> 
> 
> _______________________________________________
> Texmacs-dev mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/texmacs-dev




reply via email to

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