Subject: What should a GUI do; also , why case sensitive?
From: Michael Reimpell
Date: Fri, 15 Oct 2004 10:39:37 +0200
> If I want to typeset, I get the result from macsyma (etc) as TeX.
> I paste it appropriately in another emacs buffer that has a draft of
> a paper in it, and I process that, usually via pdflatex, to make
> a pdf which I view in a separate window.
It is also desirable to be able to include calculated plots into a paper in
publication quality. Luckily, these are again just different types of views,
so this functionality can be easily added in the model-view-controller
design, once the framework is ready.
> Viewing result all typeset actually does not solve everything
> because I ordinarily wish
> to be able to edit the latex source, in case the results are not
> quite pretty enough. That is why commercial CAS, even if they
> do on-screen typesetting, also have TeX formatting commands.
The term "view" in the pattern is meant in a more abstract way. E.g. a
MathMLView could be used to display the result in the application window and
a LaTeXView could handle the copy to clipboard request. This way you could
look at a "all typeset result" and still copy the contents as LaTex markup
via a context menu or keyboard shortcut.
> Communication between front-ends and back-ends using MathML may seem
> like an obvious good idea, and makes nice demos, but is, for any
> serious use, a REALLY BAD IDEA, unless you put all your important
> communication in what amounts to a string inserted in a COMMENT field
> in the MathML.
I think we all agree that any markup in the communication layer is a really
bad idea, that does not allow to loop the output to the input and vice versa.
For example if the used language does not allow the output of
'integrate(sin(x),x);
to be used as the next input, it is obviously the wrong choice.
The second thing we certainly all agree on, are some facts about MathML. It is
a verbose format not meant to be hand written. However, it inherits
considerable advantages from XML to be used in a view (read: not in anything
that has direct contact to the maxima kernel).
- XML is license-free, platform-independent and well-supported way of
structuring data. There are ready to use SAX and DOM classes for almost all
programming languages. Also, there are ready to use views for MathML such as
provided by wxMozilla that is used by wxMaxima.
- XML makes it easy for a computer to generate data, read data, and ensure
that the data structure is unambiguous.
Therefore the whole burden of math display is handed over to dedicated
projects, leaving us with the task to design a well defined communication
layer to the maxima kernel (model) and a mapping from messages of that layer
to mathml (view).
Michael