4 echo "$0: no Maxima input files specified."
8 # First, build up the Maxima batch file
9 rm -f tmp-mathmltest-input.mac
10 echo "load (mathml);" > tmp-mathmltest-input.mac
13 echo "/* $i */" >> tmp-mathmltest-input.mac
14 awk 'BEGIN { count = 0; }
15 { line[count] = $0; count++; }
16 /; *$/ || /\$ *$/ { for (i=0; i < count; i++) print line[i];
17 print "(tmp: %, block ([simp: false], mathml (_, \"tmp-mathmltest-output.xml\")));"
18 print "mathml (tmp, \"tmp-mathmltest-output.xml\");"
22 }' $i >> tmp-mathmltest-input.mac
25 # Now run Maxima over the test file, to produce tmp-mathmltest-output.xml
26 rm -f tmp-mathmltest-output.xml
27 ..
/..
/..
/maxima-local
-b tmp-mathmltest-input.mac
29 # Now insert some paragraph breaks
30 sed 's/<pre>/<p\/><pre>/' tmp-mathmltest-output.xml
> tmp$$
31 sed 's/<math/<p\/><math/' tmp$$
> tmp-mathmltest-output.xml
35 echo "<?xml version=\"1.0\"?>
36 <?xml-stylesheet type=\"text/xsl\" href=\"pmathml.xsl\"?>
37 <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN\"
38 \"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd\"
40 <!ENTITY mathml \"http://www.w3.org/1998/Math/MathML\">
42 <html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">
44 <title>Maxima MathML Output Test Page</title>
47 cat tmp-mathmltest-output.xml
>> tmp$$.xml
48 mv tmp$$.xml tmp-mathmltest-output.xml
51 </html>" >> tmp-mathmltest-output.xml