Maybe some work to make Maxima display much better
Subject: Maybe some work to make Maxima display much better
From: C Y
Date: Fri, 7 Dec 2001 06:11:30 -0800 (PST)
--- "Andrey G. Grozin" <A.G.Grozin@inp.nsk.su> wrote:
> Hello *,
>
> > Instead of making the output of maxima run through
> > tex, why don't we change the output of the Maxima display
> > program to be whatever information is actually needed
> > to display. I don't know if this is some kind of
> > unicode or postscript or some other format, but the
> > program that displays
> > 2
> > x
> >
> > can certainly learn to use different size fonts and
> > spaces. Since the maxima program also presumable has
> > some environmental access it can tell how wide your display
> > is and such stuff.
> First, high-quality typesetting of formulae is not a trivial problem.
> Just have a look at the sizes of programs that can do it well: TeX,
> lout, TeXmacs. Your suggestion amounts to reimplementing one of them
> in Lisp. No doudt, this is possible. The above examples show that
> this would require many man-years of work. Second, what OS API do you
> propose to use? Direct use of Win32 API is tedious, and it would mean
> that all this work will be useless on all platforms but one. You
> mentioned PostScript. It was indeed used for display in NeXTStep, and
> can be used now in GNUStep with Display GhostScript. Not too wide
> choice. Use X protocole? X fonts are not particularly well suited for
> mathematics (this is the reason why LyX has not so good display
> quality as TeXmacs).
>
> I'd say that it is much better not to re-invent too many wheels, and
> to use high-quality free software available. It seems to me that
> running TeX on each Maxima output is a bit heavy-weight (though the
> results should be good). I think that TeXmacs is a better solution.
> Have you used it? When TeXmacs-Maxima interface works, it produces
> very high-quality results. I think, we should stabilize this
> interface, maybe, merging it with Emaxima.
> They should have, I suppose, very much code in common.
I guess I might as well add my current thoughts on this matter to this
thread, but keep in mind what I have in mind is a long term project,
which would hopefully produce excellent results but take some time and
effort.
The problem of displaying Mathematical markup on multiple platforms has
never been fully addressed by any free library I am aware of. The
closest one, which I beleve is the one most worth expanding and/or
basing our own solution on, is GtkMathView. I have had communications
with the author indicating the code is not deeply tied to the GTK
toolkit, and just within the past few days someone has gotten it to
compile on Windows, so at least in theory it should be portable.
Everyone I have heard discuss the code, even the founder of Gnome who
is usually highly critical of C++ code, says it is very well done. Its
display, while perhaps not of the quality of TeX, is certainly high.
It also has the ability to export to postscript. Currently it is
mathml based, but if we were to add the ability to understand maxima's
representation of mathematics, the possibilities would begin to open
up.
My prefered general solution would involve two other major pieces -
wxWindows replacing Tcl/Tk, and a new plotting solution (particularly
3D) based on the Visualization Toolkit. Both of these libraries are
robust and powerful, and there has already been a little work done on
getting these libraries to communicate. The problems, however, are
nontrivial. The plotting logic in maxima would need to be adapted to
VTK, and new VTK routines would have to be defined for plotting.
GtkMathView would have to be adapted to work with wxWindows, to handle
maxima syntax, and hopefully ultimately to support formatted input as
well as handling the output. The internal structure of maxima would
have to be restructured, with an eye towards communicating with
external interfaces. (The last probably will have to be done anyway,
no matter what solution we decide on.) Foreign function interfaces
would most likely have to be developed, although it is my hope that the
need for them could be kept to a minimum. Once all this was
accomplished, however, we would have a general and extremely powerful
solution, with many of the major libraries being independantly
maintained.
Since the original discussion Richard and I had about my perl ideas,
I've come to the conclusion he was right about the approach I was
advocating at that time. A much more robust solution is needed than
just copying and pasting files to the hard disk and having them read by
different programs. I've been hunting good tools for the task, and the
above is the best long term solution I've been able to dream up. The
capabilities of wxWindows would give us enormous flexability, and
native appearances on each platform. VTK's graphics are unbelieveable,
and properly used should allow a 3D plotting solution beyond anything
else out there. GtkMathView has done much hard work on the problem of
displaying math, in a manner which can apparently be made cross
platform with some work.
Since this discussion came up, I've gone ahead and voiced these
thoughts, even though I have not done the necessary work to actually be
able to say, definitely, that this can be done. I invite comment by
more knowledgeable people (that's everyone ;-) as to this plan and
whether it has long term merit.
This is also not to suggest that we abandon other efforts to try this -
the emacs interface has advantages which cannot be duplicated anywhere
else, and the ability of TeXmacs to interface with many systems alone
makes that effort worth persuing. This is suggested as a long term
replacement for xmaxima more than anything.
CY
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com