There is a package, photot, which addresses "phototypesetting"
in macsyma. This was circa 1980 when users of unix used
troff and eqn to typeset math papers. The same issues occur
in generating TeX, so maybe photot could be helpful. The
code should be around.
Basically the maxima system has to know more than it ordinarily
knows.
It has to know how wide a page you expect to ultimately use
to typeset the expression. It also has to know enough about the
TeX math formatting to figure out the widths of every expression.
(Actually: it needs to completely simulate TeX's layout.)
There is a possibility that output to MathML would provide a
route, because there are expression-breaking programs that do
MathML display, I think. And maybe MathML to TeX.
There are also simulators of TeX in Lisp, one written by
Bill Schelter for Lisp machines (a kind of Texmacs) and one
written by some people in France, I think. (These do not necessarily
address line-breaking).
As an occasional user of the Macsyma to TeX route, I must
admit that the TeX output often needs a little tweaking, not
only for line-breaking, but also for slight rearrangements,
x+y instead of y+x.
It does fine for long polynomials, or other well-structured
forms, but often people care a lot about exp(-x) vs 1/exp(x) vs.
e^(-x) vs. 1/e^x ....
RJF
C Y wrote:
>--- Rex Dieter <rdieter@math.unl.edu> wrote:
>
>
>
>>IMO, packagers shouldn't have to mess with this. Either:
>>
>>1. maximabook.pdf should be pregenerated and either included in the
>>maxima tarball or be provided separately.
>>
>>
>
>I don't think it makes sense to include maximabook with the tarball -
>post 5.9.1 it has been moved to its own module. When I get time I'll
>remove it from the maxima cvs tree. If you want a pdf in there, you
>can use the one currently up on the Docs section of the maxima website.
> Frankly, it's almost too incomplete to be worthy of inclusion at this
>point, but I suppose given the lack of alternatives...
>
>
>
>>or
>>
>>2. maximabook should be rewritten to not depend upon these
>>questionably licensed external (la)tex styles.
>>
>>For now, 1. is the easier route to take.
>>
>>
>
>Indeed. 2 would, as I understand it, either involve implimenting some
>VERY non trivial mathematical knowledge in the latex style files, or
>educating Maxima to output smarter tex within page constraints. The
>latter MIGHT be possible, at least for shorter expressions. Certainly
>the system is capable of fitting ASCII math into a terminal - perhaps
>at some point internally those expressions could be rendered in TeX
>rather than ASCII. I have no idea how hard that would be (perhaps
>Richard might know?)
>
>CY
>
>