While we're on the plot window...



There are easy problems in typesetting, and hard ones.
The easy ones involve lines of conventional mathematics
that fit on one line.   
  a+b+c+d
The hard ones usually involve lines that must be
split over many lines, and in unusual ways.
  a+b+c+d+e+f
   +g+h+i+j+k
   +l+m
   - abcdefgh*
     ijklmn/
     (pqrst*
      uvwx)
Does Texmacs do this? If not, it does not solve
the hard problem in the "conventional" way.
There are other (not as good) ways of dealing with
large expressions like scrolling horizontally
or forceably ripping the horizontal expression
somehow  (this is inevitable in some sense, because
you can create single symbols that exceed a line
in length.  e.g. 1000!. 
)
There should be no problem in feeding labels to
Texmacs to identify what has been selected
functionally.   If you want to point to a
part of the expression in the Maxima system
as opposed to constructing a new subexpression,
you have to have pointers into the actual
lisp. This could be done (for example) by
hash-coding all subexpressions, giving them
tags, and telling Texmacs what those tags are.
However, not everything that you display
exists in the lisp. 
For example a/b is internally something like
(* a (expt b -1))  so there is no division.
a+b-c  is  (+ a b (* -1 c)) so there is
no "-", just a constant.
There is a program called FORMAT which is
used to make such changes prior to display.
If you pick things out of the result of
FORMAT, that is merely a temporary data object,
and not permanently stored.  There are
commands PART and INPART in Maxima.  INPART
works on the unformatted version, PART on
the formatted version.
  If you do not want pointers back into the
existing lisp, but are happy re-creating
subexpressions, then there are neater solutions.
I'm not sure what is required though.



Joris van der Hoeven wrote:
> 
> On Sun, 6 May 2001, Bill Schelter wrote:
> 
> >    Mathematica ability of inputing things like integrals
> >    "graphically" (for lack of a better term.) Sorry, I
> >    guess I don't know how to express it more clearly.  Or
> >    maybe I'm not thinking about maxima the correct way.
> >
> > You really maybe should take a look/try at TeXmacs.
> > http://www.texmacs.org/
> 
> Thanks for your interest for the TeXmacs program.
> 
> > It lets you type in math in graphical form, but normally maxima input
> > is in maxima form, just the output is tex like form.   It actually
> > uses mactex.lisp (fateman's file).    The interface was done by
> > A.G.Grozin@inp.nsk.su
> 
> It would also be possible to have the input in graphical form.
> Would this be useful for you? What syntax would be preferrable
> in that case?
> 
> > It does not yet allow interrupts, but I think that is a solvable
> > problem, just as I do in netmath.  You just have to listen for a
> > signal or listen on a second channel.  Maxima can say accept a signal
> > and then do something, like stop the computation.  Under windows I
> > have a hack winkill.exe which lets me get around the lack of signals.
> 
> The best would be to have support for the standard unix signals.
> TeXmacs uses SIGINT and SIGKILL.
> 
> Another current problem is how to handle multiple line input.
> How can TeXmacs know whether maxima is waiting for more input
> or whether maxima is computing some output?
> 
> > Also it needs something to associate to each part of the tex
> > expression the maxima part which generated it.   This should be
> > simple, yet would let mousing a subexpression.
> > This could be done on a second pass too:   For example if
> > the maxima side remembered the lisp form of the tex expression it
> > sent, and then texmacs communicated back a certain string range
> > of the tex expression, then mactex.lisp could make a second pass
> > figuring out which subform caused the generation of the relevant
> > region of the string.
> > eg ((mplus) ((mexpt) $x ((mplus) $u $v))) ==> x^{u+v}
> > so if TexMacs said to maxima we have boxed something that is a
> > substring from 2 to 5, then it would be trivial for maxima to
> > know it was ((mplus) $u $v).
> 
> I would rather be in favour of another mechanism
> if this subexpression handling is really important,
> although it may take a few months before I will implement it.
> 
> The idea would be that Maxima sends "labeled output" to TeXmacs:
> each subexpression which you might want to select is given a label.
> TeXmacs may send this label back when the expression is selected,
> so that Maxima can reindentify the subexpression.
> 
> This mechanism has the great advantage of not complicating
> the conversion algorithms (TeXmacs does NOT use LaTeX as its
> intern format, so your LaTeX output is also being converted).
> Furthermore, one might consider some more fancy add-ons,
> like further expansion of the O() part of a power series if
> you double click on it.
> 
> -Joris-
> 
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima