From 55c59f0ef598ac36714c66a356e36c4e010cd2cf Mon Sep 17 00:00:00 2001
From: Peter Krautzberger
Date: Wed, 26 Nov 2014 21:41:20 +0100
Subject: [PATCH] created mml3-mml2 extension for #921
---
unpacked/extensions/MathML/mml3-mml2.js | 128 ++++++++++++++++++++++++
1 file changed, 128 insertions(+)
create mode 100644 unpacked/extensions/MathML/mml3-mml2.js
diff --git a/unpacked/extensions/MathML/mml3-mml2.js b/unpacked/extensions/MathML/mml3-mml2.js
new file mode 100644
index 000000000..ec2c41e38
--- /dev/null
+++ b/unpacked/extensions/MathML/mml3-mml2.js
@@ -0,0 +1,128 @@
+/*************************************************************
+ *
+ * MathJax/extensions/MathML/mml3-mml2.js
+ *
+ * This file implements an XSLT transform to convert some MathML 3
+ * constructs to constructs MathJax can render. The transform is
+ * performed in a pre-filter for the MathML input jax, so that the
+ * Show Math As menu will still show the Original MathML correctly,
+ * but the transformed MathML can be obtained from the regular MathML menu.
+ *
+ * To load it, include
+ *
+ * MathML: {
+ * extensions: ["mml3-mml2.js"]
+ * }
+ *
+ * in your configuration.
+ *
+ * A portion of this file is taken from ctop.xsl which is
+ * Copyright (c) David Carlisle 2001, 2002, 2008, 2009, 2013,
+ * and is used by permission of David Carlisle, who has agreed to allow us
+ * to release it under the Apache2 license (see below). That portion is
+ * indicated via comments.
+ *
+ * The remainder falls under the copyright that follows.
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2013-2014 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+MathJax.Extension["MathML/content-mathml"] = {
+ version: "2.4.0"
+};
+
+MathJax.Hub.Register.StartupHook("MathML Jax Ready",function () {
+
+ var MATHML = MathJax.InputJax.MathML,
+ PARSE = MATHML.Parse.prototype;
+
+ MATHML.prefilterHooks.Add(function (data) {
+ if (!MATHML.ctopXSLT) return;
+
+ // Parse the