From 56217f100404bc277c53518436ea93973c7705ac Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Thu, 18 Mar 2010 06:45:56 +0000 Subject: Added --mathml option; removed Text.Pandoc.LaTeXMathML. * Added data/MathMLinHTML.js, which is included when no URL is provided for --mathml. This allows MathML to be displayed in better browsers, as text/html. * The module was no longer necessary; its functionality (two lines) was incorporated into pandoc.hs. * Consolidated the two LaTeXMathML.js files into one. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1909 788f1e2b-df1e-0410-8736-df70ead52e1b --- data/MathMLinHTML.js | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 data/MathMLinHTML.js (limited to 'data/MathMLinHTML.js') diff --git a/data/MathMLinHTML.js b/data/MathMLinHTML.js new file mode 100644 index 000000000..ad718cf7e --- /dev/null +++ b/data/MathMLinHTML.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); +} -- cgit v1.2.3