(in-package "MAXIMA") ;; MathML-printing ;; Created by David Drysdale (DMD), December 2002/January 2003 ;; ;; closely based on the original TeX conversion code in mactex.lisp, ;; for which the following credits apply: ;; (c) copyright 1987, Richard J. Fateman ;; small corrections and additions: Andrey Grozin, 2001 ;; additional additions: Judah Milgram (JM), September 2001 ;; additional corrections: Barton Willis (BLW), October 2001 ;; Usage: mathml(d8,"/tmp/foo.xml"); mathml(d10,"/tmp/foo.xml"); .. ;; to append lines d8 and d10 to the mathml file. If given only ;; one argument the result goes to standard output. ;; Method: ;; Producing MathML from a macsyma internal expression is done by ;; a reversal of the parsing process. Fundamentally, a ;; traversal of the expression tree is produced by the program, ;; with appropriate substitutions and recognition of the ;; infix / prefix / postfix / matchfix relations on symbols. Various ;; changes are made to this so that MathML will like the results. ;; Instructions: ;; in macsyma, type mathml(); or mathml(