

last edited 9 years ago by page 
1 2  
Editor: page
Time: 2007/11/12 23:06:26 GMT8 

Note: transferred from axiomdeveloper.org 
changed:  New MathML package <a href="mathml.spad.pamphlet">mathml.spad.pamphlet</a> This package can be use in two ways. Firstly compile from axiom and then get the MathML for output, for example type the command: (x+y)**2 and after that type: coerce(%)\$MMLFORM or to get something that can be pasted directly into an xhtml page and displayed in Firefox type in: display(coerce(%)\$MMLFORM)$MMLFORM That gets tedious pretty quickly so alternatively do the following. Build Axiom with mathml.spad.pamphlet added to src/algebra. For this to work some other files have to be modified. Here are the diff files (based on Gold branch 20070213). file: src/doc/axiom.bib.pamphlet <a href="axiom.bib.pamphlet.patch">axiom.bib.pamphlet.patch</a> file: src/algebra/exposed.lsp.pamphlet <a href="exposed.lsp.pamphlet.patch">exposed.lsp.pamphlet.patch</a> file: src/interp/ioutput.boot.pamphlet <a href="ioutput.boot.pamphlet.patch">ioutput.boot.pamphlet.patch</a> file: src/algebra/Lattice.pamphlet <a href="Lattice.pamphlet.patch">Lattice.pamphlet.patch</a> file: src/algebra/Makefile.pamphlet <a href="Makefile.pamphlet.patch">Makefile.pamphlet.patch</a> file: src/interp/setvars.boot.pamphlet <a href="setvars.boot.pamphlet.patch">setvars.boot.pamphlet.patch</a> file: src/interp/setvart.boot.pamphlet <a href="setvart.boot.pamphlet.patch">setvart.boot.pamphlet.patch</a> So if mathml.spad.pamphlet is added to src/algebra, and the above indicated files are patched, then Axiom should compile with mathml added as a new output option, so issuing the command )set output mathml on will turn on mathml. The output can still be pasted into an xhtml page and viewed in Firefox however I have written a few files to enable automatic viewing in Firefox. The file serv.c is a wrapper for starting and communicating with Axiom. The trivial Makefile is for building an executable "serv". <a href="serv.c">serv.c</a> <a href="Makefile">Makefile</a> In order for this to work you need apache with PHP enabled installed. Put the following 3 files in your server directory and then open axiom.xml with Firefox, e.g. navigate to "127.0.0.1/axiom.xml" if you place the files in the root of your server directory. Axiom commands can then be typed in with the results displayed in Firefox. <a href="axiom.xml">axiom.xml</a> <a href="axiom.php">axiom.php</a> <a href="axiom.js">axiom.js</a> Here is a list of commands that format correctly, also see the pamphlet file. 1. (x+y)**2 2. integrate(x**x,x) 3. integral(x**x,x) 4. (5 + sqrt 63 + sqrt 847)**(1/3) 5. set $[$1,2,3$]$ 6. multiset $[$x rem 5 for x in primes(2,1000)$]$ 7. series(sin(a*x),x=0) 8. matrix $[[$x**i + y**j for i in 1..10$]$ for j in 1..10$]$ 9. y := operator 'y a. D(y(x,z),$[$x,x,z,x$]$) b. D(y x,x,2) 10. x := series 'x a. sin(1+x) 11. series(1/log(y),y=1) 12. y:UTS(FLOAT,'z,0) := exp(z) 13. a. c := continuedFraction(314159/100000) b. c := continuedFraction(314159/100000) JenksSutorInXhtml
New MathML? package
This package can be use in two ways.
Firstly compile from axiom and then get the MathML? for output, for example type the command:
(x+y)**2
and after that type:
coerce(%)$MMLFORM
or to get something that can be pasted directly into an xhtml page and displayed in Firefox type in:
display(coerce(%)$MMLFORM)$MMLFORM
That gets tedious pretty quickly so alternatively do the following.
Build Axiom with mathml.spad.pamphlet added to src/algebra. For this to work some other files have to be modified. Here are the diff files (based on Gold branch 20070213).
file: src/doc/axiom.bib.pamphlet
file: src/algebra/exposed.lsp.pamphlet
file: src/interp/ioutput.boot.pamphlet
file: src/algebra/Lattice.pamphlet
file: src/algebra/Makefile.pamphlet
file: src/interp/setvars.boot.pamphlet
file: src/interp/setvart.boot.pamphlet
So if mathml.spad.pamphlet is added to src/algebra, and the above indicated files are patched, then Axiom should compile with mathml added as a new output option, so issuing the command
)set output mathml on
will turn on mathml.
The output can still be pasted into an xhtml page and viewed in Firefox however I have written a few files to enable automatic viewing in Firefox.
The file serv.c is a wrapper for starting and communicating with Axiom. The trivial Makefile is for building an executable "serv".
In order for this to work you need apache with PHP enabled installed. Put the following 3 files in your server directory and then open axiom.xml with Firefox, e.g. navigate to "127.0.0.1/axiom.xml" if you place the files in the root of your server directory. Axiom commands can then be typed in with the results displayed in Firefox.
Here is a list of commands that format correctly, also see the pamphlet file.
a. D(y(x,z),x,x,z,x)
b. D(y x,x,2)
b. c := continuedFraction(314159/100000)
JenksSutorInXhtml?