Hello *,
I am new to this list. Sorry if I'll say something which was already
discussed.
Maxima can be used via a number of interfaces: from the command line,
xmaxima, from emacs... One more way to use it is via TeXmacs. Maxima can
produce its output in the LaTeX form, and TeXmacs renders it on the fly,
giving an excellent quality of graphical formula output. For those who
like graphical formula input (in Mathematica), recent versions of TeXmacs
can do it, too. The combination Maxima + TeXmacs can provide a GUI
computer algebra environment which can compete with Mathematica, and even
has a better quality of output.
Unfortunately, at the moment this interface (written by myself) is, to put
it mildly, brittle. I'd like to ask a few questions and make a few
suggestions about possible improvements in Maxima input-output, which can
make the life much easier for me, and, probably, for those who write other
interfaces to Maxima. The main problem is: the text output from Maxima
lacks much of the structure which was present inside, and the interface
has to do a lot of work to reconstruct it; it would be much easier to
preserve this structure during output.
The main thing any interface must know is: what piece of output is a
prompt, i.e., immediately preceeds an input? In texmacs.lisp, I redefined
MAIN-PROMPT, and the interface has no problem recognizing (C1) prompts.
But when a break prompt is generated (MAXIMA>> in GCL), the interface does
not recognize it, and hangs. Is it possible to redefine the break prompt?
It seems Lisp-system specific; how to do it in GCL? in clisp? Similarly,
when a user uses describe(something);, a prompt asking to input one or
several numbers appear. How to redefine it? (again, it seems
Lisp-specific). It would be great, generally, to have some function (say,
PROMPT) which is exclusively used to produce pieces of output immediately
preceeding input. Then it could be redefined once and for all, and there
would be no need to patch individual commands like, e.g., entermatrix.
Another problem: when a line of input is not a complete statement, Maxima
waits for more input without any prompting. TeXmacs interface hangs,
because it waits for a prompt. It would be very good to modify the Maxima
reader in such a way that it calls some PROMPT when it reads a newline
inside a statement. This prompt may be empty by default, but it should be
redefinable.
When I wrote texmacs.lisp, I found and fixed many bugs in mactex.lisp. I
sent a patch to Bill Schelter, and he replied that my bug fixes will be
encorporated into the development version of Maxima. I don't know if they
are really in the development tree or not. I think that some more things
from texmacs.lisp should be incorporated in the mainline Maxima sources,
e.g., a patch to DISPLA which forces Maxima to output everything in LaTeX
if $DISPLAY2D has some value, and some more stuff. It can be useful for
other interface writers.
Best wishes,
Andrey