Maybe some work to make Maxima display much better
Subject: Maybe some work to make Maxima display much better
From: Andrey G. Grozin
Date: Sat, 15 Dec 2001 11:27:28 +0600
Hello *,
On Thu, 13 Dec 2001, Richard Fateman wrote:
> Right now there is a program in maxima called displa which takes any
> maxima expression and produces a 2-dimensional fixed-width character
> display on a page of width $linel or less. This defines the typesetting
> "semantics" in a completely deterministic way. The program can be
> changed to put in variable-width fonts and special characters like
> alpha, with very little work.
There is a *huge* distance from such a simple program to real typesetting.
Have you read The TeXBook carefully? I have. It would take a lot of effort
to implement these algorithms. TeX solves a very complicated nonlinear
optimization problem. Development and fine-tuning of these algorithms took
many "Knuth-years". I doubt if we have another Knuth on this mailing list.
> 1. LaTex cannot do line-breaks as well as the computer program
> that understands math.
I still have to see at least one program which can do line-breaking in
typesetted maths. This is just too complicated problem. TeX cannot say in
advance how much space will be occupied by some formula. Therefore, it has
no possibility to decide if it has to break it or not. Trial-and-error
approach (typeset on one line; if it's too long, break it) is unacceptable
for efficiency reasons.
> 3. Installing LaTex can be tricky. I find it very irritating to
> here from someone "try my free software X" and discover that to
> use it I must first find and download and install Tcl/TK, GCL,MikTeX,
> python, Perl, emacs21, new fonts, etc.
This is because you use Windows. If you just install any recent Linux
distribution, you will have all this stuff, and a lot more. (Well, Emacs
21 is too new to be in a distribution. Just
./configure
make
make install
By the way, I installed GCL 2.4.0 on RedHat 7.0 in exactly this way.
> Does Display GhostScript run everywhere? Is it available in source
> form? Can it be linked to a running Lisp system?
I don't know. Probably, this is too complicated solution. This was my
reply to a very specific question: how to use PostScript for display?
Ordinary PostScript is not well suited for this purpose. It runs the code
for the whole page without displaying anything; the command showpage
displays the page, but then you cannot update it. NeXT has developed some
extensions of PostScript which made it possible for applications to
communicate with their display server (it was not X) in this extended
PostScript language. There is an extension of (the most widely used)
PostScript interpreter GhostScript which implements these display
extensions. It is used in GNUStep, which seeks to emulate NeXTStep on top
of X. I never used GNUStep, and don't know much about it. Maybe, display
extensions are already in the mainstreem GhostScript sources. Newest
versions of GhostScript are available, for free and with sources, from
some company (it used to be Aladdin, but they changed their name). But
they are not free software, there are some restrictions on redistribution.
Older versions are re-licensed under GPL.
Apart from the question how to display PostScript, there is the question
how to generate it. There is a good free program, lout, which translates
its own typesetting language directly into PostScript (not via dvi, like
TeX). It seems to take a little simpler approach than TeX. However, this
is also quite a large program, which was developed for many years.
Best wishes,
Andrey