From 8739dec5222b0dd108a04fd05d11f6a4c781a1b7 Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Wed, 1 Jun 2011 08:13:41 -0400 Subject: [PATCH] add mathml js and template Signed-off-by: Jim Pryor --- mathml.js | 70 +++++++++++++++++++ mathml.tmpl | 197 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 267 insertions(+) create mode 100644 mathml.js create mode 100644 mathml.tmpl diff --git a/mathml.js b/mathml.js new file mode 100644 index 0000000..a72c2e5 --- /dev/null +++ b/mathml.js @@ -0,0 +1,70 @@ +/* +March 19, 2004 MathHTML (c) Peter Jipsen http://www.chapman.edu/~jipsen +Released under the GNU General Public License version 2 or later. +See the GNU General Public License (at http://www.gnu.org/copyleft/gpl.html) +for more details. +*/ + +function convertMath(node) {// for Gecko + if (node.nodeType==1) { + var newnode = + document.createElementNS("http://www.w3.org/1998/Math/MathML", + node.nodeName.toLowerCase()); + for(var i=0; i < node.attributes.length; i++) + newnode.setAttribute(node.attributes[i].nodeName, + node.attributes[i].nodeValue); + for (var i=0; i"); + document.write(""); +} +if(typeof window.addEventListener != 'undefined'){ + window.addEventListener('load', convert, false); +} +if(typeof window.attachEvent != 'undefined') { + window.attachEvent('onload', convert); +} diff --git a/mathml.tmpl b/mathml.tmpl new file mode 100644 index 0000000..cca833d --- /dev/null +++ b/mathml.tmpl @@ -0,0 +1,197 @@ + + + + + + + + + + + + +<TMPL_VAR TITLE> + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ +
+ +
+ + + +
+ + + + +
Comments on this page are closed.
+
+
+
+
+ + + +
+ + + + + + + +
+ +License: +
+
+ +
+Last edited + +
+ + + + + +
+ +
+ + + -- 2.39.5