From 17377df48abdf10b6a064d6afdc1a4c95441ae20 Mon Sep 17 00:00:00 2001 From: rootavish Date: Tue, 19 Aug 2014 00:16:41 +0530 Subject: Mathjax Support The Mathjax files will be installed to $(backenddir)/epub/MathJax This was as small as the install got. --- backend/epub/MathJax/extensions/MathML/Makefile.am | 5 +++++ .../epub/MathJax/extensions/MathML/content-mathml.js | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 backend/epub/MathJax/extensions/MathML/Makefile.am create mode 100644 backend/epub/MathJax/extensions/MathML/content-mathml.js (limited to 'backend/epub/MathJax/extensions/MathML') diff --git a/backend/epub/MathJax/extensions/MathML/Makefile.am b/backend/epub/MathJax/extensions/MathML/Makefile.am new file mode 100644 index 00000000..12307fa3 --- /dev/null +++ b/backend/epub/MathJax/extensions/MathML/Makefile.am @@ -0,0 +1,5 @@ +MathJaxExtensionsMathMLdir= $(backenddir)/epub/MathJax/extensions/MathML + +MathJaxExtensionsMathML_DATA= content-mathml.js + +-include $(top_srcdir)/git.mk diff --git a/backend/epub/MathJax/extensions/MathML/content-mathml.js b/backend/epub/MathJax/extensions/MathML/content-mathml.js new file mode 100644 index 00000000..225a8656 --- /dev/null +++ b/backend/epub/MathJax/extensions/MathML/content-mathml.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/MathML/content-mathml.js + * + * Copyright (c) 2009-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 c=MathJax.InputJax.MathML,e=c.Parse.prototype;c.prefilterHooks.Add(function(h){if(!c.ctopXSLT){return}if(!c.ParseXML){c.ParseXML=c.createParser()}var i=c.ParseXML(e.preProcessMath(h.math));var g=c.ctopXSLT.transformToDocument(i);if((typeof g)==="string"){h.math=g}else{if(window.XMLSerializer){var f=new XMLSerializer();h.math=f.serializeToString(g.documentElement,i)}}});var a=' +i+i//eieiE0x.(-1)λ.|iddomaincodomainimageunexpected domainofapplicationrestriction{  if    otherwise/!/maxmin(+)()mod(×)gcdxor¬..,||¯arglcm=><|dddddD,++,divdiv()gradgrad()curl2()||×=limlimtendsto()eloglog,σσ2medianmode()[|][|]()()[m,|m,=;]()det||T,.ZRQNCPeiNaNtruefalseπγ()()||,share)(][}{)(][}{\)(}{><top right;color:;background-color:; 0 decimalpoint decimalpoint.decimalpoint*0.1em0.15em0.2em0.15em 0/)(:=)';var d;if(window.XSLTProcessor){if(!c.ParseXML){c.ParseXML=c.createParser()}c.ctopXSLT=new XSLTProcessor();c.ctopXSLT.importStylesheet(c.ParseXML(a))}else{if(MathJax.Hub.Browser.isMSIE){if(MathJax.Hub.Browser.versionAtLeast("9.0")||(document.documentMode||0)>=9){d=new ActiveXObject("Msxml2.FreeThreadedDOMDocument");d.loadXML(a);var b=new ActiveXObject("Msxml2.XSLTemplate");b.stylesheet=d;c.ctopXSLT={ctop:b.createProcessor(),transformToDocument:function(f){this.ctop.input=f;this.ctop.transform();return this.ctop.output}}}else{d=c.createMSParser();d.async=false;d.loadXML(a);c.ctopXSLT={ctop:d,transformToDocument:function(f){return f.documentElement.transformNode(this.ctop)}}}}else{c.ctopXSLT=null}}MathJax.Hub.Startup.signal.Post("MathML content-mathml Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/MathML/content-mathml.js"); -- cgit v1.2.1