Add some comments on how psi[s](p/q) is computed.
[maxima.git] / share / contrib / lurkmathml / mathmltest
blobce54002494ed99269f39a91c19e4751f98c5f8e9
1 #!/bin/sh
3 if [ $# -lt 1 ]; then
4 echo "$0: no Maxima input files specified."
5 exit 1
6 fi
8 # First, build up the Maxima batch file
9 rm -f tmp-mathmltest-input.mac
10 echo "load (mathml);" > tmp-mathmltest-input.mac
11 for i in $@
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\");"
19 print "tmp;"
20 delete line;
21 count=0;
22 }' $i >> tmp-mathmltest-input.mac
23 done
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
32 rm tmp$$
34 # Make into XHTML
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\">
41 ]>
42 <html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">
43 <head>
44 <title>Maxima MathML Output Test Page</title>
45 </head>
46 <body>" > tmp$$.xml
47 cat tmp-mathmltest-output.xml >> tmp$$.xml
48 mv tmp$$.xml tmp-mathmltest-output.xml
50 echo "</body>
51 </html>" >> tmp-mathmltest-output.xml