Raymond,

If I understand your email correctly you seem to be proposing a way
to parse (and convert to latex) the OUTPUT of Axiom. There might be
a better way. 

Axiom's architecture is something like

  parse -> execute -> generate lisp data structure -> Charybdis print

Charybdis is a very old lisp to teletype output formatter from the 60s.

What it seems you want to do (and what Ralf might want to consider) is
to grab the lisp s-expression just before it gets handed off to print.
>From that you can do a lot of things such as compute the likely size
of the expression (for line splits) or grab individual terms of a 
polynomial or series.

For example, do

  -> )lisp (trace |recordAndPrint|)
  -> 3*x^2+5

   1> (|recordAndPrint| (1 |x| (2 0 . 3) (0 0 . 5))
        (|Polynomial| (|Integer|)))

        2
  (1) 3x  +5
                                   Type: Polynomial(Integer)

You can look up the internal format of POLY(INT), which is
a list of Terms and, knowing that, process each term. 

Tim



_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
https://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to