Martin RUBEY ?????:
> I strongly disagree with the idea not to use TeX and instead produce
> Postscript: This would imply that I would have to retype the whole thing
> to get it properly into my article. I find it easier to adjust output
> rather than to retype it! Furthermore, why do you think it would be easier
> for maxima to do the formatting? After all, quite some years went into the
> TeX development, I would find it rather sad to reinvent the wheel. I do
> not understand why it would be easier for maxima to decide how to break
> lines than for TeX. It is probably that maxima knows better to *rewrite*
> stuff, i.e. write
>
> (a+b+c)/(x+y+z)
>
> instead of
>
> a+b+c
> -----
> x+y+z
>
> but in this case, maxima could just provide both forms and let TeX decide
> which fits nicer on the paper...
>
> Martin
>
I think that key difference between TeX and Maxima is that
TeX in fact know very little (I would say almost nothing)
about mathematical structure of expression it prints.
For TeX equation is just a bunch of math symbols which
TeX arranges on the paper according to some rules.
With TeX you can nicely print any mathematical nonsenses
- unbalanced brackets ([(], wrong operations a+/b etc.
TeX has no notion of mathematical expression -
it is replaced by _formatting_ notions like top/bottom,
upper/lover index etc. This is why it is so hard to write
a good line breaking program for TeX within TeX itself.
And actually I'm pretty sure that it is impossible.
TeX can easily find place where to break line
and it works fine for simple almost structureless object
- ordinary text. But for mathematical expression which has
its own complicated structure TeX don't know whether
linebreak it found make any sense from mathematical point
of view or not (similar problem with ordinary text is
resolved with the help of hyphenation tables).
Needless to say that Maxima knows very
well about mathematical structure of expression
and it has quite good formatter. The only limitation
is that it works with fixed width fonts but I don't
think it is too hard to modify it for variable size fonts
as well. The result may be directly rendered to PostScript
like Richard suggest. I don't quite like the idea
since Post Script is something monolytic - it can't
be modified.
Second approach - to cast resulting expression into TeX
together with line breaking made by Maxima and let TeX
nicely print the expression for us. So Maxima can work
as smart line-breaking preprocessor for TeX.
As far as I understand other CAS with GUI interfaces
(Mathematica, Maple) work precisely in such manner.
CAS makes decision on line breaking and on general
layout of printed expression. For example -
whether some fraction (a+b+...)/(x+y) fits into
one line
(a+b+...)
---------
(x+y)
or must be split across several lines
(a+b+ ....
... +j+k)/(x+y)
Ant then CAS passes the result to real formatter
which draws characters on the screen or paper.
The formatter is something like largely simplified
version of TeX. Simplified since we don't need
all bells and whistles TeX uses to achieve
finest quality of printed material (in particular
math fonts in TeX have a lot of metric characteristics
besides usual width, height and depth).
On computer screen lower quality will do.
--
Vadim V. Zhytnikov
<vvzhy@mail.ru>
<vvzhy@netorn.ru>