login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for MathMLFormat revision 2 of 2

1 2
Editor: page
Time: 2013/03/21 21:26:06 GMT+0
Note:

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
The MathML package

This package is now included in base system.

You can get get MathML in two ways.  One is to example type the command:

(x+y)^2

changed:
-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 2007-02-13).
-
-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/i-output.boot.pamphlet
-
-<a href="i-output.boot.pamphlet.patch">i-output.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
That gets tedious pretty quickly but there is an alternatively way.
For some time mathml is added as a new

changed:
-1. (x+y)**2
-
-2. integrate(x**x,x)
-
-3. integral(x**x,x)
-
-4. (5 + sqrt 63 + sqrt 847)**(1/3)
1. (x+y)^2

2. integrate(x^x,x)

3. integral(x^x,x)

4. (5 + sqrt 63 + sqrt 847)^(1/3)

changed:
-8. matrix $[[$x**i + y**j for i in 1..10$]$ for j in 1..10$]$
8. matrix $[[$x^i + y**j for i in 1..10$]$ for j in 1..10$]$

The MathML package

This package is now included in base system.

You can get get MathML in two ways. One is to 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 but there is an alternatively way. For some time mathml is 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".

serv.c

Makefile

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.

axiom.xml

axiom.php

axiom.js

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