Merge branch 'new-features' into merge-features (in preparation for merging with v2.0-candidate), and fix hover zoom trigger when discoverability is disabled
This commit is contained in:
commit
b5d23c72fa
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -262,6 +262,13 @@ MathJax.Hub.Config({
|
|||
//
|
||||
processEnvironments: true,
|
||||
|
||||
//
|
||||
// Controls whether tex2jax processes \ref{...} commands outside
|
||||
// of math mode. Set to "false" to prevent processing of \ref
|
||||
// except within math mode.
|
||||
//
|
||||
processRefs: true,
|
||||
|
||||
//
|
||||
// Controls whether tex2jax inserts MathJax_Preview spans to make a
|
||||
// preview available, and what preview to use, when it locates in-line
|
||||
|
@ -368,7 +375,20 @@ MathJax.Hub.Config({
|
|||
// bold: ['{\\bf #1}', 1]
|
||||
// }
|
||||
//
|
||||
Macros: {}
|
||||
Macros: {},
|
||||
|
||||
//
|
||||
// Equation numbering parameters.
|
||||
//
|
||||
equationNumbers: {
|
||||
// formatNumber: function (n) {return n}, // format for equation number n
|
||||
// formatTag: function (n) {return '('+n+')'}, // format for \tag and \eqref
|
||||
// formatID: function (n) {return 'mjx-eqn-'+n}, // element ID to use for reference
|
||||
// formatURL: function (n) {return '#mjx-eqn-'+escape(n)}, // URL to use for references
|
||||
|
||||
autoNumber: "none" // "AMS" for standard AMS environment numbering,
|
||||
// or "all" to number all displayed equations
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
@ -452,6 +472,42 @@ MathJax.Hub.Config({
|
|||
// if it doesn't contain the needed character), so order these carefully.
|
||||
//
|
||||
undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif",
|
||||
|
||||
//
|
||||
// These settings control automatic line breaking. It is off by
|
||||
// default, so only explicit line breaks are performed (via
|
||||
// linebreak="newline" attributes on <mo> and <mspace> elements). To
|
||||
// perform automatic line breaking on line expressions, set
|
||||
// 'automatic' to 'true' below. The line breaks will be applied via a
|
||||
// penalty-based heuristic, which does well, but isn't perfect. You
|
||||
// might need to use linebreak="goodbreak" or linebreak="badbreak" by
|
||||
// hand in order to get better effects. It is also possible to modify
|
||||
// the penalty values; contact the MathJax user's forum for details.
|
||||
//
|
||||
linebreaks: {
|
||||
|
||||
//
|
||||
// This controls the automatic breaking of expressions:
|
||||
// when false, only process linebreak="newline",
|
||||
// when true, line breaks are inserted automatically in long expressions.
|
||||
//
|
||||
automatic: false,
|
||||
|
||||
//
|
||||
// This controls how wide the lines of mathematics can be
|
||||
//
|
||||
// Use an explicit with like "30em" for a fixed width.
|
||||
// Use "container" to compute size from containing element.
|
||||
// Use "nn% container" for a portion of the container.
|
||||
// Use "nn%" for a portion of the window size.
|
||||
//
|
||||
// The container-based widths may be slower, and may not produce the
|
||||
// expected results if the layout width changes due to the removal
|
||||
// of previews or inclusion of mathematics during typesetting.
|
||||
//
|
||||
width: "container"
|
||||
},
|
||||
|
||||
|
||||
//
|
||||
// This controls whether the MathJax contextual menu will be available
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b="1.1";var c=MathJax.InputJax.TeX;var a=c.Definitions;a.macros.href="HREF_attribute";a.macros["class"]="CLASS_attribute";a.macros.style="STYLE_attribute";a.macros.cssId="ID_attribute";c.Parse.Augment({HREF_attribute:function(f){var e=this.GetArgument(f),d=this.GetArgumentMML(f);this.Push(d.With({href:e}))},CLASS_attribute:function(e){var f=this.GetArgument(e),d=this.GetArgumentMML(e);if(d["class"]!=null){f=d["class"]+" "+f}this.Push(d.With({"class":f}))},STYLE_attribute:function(e){var f=this.GetArgument(e),d=this.GetArgumentMML(e);if(d.style!=null){if(f.charAt(f.length-1)!==";"){f+=";"}f=d.style+" "+f}this.Push(d.With({style:f}))},ID_attribute:function(f){var e=this.GetArgument(f),d=this.GetArgumentMML(f);this.Push(d.With({id:e}))},GetArgumentMML:function(e){var d=this.ParseArg(e);if(d.inferred&&d.data.length==1){d=d.data[0]}else{delete d.inferred}return d}});MathJax.Hub.Startup.signal.Post("TeX HTML Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/HTML.js");
|
||||
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b="1.1.1";var c=MathJax.InputJax.TeX;var a=c.Definitions;a.Add({macros:{href:"HREF_attribute","class":"CLASS_attribute",style:"STYLE_attribute",cssId:"ID_attribute"}});c.Parse.Augment({HREF_attribute:function(f){var e=this.GetArgument(f),d=this.GetArgumentMML(f);this.Push(d.With({href:e}))},CLASS_attribute:function(e){var f=this.GetArgument(e),d=this.GetArgumentMML(e);if(d["class"]!=null){f=d["class"]+" "+f}this.Push(d.With({"class":f}))},STYLE_attribute:function(e){var f=this.GetArgument(e),d=this.GetArgumentMML(e);if(d.style!=null){if(f.charAt(f.length-1)!==";"){f+=";"}f=d.style+" "+f}this.Push(d.With({style:f}))},ID_attribute:function(f){var e=this.GetArgument(f),d=this.GetArgumentMML(f);this.Push(d.With({id:e}))},GetArgumentMML:function(e){var d=this.ParseArg(e);if(d.inferred&&d.data.length==1){d=d.data[0]}else{delete d.inferred}return d}});MathJax.Hub.Startup.signal.Post("TeX HTML Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/HTML.js");
|
||||
|
||||
|
|
16
extensions/TeX/action.js
Normal file
16
extensions/TeX/action.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* /MathJax/extensions/TeX/action.js
|
||||
*
|
||||
* Copyright (c) 2010 Design Science, Inc.
|
||||
*
|
||||
* Part of the MathJax library.
|
||||
* See http://www.mathjax.org for details.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0;
|
||||
* you may not use this file except in compliance with the License.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
MathJax.Extension["TeX/action"]={version:"1.1",};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml;b.Definitions.macros.toggle="Toggle";b.Definitions.macros.mathtip="Mathtip";b.Definitions.macros.texttip=["Macro","\\mathtip{#1}{\\text{#2}}",2];b.Parse.Augment({Toggle:function(d){var e=[],c;while((c=this.GetArgument(d))!=="\\endtoggle"){e.push(b.Parse(c,this.stack.env).mml())}this.Push(a.maction.apply(a,e).With({actiontype:a.ACTIONTYPE.TOGGLE}))},Mathtip:function(d){var c=this.ParseArg(d),e=this.ParseArg(d);this.Push(a.maction(c,e).With({actiontype:a.ACTIONTYPE.TOOLTIP}))}});MathJax.Hub.Startup.signal.Post("TeX action Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/action.js");
|
||||
|
16
extensions/TeX/bbox.js
Normal file
16
extensions/TeX/bbox.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* /MathJax/extensions/TeX/bbox.js
|
||||
*
|
||||
* Copyright (c) 2010 Design Science, Inc.
|
||||
*
|
||||
* Part of the MathJax library.
|
||||
* See http://www.mathjax.org for details.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0;
|
||||
* you may not use this file except in compliance with the License.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
MathJax.Extension["TeX/bbox"]={version:"1.1"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml;b.Definitions.macros.bbox="BBox";b.Parse.Augment({BBox:function(e){var n=this.GetBrackets(e),m=this.ParseArg(e);var j=n.split(/,/),g,d,c;for(var k in j){var f=j[k].replace(/^\s+/,"").replace(/\s+$/,"");var l=f.match(/^(\.\d+|\d+(\.\d*)?)(pt|em|ex|mu|px|in|cm|mm)$/);if(l){var h=l[1]+l[3];if(g){b.Error("Padding specified twice in "+e)}g={height:"+"+h,depth:"+"+h,lspace:h,width:"+"+(2*l[1])+l[3]}}else{if(f.match(/^([a-z0-9]+|\#[0-9a-f]{6}|\#[0-9a-f]{3})$/i)){if(d){b.Error("Background specified twice in "+e)}d=f}else{if(f.match(/^[-a-z]+:/i)){if(c){b.Error("Style specified twice in "+e)}c=f}else{if(f!==""){b.Error("'"+f+"' doesn't look like a color, a padding dimension, or a style")}}}}}if(g){m=a.mpadded(m).With(g)}if(d||c){m=a.mstyle(m).With({mathbackground:d,style:c})}this.Push(m)}});MathJax.Hub.Startup.signal.Post("TeX bbox Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/bbox.js");
|
||||
|
16
extensions/TeX/begingroup.js
Normal file
16
extensions/TeX/begingroup.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* /MathJax/extensions/TeX/begingroup.js
|
||||
*
|
||||
* Copyright (c) 2010 Design Science, Inc.
|
||||
*
|
||||
* Part of the MathJax library.
|
||||
* See http://www.mathjax.org for details.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0;
|
||||
* you may not use this file except in compliance with the License.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var d="1.1.1";var e=MathJax.InputJax.TeX,b=e.Definitions;var a=MathJax.Object.Subclass({macros:null,environments:null,Init:function(f,g){this.macros=(f||{});this.environments=(g||{})},Find:function(f,g){if(this[g][f]){return this[g][f]}},Def:function(f,h,g){this[g][f]=h},Undef:function(f,g){delete this[g][f]},Merge:function(f){MathJax.Hub.Insert(this.macros,f.macros);MathJax.Hub.Insert(this.environments,f.environments)},MergeGlobals:function(f){var g=this.macros;for(var h in g){if(g.hasOwnProperty(h)&&g[h].global){f.Def(h,g[h],"macros",true);delete g[h].global;delete g[h]}}},Clear:function(h){this.environments={};if(h){this.macros={}}else{var f=this.macros;for(var g in f){if(f.hasOwnProperty(g)&&!f[g].global){delete f[g]}}}return this}});var c=e.nsStack=MathJax.Object.Subclass({stack:null,top:0,isEqn:false,Init:function(f){this.isEqn=f;this.stack=[];if(!f){this.Push(a(b.macros,b.environments))}else{this.Push(a())}},Def:function(f,i,g,h){var j=this.top-1;if(h){while(j>0){this.stack[j].Undef(f,g);j--}if(!(i instanceof Array)){i=[i]}if(this.isEqn){i.global=true}}this.stack[j].Def(f,i,g)},Push:function(f){this.stack.push(f);this.top=this.stack.length},Pop:function(){var f;if(this.top>1){f=this.stack[--this.top];if(this.isEqn){this.stack.pop()}}else{if(this.isEqn){this.Clear()}}return f},Find:function(f,h){for(var g=this.top-1;g>=0;g--){var j=this.stack[g].Find(f,h);if(j){return j}}return null},Merge:function(f){f.stack[0].MergeGlobals(this);this.stack[this.top-1].Merge(f.stack[0]);var g=[this.top,this.stack.length-this.top].concat(f.stack.slice(1));this.stack.splice.apply(this.stack,g);this.top=this.stack.length},Reset:function(){this.top=this.stack.length},Clear:function(f){this.stack=[this.stack[0].Clear()];this.top=this.stack.length}},{nsFrame:a});b.macros.begingroup="BeginGroup";b.macros.endgroup="EndGroup";b.macros.global=["Extension","newcommand"];b.macros.gdef=["Extension","newcommand"];e.Parse.Augment({BeginGroup:function(f){e.eqnStack.Push(a())},EndGroup:function(f){if(e.eqnStack.top>1){e.eqnStack.Pop()}else{if(e.rootStack.top===1){e.Error("Extra "+f+" or missing \\begingroup")}else{e.eqnStack.Clear();e.rootStack.Pop()}}},csFindMacro:function(f){return(e.eqnStack.Find(f,"macros")||e.rootStack.Find(f,"macros"))},envFindName:function(f){return(e.eqnStack.Find(f,"environments")||e.rootStack.Find(f,"environments"))}});e.rootStack=c();e.eqnStack=c(true);e.prefilterHooks.Add(function(){e.rootStack.Reset();e.eqnStack.Clear(true)});e.postfilterHooks.Add(function(){e.rootStack.Merge(e.eqnStack)});MathJax.Hub.Register.StartupHook("TeX newcommand Ready",function(){b.macros.global="Global";b.macros.gdef=["Macro","\\global\\def"];e.Parse.Augment({setDef:function(f,g){g.isUser=true;e.eqnStack.Def(f,g,"macros",this.stack.env.isGlobal);delete this.stack.env.isGlobal},setEnv:function(f,g){g.isUser=true;e.eqnStack.Def(f,g,"environments")},Global:function(f){var g=this.i;var h=this.GetCSname(f);this.i=g;if(h!=="let"&&h!=="def"&&h!=="newcommand"){e.Error(f+" not followed by \\let, \\def, or \\newcommand")}this.stack.env.isGlobal=true}})});MathJax.Hub.Startup.signal.Post("TeX begingroup Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/begingroup.js");
|
||||
|
16
extensions/TeX/color.js
Normal file
16
extensions/TeX/color.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* /MathJax/extensions/TeX/color.js
|
||||
*
|
||||
* Copyright (c) 2010 Design Science, Inc.
|
||||
*
|
||||
* Part of the MathJax library.
|
||||
* See http://www.mathjax.org for details.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0;
|
||||
* you may not use this file except in compliance with the License.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
MathJax.Extension["TeX/color"]={version:"1.1",config:MathJax.Hub.CombineConfig("TeX.color",{padding:"5px",border:"2px"}),colors:{Apricot:"#FBB982",Aquamarine:"#00B5BE",Bittersweet:"#C04F17",Black:"#221E1F",Blue:"#2D2F92",BlueGreen:"#00B3B8",BlueViolet:"#473992",BrickRed:"#B6321C",Brown:"#792500",BurntOrange:"#F7921D",CadetBlue:"#74729A",CarnationPink:"#F282B4",Cerulean:"#00A2E3",CornflowerBlue:"#41B0E4",Cyan:"#00AEEF",Dandelion:"#FDBC42",DarkOrchid:"#A4538A",Emerald:"#00A99D",ForestGreen:"#009B55",Fuchsia:"#8C368C",Goldenrod:"#FFDF42",Gray:"#949698",Green:"#00A64F",GreenYellow:"#DFE674",JungleGreen:"#00A99A",Lavender:"#F49EC4",LimeGreen:"#8DC73E",Magenta:"#EC008C",Mahogany:"#A9341F",Maroon:"#AF3235",Melon:"#F89E7B",MidnightBlue:"#006795",Mulberry:"#A93C93",NavyBlue:"#006EB8",OliveGreen:"#3C8031",Orange:"#F58137",OrangeRed:"#ED135A",Orchid:"#AF72B0",Peach:"#F7965A",Periwinkle:"#7977B8",PineGreen:"#008B72",Plum:"#92268F",ProcessBlue:"#00B0F0",Purple:"#99479B",RawSienna:"#974006",Red:"#ED1B23",RedOrange:"#F26035",RedViolet:"#A1246B",Rhodamine:"#EF559F",RoyalBlue:"#0071BC",RoyalPurple:"#613F99",RubineRed:"#ED017D",Salmon:"#F69289",SeaGreen:"#3FBC9D",Sepia:"#671800",SkyBlue:"#46C5DD",SpringGreen:"#C6DC67",Tan:"#DA9D76",TealBlue:"#00AEB3",Thistle:"#D883B7",Turquoise:"#00B4CE",Violet:"#58429B",VioletRed:"#EF58A0",White:"#FFFFFF",WildStrawberry:"#EE2967",Yellow:"#FFF200",YellowGreen:"#98CC70",YellowOrange:"#FAA21A"},getColor:function(a,c){if(!a){a="named"}var b=this["get_"+a];if(!b){this.TEX.Error("Color model '"+a+"' not defined")}return b.call(this,c)},get_rgb:function(b){b=b.split(/,/);var a="#";if(b.length!==3){this.TEX.Error("RGB colors require 3 decimal numbers")}for(var c=0;c<3;c++){if(!b[c].match(/^(\d+(\.\d*)?|\.\d+)$/)){this.TEX.Error("Invalid decimal number")}var d=parseFloat(b[c]);if(d<0||d>1){this.TEX.Error("RGB values must be between 0 and 1")}d=Math.floor(d*255).toString(16);if(d.length<2){d="0"+d}a+=d}return a},get_gray:function(a){if(!a.match(/^(\d+(\.\d*)?|\.\d+)$/)){this.TEX.Error("Invalid decimal number")}var b=parseFloat(a);if(b<0||b>1){this.TEX.Error("Grey-scale values must be between 0 and 1")}b=Math.floor(b*255).toString(16);if(b.length<2){b="0"+b}return"#"+b+b+b},get_named:function(a){if(this.colors[a]){return this.colors[a]}return a},padding:function(){var c="+"+this.config.padding;var a=this.config.padding.replace(/^.*?([a-z]*)$/,"$1");var b="+"+(2*parseFloat(c))+a;return{width:b,height:c,depth:c,lspace:this.config.padding}}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var d=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml;var c=d.Stack.Item;var b=MathJax.Extension["TeX/color"];b.TEX=d;d.Definitions.macros.definecolor="DefineColor";d.Definitions.macros.colorbox="ColorBox";d.Definitions.macros.fcolorbox="fColorBox";d.Parse.Augment({Color:function(h){var g=this.GetBrackets(h),e=this.GetArgument(h);e=b.getColor(g,e);var f=c.style().With({styles:{mathcolor:e}});this.stack.env.color=e;this.Push(f)},DefineColor:function(g){var f=this.GetArgument(g),e=this.GetArgument(g),h=this.GetArgument(g);b.colors[f]=b.getColor(e,h)},ColorBox:function(g){var f=this.GetArgument(g),e=this.InternalMath(this.GetArgument(g));this.Push(a.mpadded.apply(a,e).With({mathbackground:b.getColor("named",f)}).With(b.padding()))},fColorBox:function(g){var h=this.GetArgument(g),f=this.GetArgument(g),e=this.InternalMath(this.GetArgument(g));this.Push(a.mpadded.apply(a,e).With({mathbackground:b.getColor("named",f),style:"border: "+b.config.border+" solid "+b.getColor("named",h)}).With(b.padding()))}});MathJax.Hub.Startup.signal.Post("TeX color Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/color.js");
|
||||
|
16
extensions/TeX/extpfeil.js
Normal file
16
extensions/TeX/extpfeil.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* /MathJax/extensions/TeX/extpfeil.js
|
||||
*
|
||||
* Copyright (c) 2010 Design Science, Inc.
|
||||
*
|
||||
* Part of the MathJax library.
|
||||
* See http://www.mathjax.org for details.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0;
|
||||
* you may not use this file except in compliance with the License.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b="1.1";var c=MathJax.InputJax.TeX,a=c.Definitions;MathJax.Hub.Insert(a,{macros:{xtwoheadrightarrow:["Extension","AMSmath"],xtwoheadleftarrow:["Extension","AMSmath"],xmapsto:["Extension","AMSmath"],xlongequal:["Extension","AMSmath"],xtofrom:["Extension","AMSmath"],Newextarrow:["Extension","AMSmath"]}});MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function(){MathJax.Hub.Insert(a,{macros:{xtwoheadrightarrow:["xArrow",8608,12,16],xtwoheadleftarrow:["xArrow",8606,17,13],xmapsto:["xArrow",8614,6,7],xlongequal:["xArrow",61,7,7],xtofrom:["xArrow",8644,12,12],Newextarrow:"NewExtArrow"}})});c.Parse.Augment({NewExtArrow:function(d){var f=this.GetArgument(d),g=this.GetArgument(d),e=this.GetArgument(d);if(!f.match(/^\\([a-z]+|.)$/i)){c.Error("First argument to "+d+" must be a control sequence name")}if(!g.match(/^(\d+),(\d+)$/)){c.Error("Second argument to "+d+" must be two integers separated by a comma")}if(!e.match(/^(\d+|0x[0-9A-F]+)$/i)){c.Error("Third argument to "+d+" must be a unicode character number")}f=f.substr(1);g=g.split(",");e=parseInt(e);a.macros[f]=["xArrow",e,parseInt(g[0]),parseInt(g[1])]}});MathJax.Hub.Startup.signal.Post("TeX extpfeil Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/extpfeil.js");
|
||||
|
16
extensions/TeX/mhchem.js
Normal file
16
extensions/TeX/mhchem.js
Normal file
File diff suppressed because one or more lines are too long
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b="1.1";var c=MathJax.InputJax.TeX;var a=c.Definitions;MathJax.Hub.Insert(a,{macros:{newcommand:"NewCommand",renewcommand:"NewCommand",newenvironment:"NewEnvironment",def:"MacroDef"}});c.Parse.Augment({NewCommand:function(d){var e=this.trimSpaces(this.GetArgument(d)),g=this.trimSpaces(this.GetBrackets(d)),f=this.GetArgument(d);if(g===""){g=null}if(e.charAt(0)==="\\"){e=e.substr(1)}if(!e.match(/^(.|[a-z]+)$/i)){c.Error("Illegal control sequence name for "+d)}if(g!=null&&!g.match(/^[0-9]+$/)){c.Error("Illegal number of parameters specified in "+d)}a.macros[e]=["Macro",f,g]},NewEnvironment:function(e){var f=this.trimSpaces(this.GetArgument(e)),h=this.trimSpaces(this.GetBrackets(e)),g=this.GetArgument(e),d=this.GetArgument(e);if(h===""){h=null}if(h!=null&&!h.match(/^[0-9]+$/)){c.Error("Illegal number of parameters specified in "+e)}a.environment[f]=["BeginEnv","EndEnv",g,d,h]},MacroDef:function(d){var e=this.GetCSname(d),g=this.GetTemplate(d,"\\"+e),f=this.GetArgument(d);if(!(g instanceof Array)){a.macros[e]=["Macro",f,g]}else{a.macros[e]=["MacroWithTemplate",f,g[0],g[1]]}},GetCSname:function(e){var f=this.GetNext();if(f!=="\\"){c.Error("\\ must be followed by a control sequence")}var d=this.trimSpaces(this.GetArgument(e));return d.substr(1)},GetTemplate:function(f,e){var j,g=[],h=0;j=this.GetNext();var d=this.i;while(this.i<this.string.length){j=this.GetNext();if(j==="#"){if(d!==this.i){g[h]=this.string.substr(d,this.i-d)}j=this.string.charAt(++this.i);if(!j.match(/^[1-9]$/)){c.Error("Illegal use of # in template for "+e)}if(parseInt(j)!=++h){c.Error("Parameters for "+e+" must be numbered sequentially")}d=this.i+1}else{if(j==="{"){if(d!==this.i){g[h]=this.string.substr(d,this.i-d)}if(g.length>0){return[h,g]}else{return h}}}this.i++}c.Error("Missing replacement string for definition of "+f)},MacroWithTemplate:function(e,h,j,g){if(j){var d=[];this.GetNext();if(g[0]&&!this.MatchParam(g[0])){c.Error("Use of "+e+" doesn't match its definition")}for(var f=0;f<j;f++){d.push(this.GetParameter(e,g[f+1]))}h=this.SubstituteArgs(d,h)}this.string=this.AddArgs(h,this.string.slice(this.i));this.i=0;if(++this.macroCount>c.config.MAXMACROS){c.Error("MathJax maximum macro substitution count exceeded; is there a recursive macro call?")}},BeginEnv:function(g,j,d,h){if(h){var e=[];for(var f=0;f<h;f++){e.push(this.GetArgument("\\begin{"+name+"}"))}j=this.SubstituteArgs(e,j);d=this.SubstituteArgs(e,d)}g.edef=d;this.string=this.AddArgs(j,this.string.slice(this.i));this.i=0;return g},EndEnv:function(d,e){this.string=this.AddArgs(d.edef,this.string.slice(this.i));this.i=0;return e},GetParameter:function(e,h){if(h==null){return this.GetArgument(e)}var g=this.i,d=0,f=0;while(this.i<this.string.length){if(this.string.charAt(this.i)==="{"){if(this.i===g){f=1}this.GetArgument(e);d=this.i-g}else{if(this.MatchParam(h)){if(f){g++;d-=2}return this.string.substr(g,d)}else{this.i++;d++;f=0}}}c.Error("Runaway argument for "+e+"?")},MatchParam:function(d){if(this.string.substr(this.i,d.length)!==d){return 0}this.i+=d.length;return 1}});c.Environment=function(d){a.environment[d]=["BeginEnv","EndEnv"].concat([].slice.call(arguments,1))};MathJax.Hub.Startup.signal.Post("TeX newcommand Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/newcommand.js");
|
||||
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b="1.1.2";var c=MathJax.InputJax.TeX;var a=c.Definitions;a.Add({macros:{newcommand:"NewCommand",renewcommand:"NewCommand",newenvironment:"NewEnvironment",renewenvironment:"NewEnvironment",def:"MacroDef",let:"Let"}},null,true);c.Parse.Augment({NewCommand:function(d){var e=this.trimSpaces(this.GetArgument(d)),g=this.trimSpaces(this.GetBrackets(d)),f=this.GetArgument(d);if(g===""){g=null}if(e.charAt(0)==="\\"){e=e.substr(1)}if(!e.match(/^(.|[a-z]+)$/i)){c.Error("Illegal control sequence name for "+d)}if(g!=null&&!g.match(/^[0-9]+$/)){c.Error("Illegal number of parameters specified in "+d)}this.setDef(e,["Macro",f,g])},NewEnvironment:function(e){var f=this.trimSpaces(this.GetArgument(e)),h=this.trimSpaces(this.GetBrackets(e)),g=this.GetArgument(e),d=this.GetArgument(e);if(h===""){h=null}if(h!=null&&!h.match(/^[0-9]+$/)){c.Error("Illegal number of parameters specified in "+e)}this.setEnv(f,["BeginEnv","EndEnv",g,d,h])},MacroDef:function(d){var e=this.GetCSname(d),g=this.GetTemplate(d,"\\"+e),f=this.GetArgument(d);if(!(g instanceof Array)){this.setDef(e,["Macro",f,g])}else{this.setDef(e,["MacroWithTemplate",f].concat(g))}},Let:function(d){var e=this.GetCSname(d),f;var g=this.GetNext();if(g==="="){this.i++;g=this.GetNext()}if(g==="\\"){d=this.GetCSname(d);f=this.csFindMacro(d);if(!f){if(a.mathchar0mi[d]){f=["csMathchar0mi",a.mathchar0mi[d]]}else{if(a.mathchar0mo[d]){f=["csMathchar0mo",a.mathchar0mo[d]]}else{if(a.mathchar7[d]){f=["csMathchar7",a.mathchar7[d]]}else{if(a.delimiter["\\"+d]!=null){f=["csDelimiter",a.delimiter["\\"+d]]}}}}}}else{f=["Macro",g];this.i++}this.setDef(e,f)},setDef:function(d,e){e.isUser=true;a.macros[d]=e},setEnv:function(d,e){e.isUser=true;a.environment[d]=e},GetCSname:function(e){var f=this.GetNext();if(f!=="\\"){c.Error("\\ must be followed by a control sequence")}var d=this.trimSpaces(this.GetArgument(e));return d.substr(1)},GetTemplate:function(f,e){var j,g=[],h=0;j=this.GetNext();var d=this.i;while(this.i<this.string.length){j=this.GetNext();if(j==="#"){if(d!==this.i){g[h]=this.string.substr(d,this.i-d)}j=this.string.charAt(++this.i);if(!j.match(/^[1-9]$/)){c.Error("Illegal use of # in template for "+e)}if(parseInt(j)!=++h){c.Error("Parameters for "+e+" must be numbered sequentially")}d=this.i+1}else{if(j==="{"){if(d!==this.i){g[h]=this.string.substr(d,this.i-d)}if(g.length>0){return[h,g]}else{return h}}}this.i++}c.Error("Missing replacement string for definition of "+f)},MacroWithTemplate:function(e,h,j,g){if(j){var d=[];this.GetNext();if(g[0]&&!this.MatchParam(g[0])){c.Error("Use of "+e+" doesn't match its definition")}for(var f=0;f<j;f++){d.push(this.GetParameter(e,g[f+1]))}h=this.SubstituteArgs(d,h)}this.string=this.AddArgs(h,this.string.slice(this.i));this.i=0;if(++this.macroCount>c.config.MAXMACROS){c.Error("MathJax maximum macro substitution count exceeded; is there a recursive macro call?")}},BeginEnv:function(g,j,d,h){if(h){var e=[];for(var f=0;f<h;f++){e.push(this.GetArgument("\\begin{"+name+"}"))}j=this.SubstituteArgs(e,j);d=this.SubstituteArgs(e,d)}g.edef=d;this.string=this.AddArgs(j,this.string.slice(this.i));this.i=0;return g},EndEnv:function(d,e){this.string=this.AddArgs(d.edef,this.string.slice(this.i));this.i=0;return e},GetParameter:function(e,h){if(h==null){return this.GetArgument(e)}var g=this.i,d=0,f=0;while(this.i<this.string.length){if(this.string.charAt(this.i)==="{"){if(this.i===g){f=1}this.GetArgument(e);d=this.i-g}else{if(this.MatchParam(h)){if(f){g++;d-=2}return this.string.substr(g,d)}else{this.i++;d++;f=0}}}c.Error("Runaway argument for "+e+"?")},MatchParam:function(d){if(this.string.substr(this.i,d.length)!==d){return 0}this.i+=d.length;return 1}});c.Environment=function(d){a.environment[d]=["BeginEnv","EndEnv"].concat([].slice.call(arguments,1));a.environment[d].isUser=true};MathJax.Hub.Startup.signal.Post("TeX newcommand Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/newcommand.js");
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u219A":c.REL,"\u219B":c.REL,"\u219C":c.WIDEREL,"\u219D":c.WIDEREL,"\u219E":c.WIDEREL,"\u219F":c.WIDEREL,"\u21A0":c.WIDEREL,"\u21A1":c.WIDEREL,"\u21A2":c.WIDEREL,"\u21A3":c.WIDEREL,"\u21A4":c.WIDEREL,"\u21A5":c.WIDEREL,"\u21A7":c.WIDEREL,"\u21A8":c.WIDEREL,"\u21AB":c.WIDEREL,"\u21AC":c.WIDEREL,"\u21AD":c.WIDEREL,"\u21AE":c.REL,"\u21AF":c.WIDEREL,"\u21B0":c.WIDEREL,"\u21B1":c.WIDEREL,"\u21B2":c.WIDEREL,"\u21B3":c.WIDEREL,"\u21B4":c.WIDEREL,"\u21B5":c.WIDEREL,"\u21B6":c.REL,"\u21B7":c.REL,"\u21B8":c.REL,"\u21B9":c.WIDEREL,"\u21BA":c.REL,"\u21BB":c.REL,"\u21BE":c.WIDEREL,"\u21BF":c.WIDEREL,"\u21C2":c.WIDEREL,"\u21C3":c.WIDEREL,"\u21C4":c.WIDEREL,"\u21C5":c.WIDEREL,"\u21C6":c.WIDEREL,"\u21C7":c.WIDEREL,"\u21C8":c.WIDEREL,"\u21C9":c.WIDEREL,"\u21CA":c.WIDEREL,"\u21CB":c.WIDEREL,"\u21CD":c.REL,"\u21CE":c.REL,"\u21CF":c.REL,"\u21D6":c.WIDEREL,"\u21D7":c.WIDEREL,"\u21D8":c.WIDEREL,"\u21D9":c.WIDEREL,"\u21DA":c.WIDEREL,"\u21DB":c.WIDEREL,"\u21DC":c.WIDEREL,"\u21DD":c.WIDEREL,"\u21DE":c.REL,"\u21DF":c.REL,"\u21E0":c.WIDEREL,"\u21E1":c.WIDEREL,"\u21E2":c.WIDEREL,"\u21E3":c.WIDEREL,"\u21E4":c.WIDEREL,"\u21E5":c.WIDEREL,"\u21E6":c.WIDEREL,"\u21E7":c.WIDEREL,"\u21E8":c.WIDEREL,"\u21E9":c.WIDEREL,"\u21EA":c.WIDEREL,"\u21EB":c.WIDEREL,"\u21EC":c.WIDEREL,"\u21ED":c.WIDEREL,"\u21EE":c.WIDEREL,"\u21EF":c.WIDEREL,"\u21F0":c.WIDEREL,"\u21F1":c.REL,"\u21F2":c.REL,"\u21F3":c.WIDEREL,"\u21F4":c.REL,"\u21F5":c.WIDEREL,"\u21F6":c.WIDEREL,"\u21F7":c.REL,"\u21F8":c.REL,"\u21F9":c.REL,"\u21FA":c.REL,"\u21FB":c.REL,"\u21FC":c.REL,"\u21FD":c.WIDEREL,"\u21FE":c.WIDEREL,"\u21FF":c.WIDEREL}}});MathJax.Ajax.loadComplete(a.optableDir+"/Arrows.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u219A":c.RELACCENT,"\u219B":c.RELACCENT,"\u219C":c.WIDEREL,"\u219D":c.WIDEREL,"\u219E":c.WIDEREL,"\u219F":c.WIDEREL,"\u21A0":c.WIDEREL,"\u21A1":c.RELSTRETCH,"\u21A2":c.WIDEREL,"\u21A3":c.WIDEREL,"\u21A4":c.WIDEREL,"\u21A5":c.RELSTRETCH,"\u21A7":c.RELSTRETCH,"\u21A8":c.RELSTRETCH,"\u21AB":c.WIDEREL,"\u21AC":c.WIDEREL,"\u21AD":c.WIDEREL,"\u21AE":c.RELACCENT,"\u21AF":c.RELSTRETCH,"\u21B0":c.RELSTRETCH,"\u21B1":c.RELSTRETCH,"\u21B2":c.RELSTRETCH,"\u21B3":c.RELSTRETCH,"\u21B4":c.RELSTRETCH,"\u21B5":c.RELSTRETCH,"\u21B6":c.RELACCENT,"\u21B7":c.RELACCENT,"\u21B8":c.REL,"\u21B9":c.WIDEREL,"\u21BA":c.REL,"\u21BB":c.REL,"\u21BE":c.RELSTRETCH,"\u21BF":c.RELSTRETCH,"\u21C2":c.RELSTRETCH,"\u21C3":c.RELSTRETCH,"\u21C4":c.WIDEREL,"\u21C5":c.RELSTRETCH,"\u21C6":c.WIDEREL,"\u21C7":c.WIDEREL,"\u21C8":c.RELSTRETCH,"\u21C9":c.WIDEREL,"\u21CA":c.RELSTRETCH,"\u21CB":c.WIDEREL,"\u21CD":c.RELACCENT,"\u21CE":c.RELACCENT,"\u21CF":c.RELACCENT,"\u21D6":c.RELSTRETCH,"\u21D7":c.RELSTRETCH,"\u21D8":c.RELSTRETCH,"\u21D9":c.RELSTRETCH,"\u21DA":c.WIDEREL,"\u21DB":c.WIDEREL,"\u21DC":c.WIDEREL,"\u21DD":c.WIDEREL,"\u21DE":c.REL,"\u21DF":c.REL,"\u21E0":c.WIDEREL,"\u21E1":c.RELSTRETCH,"\u21E2":c.WIDEREL,"\u21E3":c.RELSTRETCH,"\u21E4":c.WIDEREL,"\u21E5":c.WIDEREL,"\u21E6":c.WIDEREL,"\u21E7":c.RELSTRETCH,"\u21E8":c.WIDEREL,"\u21E9":c.RELSTRETCH,"\u21EA":c.RELSTRETCH,"\u21EB":c.RELSTRETCH,"\u21EC":c.RELSTRETCH,"\u21ED":c.RELSTRETCH,"\u21EE":c.RELSTRETCH,"\u21EF":c.RELSTRETCH,"\u21F0":c.WIDEREL,"\u21F1":c.REL,"\u21F2":c.REL,"\u21F3":c.RELSTRETCH,"\u21F4":c.RELACCENT,"\u21F5":c.RELSTRETCH,"\u21F6":c.WIDEREL,"\u21F7":c.RELACCENT,"\u21F8":c.RELACCENT,"\u21F9":c.RELACCENT,"\u21FA":c.RELACCENT,"\u21FB":c.RELACCENT,"\u21FC":c.RELACCENT,"\u21FD":c.WIDEREL,"\u21FE":c.WIDEREL,"\u21FF":c.WIDEREL}}});MathJax.Ajax.loadComplete(a.optableDir+"/Arrows.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"!!":[1,0,b.BIN],"'":c.ACCENT,"++":[0,0,b.BIN],"--":[0,0,b.BIN],"..":[0,0,b.BIN],"...":c.ORD},infix:{"!=":c.BIN4,"&&":c.BIN4,"**":[1,1,b.BIN],"*=":c.BIN4,"+=":c.BIN4,"-=":c.BIN4,"->":c.BIN4,"//":c.BIN4,"/=":c.BIN4,":=":c.BIN4,"<=":c.BIN4,"<>":[1,1,b.BIN],"==":c.BIN4,">=":c.BIN4,"@":c.ORD11,"||":c.BIN3}}});MathJax.Ajax.loadComplete(a.optableDir+"/BasicLatin.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"||":[0,0,b.BIN,{fence:true,stretchy:true,symmetric:true}],"|||":[0,0,b.ORD,{fence:true,stretchy:true,symmetric:true}]},postfix:{"!!":[1,0,b.BIN],"'":c.ACCENT,"++":[0,0,b.BIN],"--":[0,0,b.BIN],"..":[0,0,b.BIN],"...":c.ORD,"||":[0,0,b.BIN,{fence:true,stretchy:true,symmetric:true}],"|||":[0,0,b.ORD,{fence:true,stretchy:true,symmetric:true}]},infix:{"!=":c.BIN4,"&&":c.BIN4,"**":[1,1,b.BIN],"*=":c.BIN4,"+=":c.BIN4,"-=":c.BIN4,"->":c.BIN5,"//":[1,1,b.BIN],"/=":c.BIN4,":=":c.BIN4,"<=":c.BIN5,"<>":[1,1,b.BIN],"==":c.BIN4,">=":c.BIN5,"@":c.ORD11,"||":[2,2,b.BIN,{fence:true,stretchy:true,symmetric:true}],"|||":[2,2,b.ORD,{fence:true,stretchy:true,symmetric:true}]}}});MathJax.Ajax.loadComplete(a.optableDir+"/BasicLatin.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u20DB":c.ACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/CombDiactForSymbols.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u20DB":c.ACCENT,"\u20DC":c.ACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/CombDiactForSymbols.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u2713":c.WIDEACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/Dingbats.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2772":c.OPEN},postfix:{"\u2773":c.CLOSE}}});MathJax.Ajax.loadComplete(a.optableDir+"/Dingbats.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2018":[0,0,b.OPEN,{fence:true}],"\u201C":[0,0,b.OPEN,{fence:true}]},postfix:{"\u2019":[0,0,b.CLOSE,{fence:true}],"\u201D":[0,0,b.CLOSE,{fence:true}]}}});MathJax.Ajax.loadComplete(a.optableDir+"/GeneralPunctuation.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2016":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2018":[0,0,b.OPEN,{fence:true}],"\u201C":[0,0,b.OPEN,{fence:true}]},postfix:{"\u2016":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2019":[0,0,b.CLOSE,{fence:true}],"\u201D":[0,0,b.CLOSE,{fence:true}]}}});MathJax.Ajax.loadComplete(a.optableDir+"/GeneralPunctuation.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u03C3":c.ORD11}}});MathJax.Ajax.loadComplete(a.optableDir+"/GreekAndCoptic.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u03F6":c.REL}}});MathJax.Ajax.loadComplete(a.optableDir+"/GreekAndCoptic.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2145":c.ORD21,"\u2146":[2,0,b.ORD],"\u2147":c.ORD,"\u2148":c.ORD,"\u2149":c.ORD}}});MathJax.Ajax.loadComplete(a.optableDir+"/LetterlikeSymbols.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2145":c.ORD21,"\u2146":[2,0,b.ORD]}}});MathJax.Ajax.loadComplete(a.optableDir+"/LetterlikeSymbols.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2204":c.ORD21,"\u221B":c.ORD11,"\u221C":c.ORD11,"\u2221":c.ORD,"\u2222":c.ORD,"\u222C":c.INTEGRAL,"\u222D":c.INTEGRAL,"\u222F":c.INTEGRAL,"\u2230":c.INTEGRAL,"\u2231":c.INTEGRAL,"\u2232":c.INTEGRAL,"\u2233":c.INTEGRAL},infix:{"\u2201":[1,2,b.ORD],"\u2206":c.BIN3,"\u220A":c.REL,"\u220C":c.REL,"\u220D":c.REL,"\u220E":c.BIN3,"\u2214":c.BIN4,"\u221F":c.REL,"\u2224":c.REL,"\u2226":c.REL,"\u2234":c.REL,"\u2235":c.REL,"\u2236":c.REL,"\u2237":c.REL,"\u2238":c.BIN4,"\u2239":c.REL,"\u223A":c.BIN4,"\u223B":c.REL,"\u223D":c.REL,"\u223D\u0331":c.BIN3,"\u223E":c.REL,"\u223F":c.BIN3,"\u2241":c.REL,"\u2242":c.REL,"\u2242\u0338":c.BIN4,"\u2244":c.REL,"\u2246":c.REL,"\u2247":c.REL,"\u2249":c.REL,"\u224A":c.REL,"\u224B":c.REL,"\u224C":c.REL,"\u224E":c.REL,"\u224E\u0338":c.BIN4,"\u224F":c.REL,"\u224F\u0338":c.BIN4,"\u2251":c.REL,"\u2252":c.REL,"\u2253":c.REL,"\u2254":c.REL,"\u2255":c.REL,"\u2256":c.REL,"\u2257":c.REL,"\u2258":c.REL,"\u2259":c.REL,"\u225A":c.REL,"\u225C":c.REL,"\u225D":c.REL,"\u225E":c.REL,"\u225F":c.REL,"\u2262":c.REL,"\u2263":c.REL,"\u2266":c.REL,"\u2266\u0338":c.BIN4,"\u2267":c.REL,"\u2268":c.REL,"\u2269":c.REL,"\u226A\u0338":c.BIN4,"\u226B\u0338":c.BIN4,"\u226C":c.REL,"\u226D":c.REL,"\u226E":c.REL,"\u226F":c.REL,"\u2270":c.REL,"\u2271":c.REL,"\u2272":c.REL,"\u2273":c.REL,"\u2274":c.REL,"\u2275":c.REL,"\u2276":c.REL,"\u2277":c.REL,"\u2278":c.REL,"\u2279":c.REL,"\u227C":c.REL,"\u227D":c.REL,"\u227E":c.REL,"\u227F":c.REL,"\u227F\u0338":c.BIN4,"\u2280":c.REL,"\u2281":c.REL,"\u2282\u20D2":c.BIN4,"\u2283\u20D2":c.BIN4,"\u2284":c.REL,"\u2285":c.REL,"\u2288":c.REL,"\u2289":c.REL,"\u228A":c.REL,"\u228B":c.REL,"\u228C":c.BIN4,"\u228D":c.BIN4,"\u228F":c.REL,"\u228F\u0338":c.BIN4,"\u2290":c.REL,"\u2290\u0338":c.BIN4,"\u229A":c.BIN4,"\u229B":c.BIN4,"\u229C":c.BIN4,"\u229D":c.BIN4,"\u229E":c.BIN4,"\u229F":c.BIN4,"\u22A0":c.BIN4,"\u22A1":c.BIN4,"\u22A6":c.REL,"\u22A7":c.REL,"\u22A9":c.REL,"\u22AA":c.REL,"\u22AB":c.REL,"\u22AC":c.REL,"\u22AD":c.REL,"\u22AE":c.REL,"\u22AF":c.REL,"\u22B0":c.REL,"\u22B1":c.REL,"\u22B2":c.REL,"\u22B3":c.REL,"\u22B4":c.REL,"\u22B5":c.REL,"\u22B6":c.REL,"\u22B7":c.REL,"\u22B8":c.REL,"\u22B9":c.REL,"\u22BA":c.BIN4,"\u22BB":c.BIN4,"\u22BC":c.BIN4,"\u22BD":c.BIN4,"\u22BE":c.BIN3,"\u22BF":c.BIN3,"\u22C7":c.BIN4,"\u22C9":c.BIN4,"\u22CA":c.BIN4,"\u22CB":c.BIN4,"\u22CC":c.BIN4,"\u22CD":c.REL,"\u22CE":c.BIN4,"\u22CF":c.BIN4,"\u22D0":c.REL,"\u22D1":c.REL,"\u22D2":c.BIN4,"\u22D3":c.BIN4,"\u22D4":c.REL,"\u22D5":c.REL,"\u22D6":c.REL,"\u22D7":c.REL,"\u22D8":c.REL,"\u22D9":c.REL,"\u22DA":c.REL,"\u22DB":c.REL,"\u22DC":c.REL,"\u22DD":c.REL,"\u22DE":c.REL,"\u22DF":c.REL,"\u22E0":c.REL,"\u22E1":c.REL,"\u22E2":c.REL,"\u22E3":c.REL,"\u22E4":c.REL,"\u22E5":c.REL,"\u22E6":c.REL,"\u22E7":c.REL,"\u22E8":c.REL,"\u22E9":c.REL,"\u22EA":c.REL,"\u22EB":c.REL,"\u22EC":c.REL,"\u22ED":c.REL,"\u22F0":c.REL,"\u22F2":c.REL,"\u22F3":c.REL,"\u22F4":c.REL,"\u22F5":c.REL,"\u22F6":c.REL,"\u22F7":c.REL,"\u22F8":c.REL,"\u22F9":c.REL,"\u22FA":c.REL,"\u22FB":c.REL,"\u22FC":c.REL,"\u22FD":c.REL,"\u22FE":c.REL,"\u22FF":c.REL}}});MathJax.Ajax.loadComplete(a.optableDir+"/MathOperators.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2204":c.ORD21,"\u221B":c.ORD11,"\u221C":c.ORD11,"\u2221":c.ORD,"\u2222":c.ORD,"\u222C":c.INTEGRAL,"\u222D":c.INTEGRAL,"\u222F":c.INTEGRAL,"\u2230":c.INTEGRAL,"\u2231":c.INTEGRAL,"\u2232":c.INTEGRAL,"\u2233":c.INTEGRAL},infix:{"\u2201":[1,2,b.ORD],"\u2206":c.BIN3,"\u220A":c.REL,"\u220C":c.REL,"\u220D":c.REL,"\u220E":c.BIN3,"\u2214":c.BIN4,"\u221F":c.REL,"\u2224":c.REL,"\u2226":c.REL,"\u2234":c.REL,"\u2235":c.REL,"\u2236":c.REL,"\u2237":c.REL,"\u2238":c.BIN4,"\u2239":c.REL,"\u223A":c.BIN4,"\u223B":c.REL,"\u223D":c.REL,"\u223D\u0331":c.BIN3,"\u223E":c.REL,"\u223F":c.BIN3,"\u2241":c.REL,"\u2242":c.REL,"\u2242\u0338":c.REL,"\u2244":c.REL,"\u2246":c.REL,"\u2247":c.REL,"\u2249":c.REL,"\u224A":c.REL,"\u224B":c.REL,"\u224C":c.REL,"\u224E":c.REL,"\u224E\u0338":c.REL,"\u224F":c.REL,"\u224F\u0338":c.REL,"\u2251":c.REL,"\u2252":c.REL,"\u2253":c.REL,"\u2254":c.REL,"\u2255":c.REL,"\u2256":c.REL,"\u2257":c.REL,"\u2258":c.REL,"\u2259":c.REL,"\u225A":c.REL,"\u225C":c.REL,"\u225D":c.REL,"\u225E":c.REL,"\u225F":c.REL,"\u2262":c.REL,"\u2263":c.REL,"\u2266":c.REL,"\u2266\u0338":c.REL,"\u2267":c.REL,"\u2268":c.REL,"\u2269":c.REL,"\u226A\u0338":c.REL,"\u226B\u0338":c.REL,"\u226C":c.REL,"\u226D":c.REL,"\u226E":c.REL,"\u226F":c.REL,"\u2270":c.REL,"\u2271":c.REL,"\u2272":c.REL,"\u2273":c.REL,"\u2274":c.REL,"\u2275":c.REL,"\u2276":c.REL,"\u2277":c.REL,"\u2278":c.REL,"\u2279":c.REL,"\u227C":c.REL,"\u227D":c.REL,"\u227E":c.REL,"\u227F":c.REL,"\u227F\u0338":c.REL,"\u2280":c.REL,"\u2281":c.REL,"\u2282\u20D2":c.REL,"\u2283\u20D2":c.REL,"\u2284":c.REL,"\u2285":c.REL,"\u2288":c.REL,"\u2289":c.REL,"\u228A":c.REL,"\u228B":c.REL,"\u228C":c.BIN4,"\u228D":c.BIN4,"\u228F":c.REL,"\u228F\u0338":c.REL,"\u2290":c.REL,"\u2290\u0338":c.REL,"\u229A":c.BIN4,"\u229B":c.BIN4,"\u229C":c.BIN4,"\u229D":c.BIN4,"\u229E":c.BIN4,"\u229F":c.BIN4,"\u22A0":c.BIN4,"\u22A1":c.BIN4,"\u22A6":c.REL,"\u22A7":c.REL,"\u22A9":c.REL,"\u22AA":c.REL,"\u22AB":c.REL,"\u22AC":c.REL,"\u22AD":c.REL,"\u22AE":c.REL,"\u22AF":c.REL,"\u22B0":c.REL,"\u22B1":c.REL,"\u22B2":c.REL,"\u22B3":c.REL,"\u22B4":c.REL,"\u22B5":c.REL,"\u22B6":c.REL,"\u22B7":c.REL,"\u22B8":c.REL,"\u22B9":c.REL,"\u22BA":c.BIN4,"\u22BB":c.BIN4,"\u22BC":c.BIN4,"\u22BD":c.BIN4,"\u22BE":c.BIN3,"\u22BF":c.BIN3,"\u22C7":c.BIN4,"\u22C9":c.BIN4,"\u22CA":c.BIN4,"\u22CB":c.BIN4,"\u22CC":c.BIN4,"\u22CD":c.REL,"\u22CE":c.BIN4,"\u22CF":c.BIN4,"\u22D0":c.REL,"\u22D1":c.REL,"\u22D2":c.BIN4,"\u22D3":c.BIN4,"\u22D4":c.REL,"\u22D5":c.REL,"\u22D6":c.REL,"\u22D7":c.REL,"\u22D8":c.REL,"\u22D9":c.REL,"\u22DA":c.REL,"\u22DB":c.REL,"\u22DC":c.REL,"\u22DD":c.REL,"\u22DE":c.REL,"\u22DF":c.REL,"\u22E0":c.REL,"\u22E1":c.REL,"\u22E2":c.REL,"\u22E3":c.REL,"\u22E4":c.REL,"\u22E5":c.REL,"\u22E6":c.REL,"\u22E7":c.REL,"\u22E8":c.REL,"\u22E9":c.REL,"\u22EA":c.REL,"\u22EB":c.REL,"\u22EC":c.REL,"\u22ED":c.REL,"\u22F0":c.REL,"\u22F2":c.REL,"\u22F3":c.REL,"\u22F4":c.REL,"\u22F5":c.REL,"\u22F6":c.REL,"\u22F7":c.REL,"\u22F8":c.REL,"\u22F9":c.REL,"\u22FA":c.REL,"\u22FB":c.REL,"\u22FC":c.REL,"\u22FD":c.REL,"\u22FE":c.REL,"\u22FF":c.REL}}});MathJax.Ajax.loadComplete(a.optableDir+"/MathOperators.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u27E6":c.OPEN},postfix:{"\u27E7":c.CLOSE}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscMathSymbolsA.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u27E6":c.OPEN,"\u27EA":c.OPEN,"\u27EC":c.OPEN},postfix:{"\u27E7":c.CLOSE,"\u27EB":c.CLOSE,"\u27ED":c.CLOSE}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscMathSymbolsA.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2983":c.OPEN,"\u2985":c.OPEN,"\u2987":c.OPEN,"\u2989":c.OPEN,"\u298B":c.OPEN,"\u298D":c.OPEN,"\u298F":c.OPEN,"\u2991":c.OPEN,"\u2993":c.OPEN,"\u2995":c.OPEN,"\u2997":c.OPEN,"\u29FC":c.OPEN},postfix:{"\u2984":c.CLOSE,"\u2986":c.CLOSE,"\u2988":c.CLOSE,"\u298A":c.CLOSE,"\u298C":c.CLOSE,"\u298E":c.CLOSE,"\u2990":c.CLOSE,"\u2992":c.CLOSE,"\u2994":c.CLOSE,"\u2996":c.CLOSE,"\u2998":c.CLOSE,"\u29FD":c.CLOSE},infix:{"\u2980":c.ORD,"\u2981":c.BIN3,"\u2982":c.BIN3,"\u2999":c.BIN3,"\u299A":c.BIN3,"\u299B":c.BIN3,"\u299C":c.BIN3,"\u299D":c.BIN3,"\u299E":c.BIN3,"\u299F":c.BIN3,"\u29A0":c.BIN3,"\u29A1":c.BIN3,"\u29A2":c.BIN3,"\u29A3":c.BIN3,"\u29A4":c.BIN3,"\u29A5":c.BIN3,"\u29A6":c.BIN3,"\u29A7":c.BIN3,"\u29A8":c.BIN3,"\u29A9":c.BIN3,"\u29AA":c.BIN3,"\u29AB":c.BIN3,"\u29AC":c.BIN3,"\u29AD":c.BIN3,"\u29AE":c.BIN3,"\u29AF":c.BIN3,"\u29B0":c.BIN3,"\u29B1":c.BIN3,"\u29B2":c.BIN3,"\u29B3":c.BIN3,"\u29B4":c.BIN3,"\u29B5":c.BIN3,"\u29B6":c.BIN4,"\u29B7":c.BIN4,"\u29B8":c.BIN4,"\u29B9":c.BIN4,"\u29BA":c.BIN4,"\u29BB":c.BIN4,"\u29BC":c.BIN4,"\u29BD":c.BIN4,"\u29BE":c.BIN4,"\u29BF":c.BIN4,"\u29C0":c.REL,"\u29C1":c.REL,"\u29C2":c.BIN3,"\u29C3":c.BIN3,"\u29C4":c.BIN4,"\u29C5":c.BIN4,"\u29C6":c.BIN4,"\u29C7":c.BIN4,"\u29C8":c.BIN4,"\u29C9":c.BIN3,"\u29CA":c.BIN3,"\u29CB":c.BIN3,"\u29CC":c.BIN3,"\u29CD":c.BIN3,"\u29CE":c.REL,"\u29CF":c.REL,"\u29CF\u0338":c.BIN4,"\u29D0":c.REL,"\u29D0\u0338":c.BIN4,"\u29D1":c.REL,"\u29D2":c.REL,"\u29D3":c.REL,"\u29D4":c.REL,"\u29D5":c.REL,"\u29D6":c.BIN4,"\u29D7":c.BIN4,"\u29D8":c.BIN3,"\u29D9":c.BIN3,"\u29DB":c.BIN3,"\u29DC":c.BIN3,"\u29DD":c.BIN3,"\u29DE":c.REL,"\u29DF":c.BIN3,"\u29E0":c.BIN3,"\u29E1":c.REL,"\u29E2":c.BIN4,"\u29E3":c.REL,"\u29E4":c.REL,"\u29E5":c.REL,"\u29E6":c.REL,"\u29E7":c.BIN3,"\u29E8":c.BIN3,"\u29E9":c.BIN3,"\u29EA":c.BIN3,"\u29EB":c.BIN3,"\u29EC":c.BIN3,"\u29ED":c.BIN3,"\u29EE":c.BIN3,"\u29EF":c.BIN3,"\u29F0":c.BIN3,"\u29F1":c.BIN3,"\u29F2":c.BIN3,"\u29F3":c.BIN3,"\u29F4":c.REL,"\u29F5":c.BIN4,"\u29F6":c.BIN4,"\u29F7":c.BIN4,"\u29F8":c.BIN3,"\u29F9":c.BIN3,"\u29FA":c.BIN3,"\u29FB":c.BIN3,"\u29FE":c.BIN4,"\u29FF":c.BIN4}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscMathSymbolsB.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2980":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2983":c.OPEN,"\u2985":c.OPEN,"\u2987":c.OPEN,"\u2989":c.OPEN,"\u298B":c.OPEN,"\u298D":c.OPEN,"\u298F":c.OPEN,"\u2991":c.OPEN,"\u2993":c.OPEN,"\u2995":c.OPEN,"\u2997":c.OPEN,"\u29FC":c.OPEN},postfix:{"\u2980":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2984":c.CLOSE,"\u2986":c.CLOSE,"\u2988":c.CLOSE,"\u298A":c.CLOSE,"\u298C":c.CLOSE,"\u298E":c.CLOSE,"\u2990":c.CLOSE,"\u2992":c.CLOSE,"\u2994":c.CLOSE,"\u2996":c.CLOSE,"\u2998":c.CLOSE,"\u29FD":c.CLOSE},infix:{"\u2981":c.BIN3,"\u2982":c.BIN3,"\u2999":c.BIN3,"\u299A":c.BIN3,"\u299B":c.BIN3,"\u299C":c.BIN3,"\u299D":c.BIN3,"\u299E":c.BIN3,"\u299F":c.BIN3,"\u29A0":c.BIN3,"\u29A1":c.BIN3,"\u29A2":c.BIN3,"\u29A3":c.BIN3,"\u29A4":c.BIN3,"\u29A5":c.BIN3,"\u29A6":c.BIN3,"\u29A7":c.BIN3,"\u29A8":c.BIN3,"\u29A9":c.BIN3,"\u29AA":c.BIN3,"\u29AB":c.BIN3,"\u29AC":c.BIN3,"\u29AD":c.BIN3,"\u29AE":c.BIN3,"\u29AF":c.BIN3,"\u29B0":c.BIN3,"\u29B1":c.BIN3,"\u29B2":c.BIN3,"\u29B3":c.BIN3,"\u29B4":c.BIN3,"\u29B5":c.BIN3,"\u29B6":c.BIN4,"\u29B7":c.BIN4,"\u29B8":c.BIN4,"\u29B9":c.BIN4,"\u29BA":c.BIN4,"\u29BB":c.BIN4,"\u29BC":c.BIN4,"\u29BD":c.BIN4,"\u29BE":c.BIN4,"\u29BF":c.BIN4,"\u29C0":c.REL,"\u29C1":c.REL,"\u29C2":c.BIN3,"\u29C3":c.BIN3,"\u29C4":c.BIN4,"\u29C5":c.BIN4,"\u29C6":c.BIN4,"\u29C7":c.BIN4,"\u29C8":c.BIN4,"\u29C9":c.BIN3,"\u29CA":c.BIN3,"\u29CB":c.BIN3,"\u29CC":c.BIN3,"\u29CD":c.BIN3,"\u29CE":c.REL,"\u29CF":c.REL,"\u29CF\u0338":c.REL,"\u29D0":c.REL,"\u29D0\u0338":c.REL,"\u29D1":c.REL,"\u29D2":c.REL,"\u29D3":c.REL,"\u29D4":c.REL,"\u29D5":c.REL,"\u29D6":c.BIN4,"\u29D7":c.BIN4,"\u29D8":c.BIN3,"\u29D9":c.BIN3,"\u29DB":c.BIN3,"\u29DC":c.BIN3,"\u29DD":c.BIN3,"\u29DE":c.REL,"\u29DF":c.BIN3,"\u29E0":c.BIN3,"\u29E1":c.REL,"\u29E2":c.BIN4,"\u29E3":c.REL,"\u29E4":c.REL,"\u29E5":c.REL,"\u29E6":c.REL,"\u29E7":c.BIN3,"\u29E8":c.BIN3,"\u29E9":c.BIN3,"\u29EA":c.BIN3,"\u29EB":c.BIN3,"\u29EC":c.BIN3,"\u29ED":c.BIN3,"\u29EE":c.BIN3,"\u29EF":c.BIN3,"\u29F0":c.BIN3,"\u29F1":c.BIN3,"\u29F2":c.BIN3,"\u29F3":c.BIN3,"\u29F4":c.REL,"\u29F5":c.BIN4,"\u29F6":c.BIN4,"\u29F7":c.BIN4,"\u29F8":c.BIN3,"\u29F9":c.BIN3,"\u29FA":c.BIN3,"\u29FB":c.BIN3,"\u29FE":c.BIN4,"\u29FF":c.BIN4}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscMathSymbolsB.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
16
jax/element/mml/optable/MiscSymbolsAndArrows.js
Normal file
16
jax/element/mml/optable/MiscSymbolsAndArrows.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* /MathJax/jax/element/mml/optable/MiscSymbolsAndArrows.js
|
||||
*
|
||||
* Copyright (c) 2010 Design Science, Inc.
|
||||
*
|
||||
* Part of the MathJax library.
|
||||
* See http://www.mathjax.org for details.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0;
|
||||
* you may not use this file except in compliance with the License.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u2B45":c.RELSTRETCH,"\u2B46":c.RELSTRETCH}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscSymbolsAndArrows.js")})(MathJax.ElementJax.mml);
|
||||
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u23B4":c.WIDEACCENT,"\u23B5":c.WIDEACCENT,"\u23DC":c.WIDEACCENT,"\u23DD":c.WIDEACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscTechnical.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u23B4":c.WIDEACCENT,"\u23B5":c.WIDEACCENT,"\u23DC":c.WIDEACCENT,"\u23DD":c.WIDEACCENT,"\u23E0":c.WIDEACCENT,"\u23E1":c.WIDEACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscTechnical.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u02DA":c.ACCENT,"\u02DD":c.ACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/SpacingModLetters.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u02CD":c.WIDEACCENT,"\u02DA":c.ACCENT,"\u02DD":c.ACCENT,"\u02F7":c.WIDEACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/SpacingModLetters.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2A03":c.OP,"\u2A05":c.OP,"\u2A07":c.OP,"\u2A08":c.OP,"\u2A09":c.OP,"\u2A0A":c.OP,"\u2A0B":c.INTEGRAL2,"\u2A0C":c.INTEGRAL,"\u2A0D":c.INTEGRAL2,"\u2A0E":c.INTEGRAL2,"\u2A0F":c.INTEGRAL2,"\u2A10":c.OP,"\u2A11":c.OP,"\u2A12":c.OP,"\u2A13":c.OP,"\u2A14":c.OP,"\u2A15":c.INTEGRAL2,"\u2A16":c.INTEGRAL2,"\u2A17":c.INTEGRAL2,"\u2A18":c.INTEGRAL2,"\u2A19":c.INTEGRAL2,"\u2A1A":c.INTEGRAL2,"\u2A1B":c.INTEGRAL2,"\u2A1C":c.INTEGRAL2,"\u2AFC":c.OP,"\u2AFF":c.OP},infix:{"\u2A1D":c.BIN3,"\u2A1E":c.BIN3,"\u2A1F":c.BIN3,"\u2A20":c.BIN3,"\u2A21":c.BIN3,"\u2A22":c.BIN4,"\u2A23":c.BIN4,"\u2A24":c.BIN4,"\u2A25":c.BIN4,"\u2A26":c.BIN4,"\u2A27":c.BIN4,"\u2A28":c.BIN4,"\u2A29":c.BIN4,"\u2A2A":c.BIN4,"\u2A2B":c.BIN4,"\u2A2C":c.BIN4,"\u2A2D":c.BIN4,"\u2A2E":c.BIN4,"\u2A30":c.BIN4,"\u2A31":c.BIN4,"\u2A32":c.BIN4,"\u2A33":c.BIN4,"\u2A34":c.BIN4,"\u2A35":c.BIN4,"\u2A36":c.BIN4,"\u2A37":c.BIN4,"\u2A38":c.BIN4,"\u2A39":c.BIN4,"\u2A3A":c.BIN4,"\u2A3B":c.BIN4,"\u2A3C":c.BIN4,"\u2A3D":c.BIN4,"\u2A3E":c.BIN4,"\u2A40":c.BIN4,"\u2A41":c.BIN4,"\u2A42":c.BIN4,"\u2A43":c.BIN4,"\u2A44":c.BIN4,"\u2A45":c.BIN4,"\u2A46":c.BIN4,"\u2A47":c.BIN4,"\u2A48":c.BIN4,"\u2A49":c.BIN4,"\u2A4A":c.BIN4,"\u2A4B":c.BIN4,"\u2A4C":c.BIN4,"\u2A4D":c.BIN4,"\u2A4E":c.BIN4,"\u2A4F":c.BIN4,"\u2A50":c.BIN4,"\u2A51":c.BIN4,"\u2A52":c.BIN4,"\u2A53":c.BIN4,"\u2A54":c.BIN4,"\u2A55":c.BIN4,"\u2A56":c.BIN4,"\u2A57":c.BIN4,"\u2A58":c.BIN4,"\u2A59":c.REL,"\u2A5A":c.BIN4,"\u2A5B":c.BIN4,"\u2A5C":c.BIN4,"\u2A5D":c.BIN4,"\u2A5E":c.BIN4,"\u2A5F":c.BIN4,"\u2A60":c.BIN4,"\u2A61":c.BIN4,"\u2A62":c.BIN4,"\u2A63":c.BIN4,"\u2A64":c.BIN4,"\u2A65":c.BIN4,"\u2A66":c.REL,"\u2A67":c.REL,"\u2A68":c.REL,"\u2A69":c.REL,"\u2A6A":c.REL,"\u2A6B":c.REL,"\u2A6C":c.REL,"\u2A6D":c.REL,"\u2A6E":c.REL,"\u2A6F":c.REL,"\u2A70":c.REL,"\u2A71":c.BIN4,"\u2A72":c.BIN4,"\u2A73":c.REL,"\u2A74":c.REL,"\u2A75":c.REL,"\u2A76":c.REL,"\u2A77":c.REL,"\u2A78":c.REL,"\u2A79":c.REL,"\u2A7A":c.REL,"\u2A7B":c.REL,"\u2A7C":c.REL,"\u2A7D":c.REL,"\u2A7D\u0338":c.BIN4,"\u2A7E":c.REL,"\u2A7E\u0338":c.BIN4,"\u2A7F":c.REL,"\u2A80":c.REL,"\u2A81":c.REL,"\u2A82":c.REL,"\u2A83":c.REL,"\u2A84":c.REL,"\u2A85":c.REL,"\u2A86":c.REL,"\u2A87":c.REL,"\u2A88":c.REL,"\u2A89":c.REL,"\u2A8A":c.REL,"\u2A8B":c.REL,"\u2A8C":c.REL,"\u2A8D":c.REL,"\u2A8E":c.REL,"\u2A8F":c.REL,"\u2A90":c.REL,"\u2A91":c.REL,"\u2A92":c.REL,"\u2A93":c.REL,"\u2A94":c.REL,"\u2A95":c.REL,"\u2A96":c.REL,"\u2A97":c.REL,"\u2A98":c.REL,"\u2A99":c.REL,"\u2A9A":c.REL,"\u2A9B":c.REL,"\u2A9C":c.REL,"\u2A9D":c.REL,"\u2A9E":c.REL,"\u2A9F":c.REL,"\u2AA0":c.REL,"\u2AA1":c.REL,"\u2AA1\u0338":c.BIN4,"\u2AA2":c.REL,"\u2AA2\u0338":c.BIN4,"\u2AA3":c.REL,"\u2AA4":c.REL,"\u2AA5":c.REL,"\u2AA6":c.REL,"\u2AA7":c.REL,"\u2AA8":c.REL,"\u2AA9":c.REL,"\u2AAA":c.REL,"\u2AAB":c.REL,"\u2AAC":c.REL,"\u2AAD":c.REL,"\u2AAE":c.REL,"\u2AAF\u0338":c.BIN4,"\u2AB0\u0338":c.BIN4,"\u2AB1":c.REL,"\u2AB2":c.REL,"\u2AB3":c.REL,"\u2AB4":c.REL,"\u2AB5":c.REL,"\u2AB6":c.REL,"\u2AB7":c.REL,"\u2AB8":c.REL,"\u2AB9":c.REL,"\u2ABA":c.REL,"\u2ABB":c.REL,"\u2ABC":c.REL,"\u2ABD":c.REL,"\u2ABE":c.REL,"\u2ABF":c.REL,"\u2AC0":c.REL,"\u2AC1":c.REL,"\u2AC2":c.REL,"\u2AC3":c.REL,"\u2AC4":c.REL,"\u2AC5":c.REL,"\u2AC6":c.REL,"\u2AC7":c.REL,"\u2AC8":c.REL,"\u2AC9":c.REL,"\u2ACA":c.REL,"\u2ACB":c.REL,"\u2ACC":c.REL,"\u2ACD":c.REL,"\u2ACE":c.REL,"\u2ACF":c.REL,"\u2AD0":c.REL,"\u2AD1":c.REL,"\u2AD2":c.REL,"\u2AD3":c.REL,"\u2AD4":c.REL,"\u2AD5":c.REL,"\u2AD6":c.REL,"\u2AD7":c.REL,"\u2AD8":c.REL,"\u2AD9":c.REL,"\u2ADA":c.REL,"\u2ADB":c.REL,"\u2ADC":c.REL,"\u2ADD":c.REL,"\u2ADE":c.REL,"\u2ADF":c.REL,"\u2AE0":c.REL,"\u2AE1":c.REL,"\u2AE2":c.REL,"\u2AE3":c.REL,"\u2AE4":c.REL,"\u2AE5":c.REL,"\u2AE6":c.REL,"\u2AE7":c.REL,"\u2AE8":c.REL,"\u2AE9":c.REL,"\u2AEA":c.REL,"\u2AEB":c.REL,"\u2AEC":c.REL,"\u2AED":c.REL,"\u2AEE":c.REL,"\u2AEF":c.REL,"\u2AF0":c.REL,"\u2AF1":c.REL,"\u2AF2":c.REL,"\u2AF3":c.REL,"\u2AF4":c.BIN4,"\u2AF5":c.BIN4,"\u2AF6":c.BIN4,"\u2AF7":c.REL,"\u2AF8":c.REL,"\u2AF9":c.REL,"\u2AFA":c.REL,"\u2AFB":c.BIN4,"\u2AFD":c.BIN4,"\u2AFE":c.BIN3}}});MathJax.Ajax.loadComplete(a.optableDir+"/SuppMathOperators.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2A03":c.OP,"\u2A05":c.OP,"\u2A07":c.OP,"\u2A08":c.OP,"\u2A09":c.OP,"\u2A0A":c.OP,"\u2A0B":c.INTEGRAL2,"\u2A0C":c.INTEGRAL,"\u2A0D":c.INTEGRAL2,"\u2A0E":c.INTEGRAL2,"\u2A0F":c.INTEGRAL2,"\u2A10":c.OP,"\u2A11":c.OP,"\u2A12":c.OP,"\u2A13":c.OP,"\u2A14":c.OP,"\u2A15":c.INTEGRAL2,"\u2A16":c.INTEGRAL2,"\u2A17":c.INTEGRAL2,"\u2A18":c.INTEGRAL2,"\u2A19":c.INTEGRAL2,"\u2A1A":c.INTEGRAL2,"\u2A1B":c.INTEGRAL2,"\u2A1C":c.INTEGRAL2,"\u2AFC":c.OP,"\u2AFF":c.OP},infix:{"\u2A1D":c.BIN3,"\u2A1E":c.BIN3,"\u2A1F":c.BIN3,"\u2A20":c.BIN3,"\u2A21":c.BIN3,"\u2A22":c.BIN4,"\u2A23":c.BIN4,"\u2A24":c.BIN4,"\u2A25":c.BIN4,"\u2A26":c.BIN4,"\u2A27":c.BIN4,"\u2A28":c.BIN4,"\u2A29":c.BIN4,"\u2A2A":c.BIN4,"\u2A2B":c.BIN4,"\u2A2C":c.BIN4,"\u2A2D":c.BIN4,"\u2A2E":c.BIN4,"\u2A30":c.BIN4,"\u2A31":c.BIN4,"\u2A32":c.BIN4,"\u2A33":c.BIN4,"\u2A34":c.BIN4,"\u2A35":c.BIN4,"\u2A36":c.BIN4,"\u2A37":c.BIN4,"\u2A38":c.BIN4,"\u2A39":c.BIN4,"\u2A3A":c.BIN4,"\u2A3B":c.BIN4,"\u2A3C":c.BIN4,"\u2A3D":c.BIN4,"\u2A3E":c.BIN4,"\u2A40":c.BIN4,"\u2A41":c.BIN4,"\u2A42":c.BIN4,"\u2A43":c.BIN4,"\u2A44":c.BIN4,"\u2A45":c.BIN4,"\u2A46":c.BIN4,"\u2A47":c.BIN4,"\u2A48":c.BIN4,"\u2A49":c.BIN4,"\u2A4A":c.BIN4,"\u2A4B":c.BIN4,"\u2A4C":c.BIN4,"\u2A4D":c.BIN4,"\u2A4E":c.BIN4,"\u2A4F":c.BIN4,"\u2A50":c.BIN4,"\u2A51":c.BIN4,"\u2A52":c.BIN4,"\u2A53":c.BIN4,"\u2A54":c.BIN4,"\u2A55":c.BIN4,"\u2A56":c.BIN4,"\u2A57":c.BIN4,"\u2A58":c.BIN4,"\u2A59":c.REL,"\u2A5A":c.BIN4,"\u2A5B":c.BIN4,"\u2A5C":c.BIN4,"\u2A5D":c.BIN4,"\u2A5E":c.BIN4,"\u2A5F":c.BIN4,"\u2A60":c.BIN4,"\u2A61":c.BIN4,"\u2A62":c.BIN4,"\u2A63":c.BIN4,"\u2A64":c.BIN4,"\u2A65":c.BIN4,"\u2A66":c.REL,"\u2A67":c.REL,"\u2A68":c.REL,"\u2A69":c.REL,"\u2A6A":c.REL,"\u2A6B":c.REL,"\u2A6C":c.REL,"\u2A6D":c.REL,"\u2A6E":c.REL,"\u2A6F":c.REL,"\u2A70":c.REL,"\u2A71":c.BIN4,"\u2A72":c.BIN4,"\u2A73":c.REL,"\u2A74":c.REL,"\u2A75":c.REL,"\u2A76":c.REL,"\u2A77":c.REL,"\u2A78":c.REL,"\u2A79":c.REL,"\u2A7A":c.REL,"\u2A7B":c.REL,"\u2A7C":c.REL,"\u2A7D":c.REL,"\u2A7D\u0338":c.REL,"\u2A7E":c.REL,"\u2A7E\u0338":c.REL,"\u2A7F":c.REL,"\u2A80":c.REL,"\u2A81":c.REL,"\u2A82":c.REL,"\u2A83":c.REL,"\u2A84":c.REL,"\u2A85":c.REL,"\u2A86":c.REL,"\u2A87":c.REL,"\u2A88":c.REL,"\u2A89":c.REL,"\u2A8A":c.REL,"\u2A8B":c.REL,"\u2A8C":c.REL,"\u2A8D":c.REL,"\u2A8E":c.REL,"\u2A8F":c.REL,"\u2A90":c.REL,"\u2A91":c.REL,"\u2A92":c.REL,"\u2A93":c.REL,"\u2A94":c.REL,"\u2A95":c.REL,"\u2A96":c.REL,"\u2A97":c.REL,"\u2A98":c.REL,"\u2A99":c.REL,"\u2A9A":c.REL,"\u2A9B":c.REL,"\u2A9C":c.REL,"\u2A9D":c.REL,"\u2A9E":c.REL,"\u2A9F":c.REL,"\u2AA0":c.REL,"\u2AA1":c.REL,"\u2AA1\u0338":c.REL,"\u2AA2":c.REL,"\u2AA2\u0338":c.REL,"\u2AA3":c.REL,"\u2AA4":c.REL,"\u2AA5":c.REL,"\u2AA6":c.REL,"\u2AA7":c.REL,"\u2AA8":c.REL,"\u2AA9":c.REL,"\u2AAA":c.REL,"\u2AAB":c.REL,"\u2AAC":c.REL,"\u2AAD":c.REL,"\u2AAE":c.REL,"\u2AAF\u0338":c.REL,"\u2AB0\u0338":c.REL,"\u2AB1":c.REL,"\u2AB2":c.REL,"\u2AB3":c.REL,"\u2AB4":c.REL,"\u2AB5":c.REL,"\u2AB6":c.REL,"\u2AB7":c.REL,"\u2AB8":c.REL,"\u2AB9":c.REL,"\u2ABA":c.REL,"\u2ABB":c.REL,"\u2ABC":c.REL,"\u2ABD":c.REL,"\u2ABE":c.REL,"\u2ABF":c.REL,"\u2AC0":c.REL,"\u2AC1":c.REL,"\u2AC2":c.REL,"\u2AC3":c.REL,"\u2AC4":c.REL,"\u2AC5":c.REL,"\u2AC6":c.REL,"\u2AC7":c.REL,"\u2AC8":c.REL,"\u2AC9":c.REL,"\u2ACA":c.REL,"\u2ACB":c.REL,"\u2ACC":c.REL,"\u2ACD":c.REL,"\u2ACE":c.REL,"\u2ACF":c.REL,"\u2AD0":c.REL,"\u2AD1":c.REL,"\u2AD2":c.REL,"\u2AD3":c.REL,"\u2AD4":c.REL,"\u2AD5":c.REL,"\u2AD6":c.REL,"\u2AD7":c.REL,"\u2AD8":c.REL,"\u2AD9":c.REL,"\u2ADA":c.REL,"\u2ADB":c.REL,"\u2ADC":c.REL,"\u2ADD":c.REL,"\u2ADE":c.REL,"\u2ADF":c.REL,"\u2AE0":c.REL,"\u2AE1":c.REL,"\u2AE2":c.REL,"\u2AE3":c.REL,"\u2AE4":c.REL,"\u2AE5":c.REL,"\u2AE6":c.REL,"\u2AE7":c.REL,"\u2AE8":c.REL,"\u2AE9":c.REL,"\u2AEA":c.REL,"\u2AEB":c.REL,"\u2AEC":c.REL,"\u2AED":c.REL,"\u2AEE":c.REL,"\u2AEF":c.REL,"\u2AF0":c.REL,"\u2AF1":c.REL,"\u2AF2":c.REL,"\u2AF3":c.REL,"\u2AF4":c.BIN4,"\u2AF5":c.BIN4,"\u2AF6":c.BIN4,"\u2AF7":c.REL,"\u2AF8":c.REL,"\u2AF9":c.REL,"\u2AFA":c.REL,"\u2AFB":c.BIN4,"\u2AFD":c.BIN4,"\u2AFE":c.BIN3}}});MathJax.Ajax.loadComplete(a.optableDir+"/SuppMathOperators.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
16
jax/element/mml/optable/SupplementalArrowsA.js
Normal file
16
jax/element/mml/optable/SupplementalArrowsA.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* /MathJax/jax/element/mml/optable/SupplementalArrowsA.js
|
||||
*
|
||||
* Copyright (c) 2010 Design Science, Inc.
|
||||
*
|
||||
* Part of the MathJax library.
|
||||
* See http://www.mathjax.org for details.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0;
|
||||
* you may not use this file except in compliance with the License.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u27F0":c.RELSTRETCH,"\u27F1":c.RELSTRETCH,"\u27FB":c.WIDEREL,"\u27FD":c.WIDEREL,"\u27FE":c.WIDEREL,"\u27FF":c.WIDEREL}}});MathJax.Ajax.loadComplete(a.optableDir+"/SupplementalArrowsA.js")})(MathJax.ElementJax.mml);
|
||||
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u2900":c.REL,"\u2901":c.REL,"\u2902":c.REL,"\u2903":c.REL,"\u2904":c.REL,"\u2905":c.REL,"\u2906":c.REL,"\u2907":c.REL,"\u2908":c.REL,"\u2909":c.REL,"\u290A":c.WIDEREL,"\u290B":c.WIDEREL,"\u290C":c.WIDEREL,"\u290D":c.WIDEREL,"\u290E":c.WIDEREL,"\u290F":c.WIDEREL,"\u2910":c.WIDEREL,"\u2911":c.REL,"\u2912":c.WIDEREL,"\u2913":c.WIDEREL,"\u2914":c.REL,"\u2915":c.REL,"\u2916":c.REL,"\u2917":c.REL,"\u2918":c.REL,"\u2919":c.REL,"\u291A":c.REL,"\u291B":c.REL,"\u291C":c.REL,"\u291D":c.REL,"\u291E":c.REL,"\u291F":c.REL,"\u2920":c.REL,"\u2921":c.WIDEREL,"\u2922":c.WIDEREL,"\u2923":c.REL,"\u2924":c.REL,"\u2925":c.REL,"\u2926":c.REL,"\u2927":c.REL,"\u2928":c.REL,"\u2929":c.REL,"\u292A":c.REL,"\u292B":c.REL,"\u292C":c.REL,"\u292D":c.REL,"\u292E":c.REL,"\u292F":c.REL,"\u2930":c.REL,"\u2931":c.REL,"\u2932":c.REL,"\u2933":c.REL,"\u2934":c.REL,"\u2935":c.REL,"\u2936":c.REL,"\u2937":c.REL,"\u2938":c.REL,"\u2939":c.REL,"\u293A":c.REL,"\u293B":c.REL,"\u293C":c.REL,"\u293D":c.REL,"\u293E":c.REL,"\u293F":c.REL,"\u2940":c.REL,"\u2941":c.REL,"\u2942":c.REL,"\u2943":c.REL,"\u2944":c.REL,"\u2945":c.REL,"\u2946":c.REL,"\u2947":c.REL,"\u2948":c.REL,"\u2949":c.REL,"\u294A":c.REL,"\u294B":c.REL,"\u294C":c.REL,"\u294D":c.REL,"\u294E":c.RELACCENT,"\u294F":c.WIDEREL,"\u2950":c.WIDEREL,"\u2951":c.WIDEREL,"\u2952":c.WIDEREL,"\u2953":c.WIDEREL,"\u2954":c.WIDEREL,"\u2955":c.WIDEREL,"\u2956":c.WIDEREL,"\u2957":c.WIDEREL,"\u2958":c.WIDEREL,"\u2959":c.WIDEREL,"\u295A":c.WIDEREL,"\u295B":c.WIDEREL,"\u295C":c.WIDEREL,"\u295D":c.WIDEREL,"\u295E":c.WIDEREL,"\u295F":c.WIDEREL,"\u2960":c.WIDEREL,"\u2961":c.WIDEREL,"\u2962":c.REL,"\u2963":c.REL,"\u2964":c.REL,"\u2965":c.REL,"\u2966":c.REL,"\u2967":c.REL,"\u2968":c.REL,"\u2969":c.REL,"\u296A":c.REL,"\u296B":c.REL,"\u296C":c.REL,"\u296D":c.REL,"\u296E":c.WIDEREL,"\u296F":c.WIDEREL,"\u2970":c.REL,"\u2971":c.REL,"\u2972":c.REL,"\u2973":c.REL,"\u2974":c.REL,"\u2975":c.REL,"\u2976":c.REL,"\u2977":c.REL,"\u2978":c.REL,"\u2979":c.REL,"\u297A":c.REL,"\u297B":c.REL,"\u297C":c.REL,"\u297D":c.REL,"\u297E":c.REL,"\u297F":c.REL}}});MathJax.Ajax.loadComplete(a.optableDir+"/SupplementalArrowsB.js")})(MathJax.ElementJax.mml);
|
||||
(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u2900":c.RELACCENT,"\u2901":c.RELACCENT,"\u2902":c.RELACCENT,"\u2903":c.RELACCENT,"\u2904":c.RELACCENT,"\u2905":c.RELACCENT,"\u2906":c.RELACCENT,"\u2907":c.RELACCENT,"\u2908":c.REL,"\u2909":c.REL,"\u290A":c.RELSTRETCH,"\u290B":c.RELSTRETCH,"\u290C":c.WIDEREL,"\u290D":c.WIDEREL,"\u290E":c.WIDEREL,"\u290F":c.WIDEREL,"\u2910":c.WIDEREL,"\u2911":c.RELACCENT,"\u2912":c.RELSTRETCH,"\u2913":c.RELSTRETCH,"\u2914":c.RELACCENT,"\u2915":c.RELACCENT,"\u2916":c.RELACCENT,"\u2917":c.RELACCENT,"\u2918":c.RELACCENT,"\u2919":c.RELACCENT,"\u291A":c.RELACCENT,"\u291B":c.RELACCENT,"\u291C":c.RELACCENT,"\u291D":c.RELACCENT,"\u291E":c.RELACCENT,"\u291F":c.RELACCENT,"\u2920":c.RELACCENT,"\u2921":c.RELSTRETCH,"\u2922":c.RELSTRETCH,"\u2923":c.REL,"\u2924":c.REL,"\u2925":c.REL,"\u2926":c.REL,"\u2927":c.REL,"\u2928":c.REL,"\u2929":c.REL,"\u292A":c.REL,"\u292B":c.REL,"\u292C":c.REL,"\u292D":c.REL,"\u292E":c.REL,"\u292F":c.REL,"\u2930":c.REL,"\u2931":c.REL,"\u2932":c.REL,"\u2933":c.RELACCENT,"\u2934":c.REL,"\u2935":c.REL,"\u2936":c.REL,"\u2937":c.REL,"\u2938":c.REL,"\u2939":c.REL,"\u293A":c.RELACCENT,"\u293B":c.RELACCENT,"\u293C":c.RELACCENT,"\u293D":c.RELACCENT,"\u293E":c.REL,"\u293F":c.REL,"\u2940":c.REL,"\u2941":c.REL,"\u2942":c.RELACCENT,"\u2943":c.RELACCENT,"\u2944":c.RELACCENT,"\u2945":c.RELACCENT,"\u2946":c.RELACCENT,"\u2947":c.RELACCENT,"\u2948":c.RELACCENT,"\u2949":c.REL,"\u294A":c.RELACCENT,"\u294B":c.RELACCENT,"\u294C":c.REL,"\u294D":c.REL,"\u294E":c.WIDEREL,"\u294F":c.RELSTRETCH,"\u2950":c.WIDEREL,"\u2951":c.RELSTRETCH,"\u2952":c.WIDEREL,"\u2953":c.WIDEREL,"\u2954":c.RELSTRETCH,"\u2955":c.RELSTRETCH,"\u2956":c.RELSTRETCH,"\u2957":c.RELSTRETCH,"\u2958":c.RELSTRETCH,"\u2959":c.RELSTRETCH,"\u295A":c.WIDEREL,"\u295B":c.WIDEREL,"\u295C":c.RELSTRETCH,"\u295D":c.RELSTRETCH,"\u295E":c.WIDEREL,"\u295F":c.WIDEREL,"\u2960":c.RELSTRETCH,"\u2961":c.RELSTRETCH,"\u2962":c.RELACCENT,"\u2963":c.REL,"\u2964":c.RELACCENT,"\u2965":c.REL,"\u2966":c.RELACCENT,"\u2967":c.RELACCENT,"\u2968":c.RELACCENT,"\u2969":c.RELACCENT,"\u296A":c.RELACCENT,"\u296B":c.RELACCENT,"\u296C":c.RELACCENT,"\u296D":c.RELACCENT,"\u296E":c.RELSTRETCH,"\u296F":c.RELSTRETCH,"\u2970":c.RELACCENT,"\u2971":c.RELACCENT,"\u2972":c.RELACCENT,"\u2973":c.RELACCENT,"\u2974":c.RELACCENT,"\u2975":c.RELACCENT,"\u2976":c.RELACCENT,"\u2977":c.RELACCENT,"\u2978":c.RELACCENT,"\u2979":c.RELACCENT,"\u297A":c.RELACCENT,"\u297B":c.RELACCENT,"\u297C":c.RELACCENT,"\u297D":c.RELACCENT,"\u297E":c.REL,"\u297F":c.REL}}});MathJax.Ajax.loadComplete(a.optableDir+"/SupplementalArrowsB.js")})(MathJax.ElementJax.mml);
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"1.1.9",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%"}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js");
|
||||
MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"1.1.10",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%",equationNumbers:{autoNumber:"none",formatNumber:function(a){return a},formatTag:function(a){return"("+a+")"},formatID:function(a){return"mjx-eqn-"+a},formatURL:function(a){return"#mjx-eqn-"+escape(a)}}}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js");
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var g="1.1.4";var c=MathJax.ElementJax.mml,e=MathJax.OutputJax["HTML-CSS"];var d,f,b;var a=e.config.tooltip=MathJax.Hub.Insert({delayPost:600,delayClear:600,offsetX:10,offsetY:5},e.config.tooltip||{});c.maction.Augment({HTMLtooltip:e.addElement(document.body,"div",{id:"MathJax_Tooltip"}),toHTML:function(k,h,m){k=this.HTMLhandleSize(this.HTMLcreateSpan(k));k.bbox=null;var i=this.getValues("actiontype","selection"),n;var j=this.data[i.selection-1];if(j){e.Measured(j.toHTML(k),k);if(m!=null){e.Remeasured(j.HTMLstretchV(k,h,m),k)}else{if(h!=null){e.Remeasured(j.HTMLstretchH(k,h),k)}}if(e.msieHitBoxBug){var l=e.addElement(k,"span",{isMathJax:true});n=e.createFrame(l,k.bbox.h,k.bbox.d,k.bbox.w,0,"none");k.insertBefore(l,k.firstChild);l.style.marginRight=e.Em(-k.bbox.w);if(e.msieInlineBlockAlignBug){n.style.verticalAlign=e.Em(e.getHD(k).d-k.bbox.d)}}else{n=e.createFrame(k,k.bbox.h,k.bbox.d,k.bbox.w,0,"none");k.insertBefore(n,k.firstChild);n.style.marginRight=e.Em(-k.bbox.w)}n.className="MathJax_HitBox";n.id="MathJax-HitBox-"+this.spanID;if(this.HTMLaction[i.actiontype]){this.HTMLaction[i.actiontype].call(this,k,n,i.selection)}}this.HTMLhandleSpace(k);this.HTMLhandleColor(k);return k},HTMLstretchH:c.mbase.HTMLstretchH,HTMLstretchV:c.mbase.HTMLstretchV,HTMLaction:{toggle:function(i,j,h){this.selection=h;j.onclick=i.childNodes[1].onclick=MathJax.Callback(["HTMLclick",this]);j.style.cursor=i.childNodes[1].style.cursor="pointer"},statusline:function(i,j,h){j.onmouseover=i.childNodes[1].onmouseover=MathJax.Callback(["HTMLsetStatus",this]);j.onmouseout=i.childNodes[1].onmouseout=MathJax.Callback(["HTMLclearStatus",this]);j.onmouseover.autoReset=j.onmouseout.autoReset=true},tooltip:function(i,j,h){if(this.data[1]&&this.data[1].isToken){j.title=j.alt=i.childNodes[1].title=i.childNodes[1].alt=this.data[1].data.join("")}else{j.onmouseover=i.childNodes[1].onmouseover=MathJax.Callback(["HTMLtooltipOver",this]);j.onmouseout=i.childNodes[1].onmouseout=MathJax.Callback(["HTMLtooltipOut",this]);j.onmouseover.autoReset=j.onmouseout.autoReset=true}}},HTMLclick:function(l){this.selection++;if(this.selection>this.data.length){this.selection=1}var k=this;while(k.type!=="math"){k=k.inherit}var h=MathJax.Hub.getJaxFor(k.inputID),j=!!h.hover;h.Update();if(j){var i=document.getElementById(h.inputID+"-Span");MathJax.Extension.MathEvents.Hover.Hover(h,i)}return MathJax.Extension.MathEvents.Event.False(l)},HTMLsetStatus:function(h){window.status=((this.data[1]&&this.data[1].isToken)?this.data[1].data.join(""):this.data[1].toString())},HTMLclearStatus:function(h){window.status=""},HTMLtooltipOver:function(i){if(!i){i=window.event}if(b){clearTimeout(b);b=null}if(f){clearTimeout(f)}var h=i.pageX;var k=i.pageY;if(h==null){h=i.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;k=i.clientY+document.body.scrollTop+document.documentElement.scrollTop}var j=MathJax.Callback(["HTMLtooltipPost",this,h+a.offsetX,k+a.offsetY]);f=setTimeout(j,a.delayPost)},HTMLtooltipOut:function(h){if(f){clearTimeout(f);f=null}if(b){clearTimeout(b)}var i=MathJax.Callback(["HTMLtooltipClear",this,80]);b=setTimeout(i,a.delayClear)},HTMLtooltipPost:function(i,m){f=null;if(b){clearTimeout(b);b=null}var l=this.HTMLtooltip;l.style.display="block";l.style.opacity="";l.style.filter=e.config.styles["#MathJax_Tooltip"].filter;if(this===d){return}l.style.left=i+"px";l.style.top=m+"px";l.innerHTML='<span class="MathJax"><nobr></nobr></span>';e.getScales(l.firstChild,l.firstChild);var h=e.createStack(l.firstChild.firstChild);var k=e.createBox(h);try{e.Measured(this.data[1].toHTML(k),k)}catch(j){if(!j.restart){throw j}l.style.display="none";MathJax.Callback.After(["HTMLtooltipPost",this,i,m],j.restart)}e.placeBox(k,0,0);e.createRule(l.firstChild.firstChild,k.bbox.h,k.bbox.d,0);d=this},HTMLtooltipClear:function(i){var h=this.HTMLtooltip;if(i<=0){h.style.display="none";h.style.opacity=h.style.filter="";b=null}else{h.style.opacity=i/100;h.style.filter="alpha(opacity="+i+")";b=setTimeout(MathJax.Callback(["HTMLtooltipClear",this,i-20]),50)}}});MathJax.Hub.Browser.Select({MSIE:function(h){e.msieHitBoxBug=true}});MathJax.Hub.Startup.signal.Post("HTML-CSS maction Ready");MathJax.Ajax.loadComplete(e.autoloadDir+"/maction.js")});
|
||||
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var g="1.1.4";var c=MathJax.ElementJax.mml,e=MathJax.OutputJax["HTML-CSS"];var d,f,b;var a=e.config.tooltip=MathJax.Hub.Insert({delayPost:600,delayClear:600,offsetX:10,offsetY:5},e.config.tooltip||{});c.maction.Augment({HTMLtooltip:e.addElement(document.body,"div",{id:"MathJax_Tooltip"}),toHTML:function(j,h,k){j=this.HTMLhandleSize(this.HTMLcreateSpan(j));j.bbox=null;var i=this.selected();if(i){e.Measured(i.toHTML(j),j);if(k!=null){e.Remeasured(i.HTMLstretchV(j,h,k),j)}else{if(h!=null){e.Remeasured(i.HTMLstretchH(j,h),j)}}this.HTMLhandleHitBox(j)}this.HTMLhandleSpace(j);this.HTMLhandleColor(j);return j},HTMLhandleHitBox:function(i,l){var k;if(e.msieHitBoxBug){var j=e.addElement(i,"span",{isMathJax:true});k=e.createFrame(j,i.bbox.h,i.bbox.d,i.bbox.w,0,"none");i.insertBefore(j,i.firstChild);j.style.marginRight=e.Em(-i.bbox.w);if(e.msieInlineBlockAlignBug){k.style.verticalAlign=e.Em(e.getHD(i).d-i.bbox.d)}}else{k=e.createFrame(i,i.bbox.h,i.bbox.d,i.bbox.w,0,"none");i.insertBefore(k,i.firstChild);k.style.marginRight=e.Em(-i.bbox.w)}k.className="MathJax_HitBox";k.id="MathJax-HitBox-"+this.spanID+(l||"")+e.idPostfix;var h=this.Get("actiontype");if(this.HTMLaction[h]){this.HTMLaction[h].call(this,i,k,this.Get("selection"))}},HTMLstretchH:c.mbase.HTMLstretchH,HTMLstretchV:c.mbase.HTMLstretchV,HTMLaction:{toggle:function(i,j,h){this.selection=h;j.onclick=i.childNodes[1].onclick=MathJax.Callback(["HTMLclick",this]);j.style.cursor=i.childNodes[1].style.cursor="pointer"},statusline:function(i,j,h){j.onmouseover=i.childNodes[1].onmouseover=MathJax.Callback(["HTMLsetStatus",this]);j.onmouseout=i.childNodes[1].onmouseout=MathJax.Callback(["HTMLclearStatus",this]);j.onmouseover.autoReset=j.onmouseout.autoReset=true},tooltip:function(i,j,h){if(this.data[1]&&this.data[1].isToken){j.title=j.alt=i.childNodes[1].title=i.childNodes[1].alt=this.data[1].data.join("")}else{j.onmouseover=i.childNodes[1].onmouseover=MathJax.Callback(["HTMLtooltipOver",this]);j.onmouseout=i.childNodes[1].onmouseout=MathJax.Callback(["HTMLtooltipOut",this]);j.onmouseover.autoReset=j.onmouseout.autoReset=true}}},HTMLclick:function(l){this.selection++;if(this.selection>this.data.length){this.selection=1}var k=this;while(k.type!=="math"){k=k.inherit}var h=MathJax.Hub.getJaxFor(k.inputID),j=!!h.hover;h.Update();if(j){var i=document.getElementById(h.inputID+"-Span");MathJax.Extension.MathEvents.Hover.Hover(h,i)}return MathJax.Extension.MathEvents.Event.False(l)},HTMLsetStatus:function(h){window.status=((this.data[1]&&this.data[1].isToken)?this.data[1].data.join(""):this.data[1].toString())},HTMLclearStatus:function(h){window.status=""},HTMLtooltipOver:function(i){if(!i){i=window.event}if(b){clearTimeout(b);b=null}if(f){clearTimeout(f)}var h=i.pageX;var k=i.pageY;if(h==null){h=i.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;k=i.clientY+document.body.scrollTop+document.documentElement.scrollTop}var j=MathJax.Callback(["HTMLtooltipPost",this,h+a.offsetX,k+a.offsetY]);f=setTimeout(j,a.delayPost)},HTMLtooltipOut:function(h){if(f){clearTimeout(f);f=null}if(b){clearTimeout(b)}var i=MathJax.Callback(["HTMLtooltipClear",this,80]);b=setTimeout(i,a.delayClear)},HTMLtooltipPost:function(i,m){f=null;if(b){clearTimeout(b);b=null}var l=this.HTMLtooltip;l.style.display="block";l.style.opacity="";l.style.filter=e.config.styles["#MathJax_Tooltip"].filter;if(this===d){return}l.style.left=i+"px";l.style.top=m+"px";l.innerHTML='<span class="MathJax"><nobr></nobr></span>';e.getScales(l.firstChild,l.firstChild);var h=e.createStack(l.firstChild.firstChild);var k=e.createBox(h);try{e.Measured(this.data[1].toHTML(k),k)}catch(j){if(!j.restart){throw j}l.style.display="none";MathJax.Callback.After(["HTMLtooltipPost",this,i,m],j.restart)}e.placeBox(k,0,0);e.createRule(l.firstChild.firstChild,k.bbox.h,k.bbox.d,0);d=this},HTMLtooltipClear:function(i){var h=this.HTMLtooltip;if(i<=0){h.style.display="none";h.style.opacity=h.style.filter="";b=null}else{h.style.opacity=i/100;h.style.filter="alpha(opacity="+i+")";b=setTimeout(MathJax.Callback(["HTMLtooltipClear",this,i-20]),50)}}});MathJax.Hub.Browser.Select({MSIE:function(h){e.msieHitBoxBug=true}});MathJax.Hub.Startup.signal.Post("HTML-CSS maction Ready");MathJax.Ajax.loadComplete(e.autoloadDir+"/maction.js")});
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
MathJax.OutputJax["HTML-CSS"]=MathJax.OutputJax({id:"HTML-CSS",version:"1.1.13",directory:MathJax.OutputJax.directory+"/HTML-CSS",extensionDir:MathJax.OutputJax.extensionDir+"/HTML-CSS",autoloadDir:MathJax.OutputJax.directory+"/HTML-CSS/autoload",fontDir:MathJax.OutputJax.directory+"/HTML-CSS/fonts",webfontDir:MathJax.OutputJax.fontDir+"/HTML-CSS",config:{scale:100,minScaleAdjust:50,availableFonts:["STIX","TeX"],preferredFont:"TeX",webFont:"TeX",imageFont:"TeX",undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",styles:{".MathJax_Display":{"text-align":"center",margin:"1em 0em"},".MathJax .merror":{"background-color":"#FFFF88",color:"#CC0000",border:"1px solid #CC0000",padding:"1px 3px","font-family":"serif","font-style":"normal","font-size":"90%"},".MathJax_Preview":{color:"#888888"},"#MathJax_Tooltip":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')",padding:"3px 4px"}}}});if(MathJax.Hub.Browser.isMSIE&&document.documentMode>=9){delete MathJax.OutputJax["HTML-CSS"].config.styles["#MathJax_Tooltip"].filter}if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax["HTML-CSS"].Register("jax/mml")}MathJax.Hub.Register.StartupHook("End Config",[function(b,c){var a=b.Insert({minBrowserVersion:{Firefox:3,Opera:9.52,MSIE:6,Chrome:0.3,Safari:2,Konqueror:4},inlineMathDelimiters:["$","$"],displayMathDelimiters:["$$","$$"],multilineDisplay:true,minBrowserTranslate:function(f){var e=b.getJaxFor(f),k=["[Math]"],j;var h=document.createElement("span",{className:"MathJax_Preview"});if(e.inputJax.id==="TeX"){if(e.root.Get("displaystyle")){j=a.displayMathDelimiters;k=[j[0]+e.originalText+j[1]];if(a.multilineDisplay){k=k[0].split(/\n/)}}else{j=a.inlineMathDelimiters;k=[j[0]+e.originalText.replace(/^\s+/,"").replace(/\s+$/,"")+j[1]]}}for(var g=0,d=k.length;g<d;g++){h.appendChild(document.createTextNode(k[g]));if(g<d-1){h.appendChild(document.createElement("br"))}}f.parentNode.insertBefore(h,f)}},(b.config["HTML-CSS"]||{}));if(b.Browser.version!=="0.0"&&!b.Browser.versionAtLeast(a.minBrowserVersion[b.Browser]||0)){c.Translate=a.minBrowserTranslate;b.Config({showProcessingMessages:false});MathJax.Message.Set("Your browser does not support MathJax",null,4000);b.Startup.signal.Post("MathJax not supported")}},MathJax.Hub,MathJax.OutputJax["HTML-CSS"]]);MathJax.OutputJax["HTML-CSS"].loadComplete("config.js");
|
||||
MathJax.OutputJax["HTML-CSS"]=MathJax.OutputJax({id:"HTML-CSS",version:"1.1.14",directory:MathJax.OutputJax.directory+"/HTML-CSS",extensionDir:MathJax.OutputJax.extensionDir+"/HTML-CSS",autoloadDir:MathJax.OutputJax.directory+"/HTML-CSS/autoload",fontDir:MathJax.OutputJax.directory+"/HTML-CSS/fonts",webfontDir:MathJax.OutputJax.fontDir+"/HTML-CSS",config:{scale:100,minScaleAdjust:50,availableFonts:["STIX","TeX"],preferredFont:"TeX",webFont:"TeX",imageFont:"TeX",undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",linebreaks:{automatic:false,width:"container"},styles:{".MathJax_Display":{"text-align":"center",margin:"1em 0em"},".MathJax .merror":{"background-color":"#FFFF88",color:"#CC0000",border:"1px solid #CC0000",padding:"1px 3px","font-family":"serif","font-style":"normal","font-size":"90%"},".MathJax_Preview":{color:"#888888"},"#MathJax_Tooltip":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')",padding:"3px 4px"}}}});if(MathJax.Hub.Browser.isMSIE&&document.documentMode>=9){delete MathJax.OutputJax["HTML-CSS"].config.styles["#MathJax_Tooltip"].filter}if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax["HTML-CSS"].Register("jax/mml")}MathJax.Hub.Register.StartupHook("End Config",[function(b,c){var a=b.Insert({minBrowserVersion:{Firefox:3,Opera:9.52,MSIE:6,Chrome:0.3,Safari:2,Konqueror:4},inlineMathDelimiters:["$","$"],displayMathDelimiters:["$$","$$"],multilineDisplay:true,minBrowserTranslate:function(f){var e=b.getJaxFor(f),k=["[Math]"],j;var h=document.createElement("span",{className:"MathJax_Preview"});if(e.inputJax==="TeX"){if(e.root.Get("displaystyle")){j=a.displayMathDelimiters;k=[j[0]+e.originalText+j[1]];if(a.multilineDisplay){k=k[0].split(/\n/)}}else{j=a.inlineMathDelimiters;k=[j[0]+e.originalText.replace(/^\s+/,"").replace(/\s+$/,"")+j[1]]}}for(var g=0,d=k.length;g<d;g++){h.appendChild(document.createTextNode(k[g]));if(g<d-1){h.appendChild(document.createElement("br"))}}f.parentNode.insertBefore(h,f)}},(b.config["HTML-CSS"]||{}));if(b.Browser.version!=="0.0"&&!b.Browser.versionAtLeast(a.minBrowserVersion[b.Browser]||0)){c.Translate=a.minBrowserTranslate;b.Config({showProcessingMessages:false});MathJax.Message.Set("Your browser does not support MathJax",null,4000);b.Startup.signal.Post("MathJax not supported")}},MathJax.Hub,MathJax.OutputJax["HTML-CSS"]]);MathJax.OutputJax["HTML-CSS"].loadComplete("config.js");
|
||||
|
||||
|
|
16
jax/output/HTML-CSS/fonts/STIX/fontdata-extra.js
Normal file
16
jax/output/HTML-CSS/fonts/STIX/fontdata-extra.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
16
jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js
Normal file
16
jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* /MathJax/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js
|
||||
*
|
||||
* Copyright (c) 2010 Design Science, Inc.
|
||||
*
|
||||
* Part of the MathJax library.
|
||||
* See http://www.mathjax.org for details.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0;
|
||||
* you may not use this file except in compliance with the License.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
(function(g){var k=g.FONTDATA.DELIMITERS;var f="MathJax_Main",h="MathJax_Main-bold",i="MathJax_AMS",d="MathJax_Size1",a="MathJax_Size4";var j="H",e="V";var c={61:{dir:j,HW:[[0.767,f]],stretch:{rep:[61,f]}},8606:{dir:j,HW:[[1,i]],stretch:{left:[8606,i],rep:[8722,f]}},8608:{dir:j,HW:[[1,i]],stretch:{right:[139680,i],rep:[8722,f]}},8612:{dir:j,HW:[],stretch:{left:[8592,f],rep:[8722,f],right:[8739,d,0,-0.05,0.9]}},8613:{dir:e,HW:[],stretch:{bot:[8869,h,0,0,0.75],ext:[9168,d],top:[8593,d]}},8614:{dir:j,HW:[[1,i]],stretch:{left:[8739,d,-0.09,-0.05,0.9],rep:[8722,f],right:[8594,f]}},8615:{dir:e,HW:[],stretch:{top:[8868,h,0,0,0.75],ext:[9168,d],bot:[8595,d]}},8624:{dir:e,HW:[[0.722,i]],stretch:{top:[8624,i],ext:[9168,d,0.097]}},8625:{dir:e,HW:[[0.722,i]],stretch:{top:[8625,i,0.27],ext:[9168,d]}},8636:{dir:j,HW:[[1,f]],stretch:{left:[8636,f],rep:[8722,f]}},8637:{dir:j,HW:[[1,f]],stretch:{left:[8637,f],rep:[8722,f]}},8638:{dir:e,HW:[[0.888,i]],stretch:{top:[8638,i,0.12,0,1.1],ext:[9168,d]}},8639:{dir:e,HW:[[0.888,i]],stretch:{top:[8639,i,0.12,0,1.1],ext:[9168,d]}},8640:{dir:j,HW:[[1,f]],stretch:{right:[8640,f],rep:[8722,f]}},8641:{dir:j,HW:[[1,f]],stretch:{right:[8641,f],rep:[8722,f]}},8642:{dir:e,HW:[[0.888,i]],stretch:{bot:[8642,i,0.12,0,1.1],ext:[9168,d]}},8643:{dir:e,HW:[[0.888,i]],stretch:{bot:[8643,i,0.12,0,1.1],ext:[9168,d]}},8666:{dir:j,HW:[[1,i]],stretch:{left:[8666,i],rep:[8801,f]}},8667:{dir:j,HW:[[1,i]],stretch:{right:[8667,i],rep:[8801,f]}},9140:{dir:j,HW:[],stretch:{left:[9484,i,0,-0.1],rep:[8722,f,0,0.35],right:[9488,i,0,-0.1]}},9141:{dir:j,HW:[],stretch:{left:[9492,i,0,0.26],rep:[8722,f,0,0,0,0.25],right:[9496,i,0,0.26]}},9180:{dir:j,HW:[[0.778,i,0,8994],[1,f,0,8994]],stretch:{left:[57680,a],rep:[57684,a],right:[57681,a]}},9181:{dir:j,HW:[[0.778,i,0,8995],[1,f,0,8995]],stretch:{left:[57682,a],rep:[57684,a],right:[57683,a]}},9184:{dir:j,HW:[],stretch:{left:[714,f,-0.1],rep:[713,f,0,0.13],right:[715,f],fullExtenders:true}},9185:{dir:j,HW:[],stretch:{left:[715,f,-0.1,0.1],rep:[713,f],right:[714,f,-0.1,0.1],fullExtenders:true}},10502:{dir:j,HW:[],stretch:{left:[8656,f],rep:[61,f],right:[8739,d,0,-0.1]}},10503:{dir:j,HW:[],stretch:{left:[8872,i,0,-0.12],rep:[61,f],right:[8658,f]}},10574:{dir:j,HW:[],stretch:{left:[8636,f],rep:[8722,f],right:[8640,f]}},10575:{dir:e,HW:[],stretch:{top:[8638,i,0.12,0,1.1],ext:[9168,d],bot:[8642,i,0.12,0,1.1]}},10576:{dir:j,HW:[],stretch:{left:[8637,f],rep:[8722,f],right:[8641,f]}},10577:{dir:e,HW:[],stretch:{top:[8639,i,0.12,0,1.1],ext:[9168,d],bot:[8643,i,0.12,0,1.1]}},10586:{dir:j,HW:[],stretch:{left:[8636,f],rep:[8722,f],right:[8739,d,0,-0.05,0.9]}},10587:{dir:j,HW:[],stretch:{left:[8739,d,-0.09,-0.05,0.9],rep:[8722,f],right:[8640,f]}},10588:{dir:e,HW:[],stretch:{bot:[8869,h,0,0,0.75],ext:[9168,d],top:[8638,i,0.12,0,1.1]}},10589:{dir:e,HW:[],stretch:{top:[8868,h,0,0,0.75],ext:[9168,d],bot:[8642,i,0.12,0,1.1]}},10590:{dir:j,HW:[],stretch:{left:[8637,f],rep:[8722,f],right:[8739,d,0,-0.05,0.9]}},10591:{dir:j,HW:[],stretch:{left:[8739,d,-0.09,-0.05,0.9],rep:[8722,f],right:[8641,f]}},10592:{dir:e,HW:[],stretch:{bot:[8869,h,0,0,0.75],ext:[9168,d],top:[8639,i,0.12,0,1.1]}},10593:{dir:e,HW:[],stretch:{top:[8868,h,0,0,0.75],ext:[9168,d],bot:[8643,i,0.12,0,1.1]}}};for(var b in c){if(c.hasOwnProperty(b)){k[b]=c[b]}}MathJax.Ajax.loadComplete(g.fontDir+"/fontdata-extra.js")})(MathJax.OutputJax["HTML-CSS"]);
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
MathJax.OutputJax.NativeMML=MathJax.OutputJax({id:"NativeMML",version:"1.1.9",directory:MathJax.OutputJax.directory+"/NativeMML",extensionDir:MathJax.OutputJax.extensionDir+"/NativeMML",config:{scale:100,styles:{"DIV.MathJax_MathML":{"text-align":"center",margin:".75em 0px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.NativeMML.Register("jax/mml")}MathJax.OutputJax.NativeMML.loadComplete("config.js");
|
||||
MathJax.OutputJax.NativeMML=MathJax.OutputJax({id:"NativeMML",version:"1.1.10",directory:MathJax.OutputJax.directory+"/NativeMML",extensionDir:MathJax.OutputJax.extensionDir+"/NativeMML",config:{scale:100,styles:{"DIV.MathJax_MathML":{"text-align":"center",margin:".75em 0px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.NativeMML.Register("jax/mml")}MathJax.OutputJax.NativeMML.loadComplete("config.js");
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ if (!window.MathJax) {window.MathJax= {}}
|
|||
if (!MathJax.Hub) { // skip if already loaded
|
||||
|
||||
MathJax.version = "1.1a";
|
||||
MathJax.fileversion = "1.1.13";
|
||||
MathJax.fileversion = "1.1.14";
|
||||
|
||||
/**********************************************************/
|
||||
|
||||
|
@ -366,25 +366,52 @@ MathJax.fileversion = "1.1.13";
|
|||
};
|
||||
|
||||
//
|
||||
// Run an array of callbacks passing them the given data.
|
||||
// If any return callbacks, return a callback that will be
|
||||
// executed when they all have completed.
|
||||
// An array or priorities hooks that are executed sequentially
|
||||
// with a given set of data.
|
||||
//
|
||||
var HOOKS = function (hooks,data,reset) {
|
||||
if (!hooks) {return null}
|
||||
if (!(hooks instanceof Array)) {hooks = [hooks]}
|
||||
if (!(data instanceof Array)) {data = (data == null ? [] : [data])}
|
||||
var callbacks = [{}];
|
||||
for (var i = 0, m = hooks.length; i < m; i++) {
|
||||
if (reset) {hooks[i].reset()}
|
||||
var result = hooks[i].apply(window,data);
|
||||
if (ISCALLBACK(result) && !result.called) {callbacks.push(result)}
|
||||
var HOOKS = MathJax.Object.Subclass({
|
||||
//
|
||||
// Initialize the array and the auto-reset status
|
||||
//
|
||||
Init: function (reset) {
|
||||
this.hooks = [];
|
||||
this.reset = reset;
|
||||
},
|
||||
//
|
||||
// Add a callback to the list, in priority order (default priority is 10)
|
||||
//
|
||||
Add: function (hook,priority) {
|
||||
if (priority == null) {priority = 10}
|
||||
if (!ISCALLBACK(hook)) {hook = USING(hook)}
|
||||
hook.priority = priority;
|
||||
var i = this.hooks.length;
|
||||
while (i > 0 && priority < this.hooks[i-1].priority) {i--}
|
||||
this.hooks.splice(i,0,hook);
|
||||
return hook;
|
||||
},
|
||||
Remove: function (hook) {
|
||||
for (var i = 0, m = this.hooks.length; i < m; i++) {
|
||||
if (this.hooks[i] === hook) {this.hooks.splice(i,1); return}
|
||||
}
|
||||
},
|
||||
//
|
||||
// Execute the list of callbacks, resetting them if requested.
|
||||
// If any return callbacks, return a callback that will be
|
||||
// executed when they all have completed.
|
||||
//
|
||||
Execute: function () {
|
||||
var callbacks = [{}];
|
||||
for (var i = 0, m = this.hooks.length; i < m; i++) {
|
||||
if (this.reset) {this.hooks[i].reset()}
|
||||
var result = this.hooks[i].apply(window,arguments);
|
||||
if (ISCALLBACK(result) && !result.called) {callbacks.push(result)}
|
||||
}
|
||||
if (callbacks.length === 1) {return null}
|
||||
if (callbacks.length === 2) {return callbacks[1]}
|
||||
return AFTER.apply({},callbacks);
|
||||
}
|
||||
if (callbacks.length === 1) {return null}
|
||||
if (callbacks.length === 2) {return callbacks[1]}
|
||||
return AFTER.apply({},callbacks);
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
//
|
||||
// Command queue that performs commands in order, waiting when
|
||||
// necessary for commands to complete asynchronousely
|
||||
|
@ -447,8 +474,8 @@ MathJax.fileversion = "1.1.13";
|
|||
Init: function (name) {
|
||||
QUEUE.prototype.Init.call(this);
|
||||
this.name = name;
|
||||
this.posted = []; // the messages posted so far
|
||||
this.listeners = []; // those with interest in this signal
|
||||
this.posted = []; // the messages posted so far
|
||||
this.listeners = HOOKS(true); // those with interest in this signal
|
||||
},
|
||||
//
|
||||
// Post a message to the signal listeners, with callback for when complete
|
||||
|
@ -460,12 +487,9 @@ MathJax.fileversion = "1.1.13";
|
|||
} else {
|
||||
this.callback = callback; callback.reset();
|
||||
if (!forget) {this.posted.push(message)}
|
||||
this.Suspend(); this.posting = 1;
|
||||
for (var i = 0, m = this.listeners.length; i < m; i++) {
|
||||
this.listeners[i].reset();
|
||||
var result = (this.listeners[i])(message);
|
||||
if (ISCALLBACK(result) && !result.called) {WAITFOR(result,this)}
|
||||
}
|
||||
this.Suspend(); this.posting = true;
|
||||
var result = this.listeners.Execute(message);
|
||||
if (ISCALLBACK(result) && !result.called) {WAITFOR(result,this)}
|
||||
this.Resume(); delete this.posting;
|
||||
if (!this.pending) {this.call()}
|
||||
}
|
||||
|
@ -491,11 +515,11 @@ MathJax.fileversion = "1.1.13";
|
|||
|
||||
//
|
||||
// A listener calls this to register intrest in the signal (so it will be called
|
||||
// when posts occur). If ignorePast is 1, it will not be sent the post history.
|
||||
// when posts occur). If ignorePast is true, it will not be sent the post history.
|
||||
//
|
||||
Interest: function (callback,ignorePast) {
|
||||
Interest: function (callback,ignorePast,priority) {
|
||||
callback = USING(callback);
|
||||
this.listeners[this.listeners.length] = callback;
|
||||
this.listeners.Add(callback,priority);
|
||||
if (!ignorePast) {
|
||||
for (var i = 0, m = this.posted.length; i < m; i++) {
|
||||
callback.reset();
|
||||
|
@ -509,19 +533,17 @@ MathJax.fileversion = "1.1.13";
|
|||
// A listener calls this to remove itself from a signal
|
||||
//
|
||||
NoInterest: function (callback) {
|
||||
for (var i = 0, m = this.listeners.length; i < m; i++) {
|
||||
if (this.listeners[i] === callback) {this.listeners.splice(i,1); return}
|
||||
}
|
||||
this.listeners.Remove(callback);
|
||||
},
|
||||
|
||||
//
|
||||
// Hook a callback to a particular message on this signal
|
||||
//
|
||||
MessageHook: function (msg,callback) {
|
||||
MessageHook: function (msg,callback,priority) {
|
||||
callback = USING(callback);
|
||||
if (!this.hooks) {this.hooks = {}; this.Interest(["ExecuteHooks",this])}
|
||||
if (!this.hooks[msg]) {this.hooks[msg] = []}
|
||||
this.hooks[msg].push(callback);
|
||||
if (!this.hooks[msg]) {this.hooks[msg] = HOOKS(true)}
|
||||
this.hooks[msg].Add(callback,priority);
|
||||
for (var i = 0, m = this.posted.length; i < m; i++)
|
||||
{if (this.posted[i] == msg) {callback.reset(); callback(this.posted[i])}}
|
||||
return callback;
|
||||
|
@ -531,7 +553,8 @@ MathJax.fileversion = "1.1.13";
|
|||
//
|
||||
ExecuteHooks: function (msg,more) {
|
||||
var type = ((msg instanceof Array) ? msg[0] : msg);
|
||||
return HOOKS(this.hooks[type],[msg],true);
|
||||
if (!this.hooks[type]) {return null}
|
||||
return this.hooks[type].Execute(msg);
|
||||
}
|
||||
|
||||
},{
|
||||
|
@ -550,7 +573,7 @@ MathJax.fileversion = "1.1.13";
|
|||
BASE.Callback.After = AFTER;
|
||||
BASE.Callback.Queue = QUEUE;
|
||||
BASE.Callback.Signal = SIGNAL.find;
|
||||
BASE.Callback.ExecuteHooks = HOOKS;
|
||||
BASE.Callback.Hooks = HOOKS;
|
||||
})("MathJax");
|
||||
|
||||
/**********************************************************/
|
||||
|
@ -635,8 +658,7 @@ MathJax.fileversion = "1.1.13";
|
|||
else {type = file.split(/\./).pop().toUpperCase()}
|
||||
file = this.fileURL(file);
|
||||
if (this.loading[file]) {
|
||||
if (!this.loadHooks[file]) {this.loadHooks[file] = []}
|
||||
this.loadHooks[file].push(callback);
|
||||
this.addHook(file,callback);
|
||||
} else {
|
||||
this.head = HEAD(this.head);
|
||||
if (this.loader[type]) {this.loader[type].call(this,file,callback)}
|
||||
|
@ -649,18 +671,18 @@ MathJax.fileversion = "1.1.13";
|
|||
// Register a load hook for a particular file (it will be called when
|
||||
// loadComplete() is called for that file)
|
||||
//
|
||||
LoadHook: function (file,callback) {
|
||||
LoadHook: function (file,callback,priority) {
|
||||
callback = BASE.Callback(callback);
|
||||
if (file instanceof Object) {for (var i in file) {file = file[i]}}
|
||||
file = this.fileURL(file);
|
||||
if (this.loaded[file]) {
|
||||
callback(this.loaded[file]);
|
||||
} else {
|
||||
if (!this.loadHooks[file]) {this.loadHooks[file] = []}
|
||||
this.loadHooks[file].push(callback);
|
||||
}
|
||||
if (this.loaded[file]) {callback(this.loaded[file])}
|
||||
else {this.addHook(file,callback,priority)}
|
||||
return callback;
|
||||
},
|
||||
addHook: function (file,callback,priority) {
|
||||
if (!this.loadHooks[file]) {this.loadHooks[file] = MathJax.Callback.Hooks()}
|
||||
this.loadHooks[file].Add(callback,priority);
|
||||
},
|
||||
|
||||
//
|
||||
// Used when files are combined in a preloading configuration file
|
||||
|
@ -818,13 +840,13 @@ MathJax.fileversion = "1.1.13";
|
|||
SCRIPTS.push(loading.script);
|
||||
}
|
||||
this.loaded[file] = loading.status; delete this.loading[file];
|
||||
if (!this.loadHooks[file]) {this.loadHooks[file] = []}
|
||||
this.loadHooks[file].push(loading.callback);
|
||||
this.addHook(file,loading.callback);
|
||||
} else {
|
||||
this.loaded[file] = this.STATUS.OK;
|
||||
loading = {status: this.STATUS.OK}
|
||||
}
|
||||
BASE.Callback.ExecuteHooks(this.loadHooks[file],loading.status);
|
||||
if (!this.loadHooks[file]) {return null}
|
||||
return this.loadHooks[file].Execute(loading.status);
|
||||
},
|
||||
|
||||
//
|
||||
|
@ -1093,6 +1115,9 @@ MathJax.Message = {
|
|||
} else if (text.match(/^Processing /)) {
|
||||
if (!this.processing) {this.processing = "Processing "}
|
||||
text = this.processing; this.processing += ".";
|
||||
} else if (text.match(/^Typesetting /)) {
|
||||
if (!this.typesetting) {this.typesetting = "Typesetting "}
|
||||
text = this.typesetting; this.typesetting += ".";
|
||||
}
|
||||
}
|
||||
return text;
|
||||
|
@ -1195,10 +1220,6 @@ MathJax.Hub = {
|
|||
showMathMenuMSIE: true, // separtely determine if MSIE should have math menu
|
||||
// (since the code for that is a bit delicate)
|
||||
|
||||
preProcessors: [], // list of callbacks for preprocessing (initialized by extensions)
|
||||
inputJax: {}, // mime-type mapped to input jax (by registration)
|
||||
outputJax: {order:{}}, // mime-type mapped to output jax list (by registration)
|
||||
|
||||
menuSettings: {
|
||||
zoom: "None", // when to do MathZoom
|
||||
CTRL: false, // require CTRL for MathZoom?
|
||||
|
@ -1218,6 +1239,10 @@ MathJax.Hub = {
|
|||
}
|
||||
},
|
||||
|
||||
preProcessors: MathJax.Callback.Hooks(true), // list of callbacks for preprocessing (initialized by extensions)
|
||||
inputJax: {}, // mime-type mapped to input jax (by registration)
|
||||
outputJax: {order:{}}, // mime-type mapped to output jax list (by registration)
|
||||
|
||||
processUpdateTime: 250, // time between screen updates when processing math (milliseconds)
|
||||
|
||||
signal: MathJax.Callback.Signal("Hub"), // Signal used for Hub events
|
||||
|
@ -1237,7 +1262,7 @@ MathJax.Hub = {
|
|||
},
|
||||
|
||||
Register: {
|
||||
PreProcessor: function (callback) {MathJax.Hub.config.preProcessors.push(MathJax.Callback(callback))},
|
||||
PreProcessor: function () {MathJax.Hub.preProcessors.Add.apply(MathJax.Hub.preProcessors,arguments)},
|
||||
MessageHook: function () {return MathJax.Hub.signal.MessageHook.apply(MathJax.Hub.signal,arguments)},
|
||||
StartupHook: function () {return MathJax.Hub.Startup.signal.MessageHook.apply(MathJax.Hub.Startup.signal,arguments)},
|
||||
LoadHook: function () {return MathJax.Ajax.LoadHook.apply(MathJax.Ajax,arguments)}
|
||||
|
@ -1284,7 +1309,7 @@ MathJax.Hub = {
|
|||
if (element && element.tagName != null && element.tagName.toLowerCase() === 'script') {
|
||||
if (element.MathJax)
|
||||
{return (element.MathJax.state === MathJax.ElementJax.STATE.PROCESSED ? 1 : -1)}
|
||||
if (element.type && this.config.inputJax[element.type.replace(/ *;(.|\s)*/,"")]) {return -1}
|
||||
if (element.type && this.inputJax[element.type.replace(/ *;(.|\s)*/,"")]) {return -1}
|
||||
}
|
||||
// FIXME: check for results of outputJax
|
||||
return 0;
|
||||
|
@ -1316,8 +1341,7 @@ MathJax.Hub = {
|
|||
if (ec.elements[i]) {
|
||||
queue.Push(
|
||||
["Post",this.signal,["Begin PreProcess",ec.elements[i]]],
|
||||
["ExecuteHooks",MathJax.Callback,
|
||||
(arguments.callee.disabled ? [] : this.config.preProcessors), ec.elements[i], true],
|
||||
(arguments.callee.disabled? {} : ["Execute",this.preProcessors,ec.elements[i]]),
|
||||
["Post",this.signal,["End PreProcess",ec.elements[i]]]
|
||||
);
|
||||
}
|
||||
|
@ -1339,7 +1363,12 @@ MathJax.Hub = {
|
|||
["Post",this.signal,["Begin "+action,ec.elements[i]]],
|
||||
["Post",this.signal,["Begin Math",ec.elements[i]]],
|
||||
["prepareScripts",this,action,ec.elements[i],scripts],
|
||||
["processScripts",this,scripts],
|
||||
["Post",this.signal,["Begin Math Input",ec.elements[i]]],
|
||||
["processInput",this,scripts],
|
||||
["Post",this.signal,["End Math Input",ec.elements[i]]],
|
||||
["Post",this.signal,["Begin Math Output",ec.elements[i]]],
|
||||
["processOutput",this,scripts],
|
||||
["Post",this.signal,["End Math Output",ec.elements[i]]],
|
||||
["Post",this.signal,["End Math",ec.elements[i]]],
|
||||
["Post",this.signal,["End "+action,ec.elements[i]]]
|
||||
);
|
||||
|
@ -1352,14 +1381,12 @@ MathJax.Hub = {
|
|||
Process: function (script) {},
|
||||
Update: function (script) {
|
||||
var jax = script.MathJax.elementJax;
|
||||
// FIXME: Have intputJax determine if things have changed?
|
||||
if (jax && jax.originalText === (script.text == "" ? script.innerHTML : script.text))
|
||||
{script.MathJax.state = jax.STATE.PROCESSED} else
|
||||
{jax.outputJax.Remove(jax); script.MathJax.state = jax.STATE.UPDATE}
|
||||
if (jax && jax.needsUpdate()) {jax.Remove(true); script.MathJax.state = jax.STATE.UPDATE}
|
||||
else {script.MathJax.state = jax.STATE.PROCESSED}
|
||||
},
|
||||
Reprocess: function (script) {
|
||||
var jax = script.MathJax.elementJax;
|
||||
if (jax) {jax.outputJax.Remove(jax); script.MathJax.state = jax.STATE.UPDATE}
|
||||
if (jax) {jax.Remove(true); script.MathJax.state = jax.STATE.UPDATE}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1369,7 +1396,7 @@ MathJax.Hub = {
|
|||
var STATE = MathJax.ElementJax.STATE;
|
||||
for (var i = 0, m = scripts.length; i < m; i++) {
|
||||
var script = scripts[i];
|
||||
if (script.type && this.config.inputJax[script.type.replace(/ *;(.|\n)*/,"")]) {
|
||||
if (script.type && this.inputJax[script.type.replace(/ *;(.|\n)*/,"")]) {
|
||||
if (script.MathJax) {
|
||||
if (script.MathJax.elementJax && script.MathJax.elementJax.hover) {
|
||||
MathJax.Extension.MathEvents.Hover.ClearHover(script.MathJax.elementJax);
|
||||
|
@ -1416,13 +1443,12 @@ MathJax.Hub = {
|
|||
if (script.MathJax) {script.MathJax.checked = 1}
|
||||
},
|
||||
|
||||
processScripts: function (scripts,start,n) {
|
||||
processInput: function (scripts,start,n) {
|
||||
if (arguments.callee.disabled) {return null}
|
||||
if (!start) {start = new Date().getTime()}
|
||||
var result, STATE = MathJax.ElementJax.STATE;
|
||||
var inputJax = this.config.inputJax, outputJax = this.config.outputJax;
|
||||
var i = 0, script, prev;
|
||||
try {
|
||||
if (!start) {start = new Date().getTime()}
|
||||
var i = 0, script, prev;
|
||||
while (i < scripts.length) {
|
||||
script = scripts[i]; if (!script) {i++; continue}
|
||||
prev = script.previousSibling;
|
||||
|
@ -1431,46 +1457,68 @@ MathJax.Hub = {
|
|||
if (!script.MathJax || script.MathJax.state === STATE.PROCESSED) {i++; continue};
|
||||
if (!script.MathJax.elementJax || script.MathJax.state === STATE.UPDATE) {
|
||||
this.checkScriptSiblings(script);
|
||||
result = inputJax[type].Process(script);
|
||||
result = this.inputJax[type].Process(script);
|
||||
if (typeof result === 'function') {
|
||||
if (result.called) continue; // go back and call Process() again
|
||||
this.RestartAfter(result);
|
||||
}
|
||||
result.Attach(script,inputJax[type]);
|
||||
result.Attach(script,this.inputJax[type].id);
|
||||
script.MathJax.state = STATE.OUTPUT;
|
||||
}
|
||||
var jax = script.MathJax.elementJax;
|
||||
if (!outputJax[jax.mimeType]) {
|
||||
script.MathJax.state = STATE.UPDATE;
|
||||
throw Error("No output jax registered for "+jax.mimeType);
|
||||
}
|
||||
jax.outputJax = outputJax[jax.mimeType][0];
|
||||
result = jax.outputJax.Process(script);
|
||||
if (typeof result === 'function') {
|
||||
if (result.called) continue; // go back and call Process() again
|
||||
this.RestartAfter(result);
|
||||
}
|
||||
script.MathJax.state = STATE.PROCESSED;
|
||||
this.signal.Post(["New Math",jax.inputID]); // FIXME: wait for this? (i.e., restart if returns uncalled callback)
|
||||
i++;
|
||||
if (new Date().getTime() - start > this.processUpdateTime && i < scripts.length)
|
||||
{start = 0; this.RestartAfter(MathJax.Callback.Delay(1))}
|
||||
}
|
||||
} catch (err) {
|
||||
if (!err.restart) {
|
||||
if (!this.config.errorSettings.message) {throw err}
|
||||
this.formatError(script,err); i++;
|
||||
} catch (err) {return this.processError(err,scripts,i,n,start,"Input")}
|
||||
if ((n || scripts.length) && this.config.showProcessingMessages)
|
||||
{MathJax.Message.Set("Processing math: 100%",0)}
|
||||
return null;
|
||||
},
|
||||
|
||||
processOutput: function (scripts,start,n) {
|
||||
if (arguments.callee.disabled) {return null}
|
||||
if (!start) {start = new Date().getTime()}
|
||||
var result, STATE = MathJax.ElementJax.STATE;
|
||||
var i = 0, script;
|
||||
try {
|
||||
while (i < scripts.length) {
|
||||
script = scripts[i]; if (!script || !script.MathJax) {i++; continue}
|
||||
var jax = script.MathJax.elementJax; if (!jax) {i++; continue}
|
||||
if (!this.outputJax[jax.mimeType]) {
|
||||
script.MathJax.state = STATE.UPDATE;
|
||||
throw Error("No output jax registered for "+jax.mimeType);
|
||||
}
|
||||
var outputJax = this.outputJax[jax.mimeType][0];
|
||||
jax.outputJax = outputJax.id;
|
||||
result = outputJax.Process(script);
|
||||
if (typeof result === 'function') {
|
||||
if (result.called) continue; // go back and call Process() again
|
||||
this.RestartAfter(result);
|
||||
}
|
||||
script.MathJax.state = STATE.PROCESSED; i++;
|
||||
this.signal.Post(["New Math",jax.inputID]); // FIXME: wait for this? (i.e., restart if returns uncalled callback)
|
||||
if (new Date().getTime() - start > this.processUpdateTime && i < scripts.length)
|
||||
{start = 0; this.RestartAfter(MathJax.Callback.Delay(1))}
|
||||
}
|
||||
if (!n) {n = 0}; var m = Math.floor((n+i)/(n+scripts.length)*100); n += i;
|
||||
if (this.config.showProcessingMessages) {MathJax.Message.Set("Processing math: "+m+"%",0)}
|
||||
return MathJax.Callback.After(["processScripts",this,scripts.slice(i),start,n],err.restart);
|
||||
}
|
||||
} catch (err) {return this.processError(err,scripts,i,n,start,"Output")}
|
||||
if ((n || scripts.length) && this.config.showProcessingMessages) {
|
||||
MathJax.Message.Set("Processing Math: 100%",0);
|
||||
MathJax.Message.Set("Typesetting math: 100%",0);
|
||||
MathJax.Message.Clear(0);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
processError: function (err,scripts,i,n,start,type) {
|
||||
if (!err.restart) {
|
||||
if (!this.config.errorSettings.message) {throw err}
|
||||
this.formatError(scripts[i],err); i++;
|
||||
}
|
||||
if (!n) {n = 0}; var m = Math.floor((n+i)/(n+scripts.length)*100); n += i;
|
||||
var message = (type === "Output" ? "Typesetting" : "Processing");
|
||||
if (this.config.showProcessingMessages) {MathJax.Message.Set(message+" math: "+m+"%",0)}
|
||||
return MathJax.Callback.After(["process"+type,this,scripts.slice(i),start,n],err.restart);
|
||||
},
|
||||
|
||||
formatError: function (script,err) {
|
||||
var error = MathJax.HTML.Element("span",{className:"MathJax_Error"},this.config.errorSettings.message);
|
||||
script.parentNode.insertBefore(error,script);
|
||||
|
@ -1518,8 +1566,7 @@ MathJax.Hub.Insert(MathJax.Hub.config.styles,MathJax.Message.styles);
|
|||
MathJax.Hub.Insert(MathJax.Hub.config.styles,{".MathJax_Error":MathJax.Hub.config.errorSettings.style});
|
||||
|
||||
//
|
||||
// Storage area for preprocessors and extensions
|
||||
// (should these be classes?)
|
||||
// Storage area for extensions and preprocessors
|
||||
//
|
||||
MathJax.Extension = {};
|
||||
|
||||
|
@ -1651,11 +1698,11 @@ MathJax.Hub.Startup = {
|
|||
// Load the input and output jax
|
||||
//
|
||||
Jax: function () {
|
||||
var config = MathJax.Hub.config;
|
||||
var config = MathJax.Hub.config, jax = MathJax.Hub.outputJax;
|
||||
// Save the order of the output jax since they are loading asynchronously
|
||||
for (var i = 0, m = config.jax.length, k = 0; i < m; i++) {
|
||||
if (config.jax[i].substr(0,7) === "output/")
|
||||
{config.outputJax.order[config.jax[i].substr(7)] = k; k++}
|
||||
{jax.order[config.jax[i].substr(7)] = k; k++}
|
||||
}
|
||||
var queue = MathJax.Callback.Queue();
|
||||
return queue.Push(
|
||||
|
@ -1688,7 +1735,7 @@ MathJax.Hub.Startup = {
|
|||
// (this must come after the jax are loaded)
|
||||
//
|
||||
Menu: function () {
|
||||
var menu = MathJax.Hub.config.menuSettings, jax = MathJax.Hub.config.outputJax, registered;
|
||||
var menu = MathJax.Hub.config.menuSettings, jax = MathJax.Hub.outputJax, registered;
|
||||
for (var id in jax) {if (jax.hasOwnProperty(id)) {
|
||||
if (jax[id].length) {registered = jax[id]; break}
|
||||
}}
|
||||
|
@ -1858,13 +1905,17 @@ MathJax.Hub.Startup = {
|
|||
var load = queue.Push(AJAX.Require(this.directory+"/"+this.JAXFILE));
|
||||
if (!load.called) {this.constructor.prototype.Process = function () {return load}}
|
||||
// Load the associated output jax
|
||||
jax = HUB.config.outputJax["jax/"+jax[0]];
|
||||
jax = HUB.outputJax["jax/"+jax[0]];
|
||||
if (jax) {queue.Push(AJAX.Require(jax[0].directory+"/"+this.JAXFILE))}
|
||||
return queue.Push({});
|
||||
},
|
||||
needsUpdate: function (jax) {
|
||||
var script = jax.SourceElement();
|
||||
return (jax.originalText !== (script.text == "" ? script.innerHTML : script.text));
|
||||
},
|
||||
Register: function (mimetype) {
|
||||
if (!HUB.config.inputJax) {HUB.config.inputJax = {}}
|
||||
HUB.config.inputJax[mimetype] = this;
|
||||
if (!HUB.inputJax) {HUB.inputJax = {}}
|
||||
HUB.inputJax[mimetype] = this;
|
||||
}
|
||||
},{
|
||||
id: "InputJax",
|
||||
|
@ -1877,7 +1928,7 @@ MathJax.Hub.Startup = {
|
|||
|
||||
BASE.OutputJax = JAX.Subclass({
|
||||
Register: function (mimetype) {
|
||||
var jax = HUB.config.outputJax;
|
||||
var jax = HUB.outputJax;
|
||||
if (!jax[mimetype]) {jax[mimetype] = []}
|
||||
// If the output jax is earlier in the original configuration list, put it first here
|
||||
if (jax[mimetype].length && (this.id === HUB.config.menuSettings.renderer ||
|
||||
|
@ -1926,11 +1977,16 @@ MathJax.Hub.Startup = {
|
|||
script.MathJax.state = this.STATE.OUTPUT;
|
||||
return HUB.Process(script,callback);
|
||||
},
|
||||
Remove: function () {
|
||||
Remove: function (keep) {
|
||||
if (this.hover) {this.hover.clear(this)}
|
||||
this.outputJax.Remove(this);
|
||||
HUB.signal.Post(["Remove Math",this.inputID]); // wait for this to finish?
|
||||
this.Detach();
|
||||
BASE.OutputJax[this.outputJax].Remove(this);
|
||||
if (!keep) {
|
||||
HUB.signal.Post(["Remove Math",this.inputID]); // wait for this to finish?
|
||||
this.Detach();
|
||||
}
|
||||
},
|
||||
needsUpdate: function () {
|
||||
return BASE.InputJax[this.inputJax].needsUpdate(this);
|
||||
},
|
||||
|
||||
SourceElement: function () {return document.getElementById(this.inputID)},
|
||||
|
|
|
@ -262,6 +262,13 @@ MathJax.Hub.Config({
|
|||
//
|
||||
processEnvironments: true,
|
||||
|
||||
//
|
||||
// Controls whether tex2jax processes \ref{...} commands outside
|
||||
// of math mode. Set to "false" to prevent processing of \ref
|
||||
// except within math mode.
|
||||
//
|
||||
processRefs: true,
|
||||
|
||||
//
|
||||
// Controls whether tex2jax inserts MathJax_Preview spans to make a
|
||||
// preview available, and what preview to use, when it locates in-line
|
||||
|
@ -368,7 +375,20 @@ MathJax.Hub.Config({
|
|||
// bold: ['{\\bf #1}', 1]
|
||||
// }
|
||||
//
|
||||
Macros: {}
|
||||
Macros: {},
|
||||
|
||||
//
|
||||
// Equation numbering parameters.
|
||||
//
|
||||
equationNumbers: {
|
||||
// formatNumber: function (n) {return n}, // format for equation number n
|
||||
// formatTag: function (n) {return '('+n+')'}, // format for \tag and \eqref
|
||||
// formatID: function (n) {return 'mjx-eqn-'+n}, // element ID to use for reference
|
||||
// formatURL: function (n) {return '#mjx-eqn-'+escape(n)}, // URL to use for references
|
||||
|
||||
autoNumber: "none" // "AMS" for standard AMS environment numbering,
|
||||
// or "all" to number all displayed equations
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
@ -452,6 +472,42 @@ MathJax.Hub.Config({
|
|||
// if it doesn't contain the needed character), so order these carefully.
|
||||
//
|
||||
undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif",
|
||||
|
||||
//
|
||||
// These settings control automatic line breaking. It is off by
|
||||
// default, so only explicit line breaks are performed (via
|
||||
// linebreak="newline" attributes on <mo> and <mspace> elements). To
|
||||
// perform automatic line breaking on line expressions, set
|
||||
// 'automatic' to 'true' below. The line breaks will be applied via a
|
||||
// penalty-based heuristic, which does well, but isn't perfect. You
|
||||
// might need to use linebreak="goodbreak" or linebreak="badbreak" by
|
||||
// hand in order to get better effects. It is also possible to modify
|
||||
// the penalty values; contact the MathJax user's forum for details.
|
||||
//
|
||||
linebreaks: {
|
||||
|
||||
//
|
||||
// This controls the automatic breaking of expressions:
|
||||
// when false, only process linebreak="newline",
|
||||
// when true, line breaks are inserted automatically in long expressions.
|
||||
//
|
||||
automatic: false,
|
||||
|
||||
//
|
||||
// This controls how wide the lines of mathematics can be
|
||||
//
|
||||
// Use an explicit with like "30em" for a fixed width.
|
||||
// Use "container" to compute size from containing element.
|
||||
// Use "nn% container" for a portion of the container.
|
||||
// Use "nn%" for a portion of the window size.
|
||||
//
|
||||
// The container-based widths may be slower, and may not produce the
|
||||
// expected results if the layout width changes due to the removal
|
||||
// of previews or inclusion of mathematics during typesetting.
|
||||
//
|
||||
width: "container"
|
||||
},
|
||||
|
||||
|
||||
//
|
||||
// This controls whether the MathJax contextual menu will be available
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
if (MENU) {
|
||||
MENU.jax = jax;
|
||||
MENU.menu.Find("Show Math As").menu.items[1].name =
|
||||
(INPUT[jax.inputJax.id].sourceMenuTitle||"Original Form");
|
||||
(INPUT[jax.inputJax].sourceMenuTitle||"Original Form");
|
||||
return MENU.menu.Post(event);
|
||||
} else {
|
||||
if (!AJAX.loadingMathMenu) {
|
||||
|
@ -208,7 +208,7 @@
|
|||
// timer for the hover
|
||||
//
|
||||
Mouseover: function (event,math) {
|
||||
if (SETTINGS.discoverable) {
|
||||
if (SETTINGS.discoverable || SETTINGS.zoom === "Hover") {
|
||||
var from = event.fromElement || event.relatedTarget,
|
||||
to = event.toElement || event.target;
|
||||
if (from && to && from.isMathJax != to.isMathJax) {
|
||||
|
@ -224,7 +224,7 @@
|
|||
// hovered yet
|
||||
//
|
||||
Mouseout: function (event,math) {
|
||||
if (SETTINGS.discoverable) {
|
||||
if (SETTINGS.discoverable || SETTINGS.zoom === "Hover") {
|
||||
var from = event.fromElement || event.relatedTarget,
|
||||
to = event.toElement || event.target;
|
||||
if (from && to && from.isMathJax != to.isMathJax) {
|
||||
|
@ -238,7 +238,7 @@
|
|||
// Restart hover timer if the mouse moves
|
||||
//
|
||||
Mousemove: function (event,math) {
|
||||
if (SETTINGS.discoverable) {
|
||||
if (SETTINGS.discoverable || SETTINGS.zoom === "Hover") {
|
||||
var jax = this.getJaxFromMath(math); if (jax.hover) return;
|
||||
if (HOVER.lastX == event.clientX && HOVER.lastY == event.clientY) return;
|
||||
HOVER.lastX = event.clientX; HOVER.lastY = event.clientY;
|
||||
|
@ -269,7 +269,7 @@
|
|||
//
|
||||
// Get the hover data
|
||||
//
|
||||
var JAX = jax.outputJax,
|
||||
var JAX = OUTPUT[jax.outputJax],
|
||||
span = JAX.getHoverSpan(jax,math),
|
||||
bbox = JAX.getHoverBBox(jax,span,math),
|
||||
show = (JAX.config.showMathMenu != null ? JAX : HUB).config.showMathMenu;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
(function (HUB,HTML,AJAX,HTMLCSS,nMML) {
|
||||
var VERSION = "1.1.3";
|
||||
var VERSION = "1.1.4";
|
||||
|
||||
var CONFIG = HUB.CombineConfig("MathZoom",{
|
||||
styles: {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*
|
||||
* ---------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2009 Design Science, Inc.
|
||||
* Copyright (c) 2009-2011 Design Science, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -21,17 +21,31 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
MathJax.Extension["TeX/AMSmath"] = {
|
||||
version: "1.1.2",
|
||||
|
||||
number: 0, // current equation number
|
||||
startNumber: 0, // current starting equation number (for when equation is restarted)
|
||||
labels: {}, // the set of labels
|
||||
eqlabels: {}, // labels in the current equation
|
||||
refs: [] // array of jax with unresolved references
|
||||
};
|
||||
|
||||
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||
var VERSION = "1.1.1";
|
||||
|
||||
var MML = MathJax.ElementJax.mml;
|
||||
var TEX = MathJax.InputJax.TeX;
|
||||
var TEXDEF = TEX.Definitions;
|
||||
var STACKITEM = TEX.Stack.Item;
|
||||
|
||||
var MML = MathJax.ElementJax.mml,
|
||||
TEX = MathJax.InputJax.TeX,
|
||||
AMS = MathJax.Extension["TeX/AMSmath"];
|
||||
|
||||
var TEXDEF = TEX.Definitions,
|
||||
STACKITEM = TEX.Stack.Item,
|
||||
CONFIG = TEX.config.equationNumbers;
|
||||
|
||||
var COLS = function (W) {return W.join("em ") + "em"};
|
||||
|
||||
MathJax.Hub.Insert(TEXDEF,{
|
||||
/******************************************************************************/
|
||||
|
||||
TEXDEF.Add({
|
||||
macros: {
|
||||
mathring: ['Accent','2DA'], // or 0x30A
|
||||
|
||||
|
@ -54,6 +68,9 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
|
||||
tag: 'HandleTag',
|
||||
notag: 'HandleNoTag',
|
||||
label: 'HandleLabel',
|
||||
ref: 'HandleRef',
|
||||
eqref: ['HandleRef',true],
|
||||
|
||||
substack: ['Macro','\\begin{subarray}{c}#1\\end{subarray}',1],
|
||||
|
||||
|
@ -101,7 +118,10 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
gathered: ['ArrayII',null,null,null,'c',null,".5em",'D'],
|
||||
|
||||
subarray: ['Array',null,null,null,null,COLS([0,0,0,0]),"0.1em",'S',1],
|
||||
smallmatrix: ['Array',null,null,null,'c',COLS([1/3]),".2em",'S',1]
|
||||
smallmatrix: ['Array',null,null,null,'c',COLS([1/3]),".2em",'S',1],
|
||||
|
||||
'equation': ['EquationBegin','Equation',true],
|
||||
'equation*': ['EquationBegin','EquationStar',false]
|
||||
},
|
||||
|
||||
delimiter: {
|
||||
|
@ -110,24 +130,53 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
'\\lVert': ['2225',{texClass:MML.TEXCLASS.OPEN}],
|
||||
'\\rVert': ['2225',{texClass:MML.TEXCLASS.CLOSE}]
|
||||
}
|
||||
});
|
||||
},null,true);
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
TEX.Parse.Augment({
|
||||
|
||||
/*
|
||||
* Add the tag to the environment to be added to the table row later
|
||||
* Add the tag to the environment (to be added to the table row later)
|
||||
*/
|
||||
HandleTag: function (name) {
|
||||
var arg = this.trimSpaces(this.GetArgument(name));
|
||||
if (arg === "*") {arg = this.GetArgument(name)} else {arg = "("+arg+")"}
|
||||
if (this.stack.global.notag)
|
||||
{TEX.Error(name+" not allowed in "+this.stack.global.notag+" environment")}
|
||||
if (this.stack.global.tag) {TEX.Error("Multiple "+name)}
|
||||
this.stack.global.tag = MML.mtd.apply(MML,this.InternalMath(arg));
|
||||
var arg = this.trimSpaces(this.GetArgument(name)), tag = arg;
|
||||
if (arg === "*") {tag = arg = this.GetArgument(name)} else {arg = CONFIG.formatTag(arg)}
|
||||
var global = this.stack.global; global.tagID = tag;
|
||||
if (global.notags) {TEX.Error(name+" not allowed in "+global.notags+" environment")}
|
||||
if (global.tag) {TEX.Error("Multiple "+name)}
|
||||
global.tag = MML.mtd.apply(MML,this.InternalMath(arg)).With({id:CONFIG.formatID(tag)});
|
||||
},
|
||||
HandleNoTag: function (name) {
|
||||
if (this.stack.global.tag) {delete this.stack.global.tag}
|
||||
this.stack.global.notag = true; // prevent auto-tagging
|
||||
},
|
||||
|
||||
/*
|
||||
* Record a label name for a tag
|
||||
*/
|
||||
HandleLabel: function (name) {
|
||||
var global = this.stack.global, label = this.GetArgument(name);
|
||||
if (!AMS.refUpdate) {
|
||||
if (global.label) {TEX.Error("Multiple "+name+"'s")}
|
||||
global.label = label;
|
||||
if (AMS.labels[label] || AMS.eqlabels[label]) {TEX.Error("Label '"+label+"' mutiply defined")}
|
||||
AMS.eqlabels[label] = "???"; // will be replaced by tag value later
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Handle a label reference
|
||||
*/
|
||||
HandleRef: function (name,eqref) {
|
||||
var label = this.GetArgument(name);
|
||||
var ref = AMS.labels[label] || AMS.eqlabels[label];
|
||||
if (!ref) {ref = "??"; AMS.badref = !AMS.refUpdate}
|
||||
var tag = ref; if (eqref) {tag = CONFIG.formatTag(tag)}
|
||||
this.Push(MML.mrow.apply(MML,this.InternalMath(tag)).With({
|
||||
href:CONFIG.formatURL(ref), "class":"MathJax_ref"
|
||||
}));
|
||||
},
|
||||
|
||||
/*
|
||||
|
@ -209,8 +258,8 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
* Implements multline environment (mostly handled through STACKITEM below)
|
||||
*/
|
||||
Multline: function (begin,numbered) {
|
||||
this.Push(begin);
|
||||
return STACKITEM.multline().With({
|
||||
this.Push(begin); this.checkEqnEnv();
|
||||
return STACKITEM.multline(numbered,this.stack).With({
|
||||
arraydef: {
|
||||
displaystyle: true,
|
||||
rowspacing: ".5em",
|
||||
|
@ -225,7 +274,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
* Handle AMS aligned environments
|
||||
*/
|
||||
AMSarray: function (begin,numbered,taggable,align,spacing) {
|
||||
this.Push(begin);
|
||||
this.Push(begin); if (taggable) {this.checkEqnEnv()}
|
||||
align = align.replace(/[^clr]/g,'').split('').join(' ');
|
||||
align = align.replace(/l/g,'left').replace(/r/g,'right').replace(/c/g,'center');
|
||||
return STACKITEM.AMSarray(begin.name,numbered,taggable,this.stack).With({
|
||||
|
@ -251,6 +300,9 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
return array;
|
||||
},
|
||||
|
||||
/*
|
||||
* Handle alignat environments
|
||||
*/
|
||||
AlignAt: function (begin,numbered,taggable) {
|
||||
var n = this.GetArgument("\\begin{"+begin.name+"}");
|
||||
if (n.match(/[^0-9]/)) {TEX.Error("Argument to \\begin{"+begin.name+"} must me a positive integer")}
|
||||
|
@ -261,6 +313,27 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
return this.Array(begin,null,null,align,spacing,".5em",'D');
|
||||
},
|
||||
|
||||
/*
|
||||
* Handle equation environment
|
||||
*/
|
||||
EquationBegin: function (begin,force) {
|
||||
this.checkEqnEnv();
|
||||
this.stack.global.forcetag = (force && CONFIG.autoNumber !== "none");
|
||||
return begin;
|
||||
},
|
||||
EquationStar: function (begin,row) {
|
||||
this.stack.global.tagged = true; // prevent automatic tagging
|
||||
return row;
|
||||
},
|
||||
|
||||
/*
|
||||
* Check for bad nesting of equation environments
|
||||
*/
|
||||
checkEqnEnv: function () {
|
||||
if (this.stack.global.eqnenv) {TEX.Error("Erroneous nesting of equation structures")}
|
||||
this.stack.global.eqnenv = true;
|
||||
},
|
||||
|
||||
/*
|
||||
* Handle multiple integrals (make a mathop if followed by limits)
|
||||
*/
|
||||
|
@ -277,6 +350,9 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
this.i = 0;
|
||||
},
|
||||
|
||||
/*
|
||||
* Handle stretchable arrows
|
||||
*/
|
||||
xArrow: function (name,chr,l,r) {
|
||||
var def = {width: "+"+(l+r)+"mu", lspace: l+"mu"};
|
||||
var bot = this.GetBrackets(name),
|
||||
|
@ -304,11 +380,43 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
}
|
||||
});
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
STACKITEM.Augment({
|
||||
/*
|
||||
* Increment equation number and form tag mtd element
|
||||
*/
|
||||
autoTag: function () {
|
||||
var global = this.global;
|
||||
if (!global.notag) {
|
||||
AMS.number++; global.tagID = CONFIG.formatNumber(AMS.number.toString());
|
||||
var mml = TEX.Parse("\\text{"+CONFIG.formatTag(global.tagID)+"}",{}).mml();
|
||||
global.tag = MML.mtd(mml.With({id:CONFIG.formatID(global.tagID)}));
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Get the tag and record the label, if any
|
||||
*/
|
||||
getTag: function () {
|
||||
var global = this.global, tag = global.tag; global.tagged = true;
|
||||
if (global.label) {AMS.eqlabels[global.label] = global.tagID}
|
||||
delete global.tag; delete global.tagID; delete global.label;
|
||||
return tag;
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
* Implement multline environment via a STACKITEM
|
||||
*/
|
||||
STACKITEM.multline = STACKITEM.array.Subclass({
|
||||
type: "multline",
|
||||
Init: function (numbered,stack) {
|
||||
this.SUPER(arguments).Init.apply(this);
|
||||
this.numbered = (numbered && CONFIG.autoNumber !== "none");
|
||||
this.save = {notag: stack.global.notag};
|
||||
stack.global.tagged = !numbered && !stack.global.forcetag; // prevent automatic tagging in starred environments
|
||||
},
|
||||
EndEntry: function () {
|
||||
var mtd = MML.mtd.apply(MML,this.data);
|
||||
if (this.data.shove) {mtd.columnalign = this.data.shove}
|
||||
|
@ -326,37 +434,46 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
if (!this.table[0][0].columnalign) {this.table[0][0].columnalign = MML.ALIGN.LEFT}
|
||||
if (!this.table[m][0].columnalign) {this.table[m][0].columnalign = MML.ALIGN.RIGHT}
|
||||
var mtr = MML.mtr;
|
||||
if (this.global.tag) {
|
||||
this.table[0] = [this.global.tag].concat(this.table[0]);
|
||||
delete this.global.tag; mtr = MML.mlabeledtr;
|
||||
if (!this.global.tag && this.numbered) {this.autoTag()}
|
||||
if (this.global.tag && !this.global.notags) {
|
||||
this.table[0] = [this.getTag()].concat(this.table[0]);
|
||||
mtr = MML.mlabeledtr;
|
||||
}
|
||||
this.table[0] = mtr.apply(MML,this.table[0]);
|
||||
for (i = 1, m = this.table.length; i < m; i++)
|
||||
{this.table[i] = MML.mtr.apply(MML,this.table[i])}
|
||||
}
|
||||
this.global.notag = this.save.notag;
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
* Save data about numbering and taging equations, and add
|
||||
* tags at the ends of rows.
|
||||
*/
|
||||
STACKITEM.AMSarray = STACKITEM.array.Subclass({
|
||||
type: "AMSarray",
|
||||
Init: function (name,numbered,taggable,stack) {
|
||||
this.SUPER(arguments).Init.apply(this);
|
||||
this.numbered = numbered;
|
||||
this.save_notag = stack.global.notag;
|
||||
stack.global.notag = (taggable ? null : name);
|
||||
this.numbered = (numbered && CONFIG.autoNumber !== "none");
|
||||
this.save = {notags: stack.global.notags, notag: stack.global.notag};
|
||||
stack.global.notags = (taggable ? null : name);
|
||||
stack.global.tagged = !numbered && !stack.global.forcetag; // prevent automatic tagging in starred environments
|
||||
},
|
||||
EndRow: function () {
|
||||
var mtr = MML.mtr;
|
||||
if (this.global.tag) {
|
||||
this.row = [this.global.tag].concat(this.row);
|
||||
if (!this.global.tag && this.numbered) {this.autoTag()}
|
||||
if (this.global.tag &&! this.global.notags) {
|
||||
this.row = [this.getTag()].concat(this.row);
|
||||
mtr = MML.mlabeledtr;
|
||||
delete this.global.tag;
|
||||
}
|
||||
if (this.numbered) {delete this.global.notag}
|
||||
this.table.push(mtr.apply(MML,this.row)); this.row = [];
|
||||
},
|
||||
EndTable: function () {
|
||||
this.SUPER(arguments).EndTable.call(this);
|
||||
this.global.notag = this.save_notag;
|
||||
this.global.notags = this.save.notags;
|
||||
this.global.notag = this.save.notag;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -367,9 +484,11 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
oldCheckItem: STACKITEM.start.prototype.checkItem,
|
||||
checkItem: function (item) {
|
||||
if (item.type === "stop") {
|
||||
var mml = this.mmlData();
|
||||
if (this.global.tag) {
|
||||
var row = [this.global.tag,MML.mtd(mml)]; delete this.global.tag;
|
||||
var mml = this.mmlData(), global = this.global;
|
||||
if (AMS.display && !global.tag && !global.tagged && !global.isInner &&
|
||||
(CONFIG.autoNumber === "all" || global.forcetag)) {this.autoTag()}
|
||||
if (global.tag) {
|
||||
var row = [this.getTag(),MML.mtd(mml)];
|
||||
var def = {
|
||||
side: TEX.config.TagSide,
|
||||
minlabelspacing: TEX.config.TagIndent,
|
||||
|
@ -392,10 +511,44 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
}
|
||||
return STACKITEM.mml(mml);
|
||||
}
|
||||
return this.SUPER(arguments).checkItem.call(this,item);
|
||||
return this.oldCheckItem.call(this,item);
|
||||
}
|
||||
});
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/*
|
||||
* Add pre- and post-filters to handle the equation number maintainance.
|
||||
*/
|
||||
TEX.prefilterHooks.Add(function (data) {
|
||||
AMS.display = data.display;
|
||||
AMS.number = AMS.startNumber; // reset equation numbers (in case the equation restarted)
|
||||
AMS.eqlabels = {}; AMS.badref = false;
|
||||
if (AMS.refUpdate) {AMS.number = data.script.MathJax.startNumber}
|
||||
});
|
||||
TEX.postfilterHooks.Add(function (data) {
|
||||
data.script.MathJax.startNumber = AMS.startNumber;
|
||||
AMS.startNumber = AMS.number; // equation numbers for next equation
|
||||
MathJax.Hub.Insert(AMS.labels,AMS.eqlabels); // save labels from this equation
|
||||
if (AMS.badref && !data.math.texError) {AMS.refs.push(data.script)} // reprocess later
|
||||
});
|
||||
|
||||
MathJax.Hub.Register.MessageHook("Begin Math Input",function () {
|
||||
AMS.refs = []; // array of jax with bad references
|
||||
AMS.refUpdate = false;
|
||||
});
|
||||
MathJax.Hub.Register.MessageHook("End Math Input",function (message) {
|
||||
if (AMS.refs.length) {
|
||||
AMS.refUpdate = true;
|
||||
for (var i = 0, m = AMS.refs.length; i < m; i++)
|
||||
{AMS.refs[i].MathJax.state = MathJax.ElementJax.STATE.UPDATE}
|
||||
return MathJax.Hub.processInput(AMS.refs);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
MathJax.Hub.Startup.signal.Post("TeX AMSmath Ready");
|
||||
|
||||
});
|
||||
|
|
|
@ -22,11 +22,12 @@
|
|||
*/
|
||||
|
||||
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||
var VERSION = "1.1.2";
|
||||
var VERSION = "1.1.3";
|
||||
|
||||
var MML = MathJax.ElementJax.mml;
|
||||
var MML = MathJax.ElementJax.mml,
|
||||
TEXDEF = MathJax.InputJax.TeX.Definitions;
|
||||
|
||||
MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions,{
|
||||
TEXDEF.Add({
|
||||
|
||||
mathchar0mi: {
|
||||
// Lowercase Greek letters
|
||||
|
@ -306,7 +307,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
impliedby: ['Macro','\\;\\Longleftarrow\\;']
|
||||
}
|
||||
|
||||
});
|
||||
},null,true);
|
||||
|
||||
var REL = MML.mo.OPTYPES.REL;
|
||||
|
||||
|
|
|
@ -22,15 +22,19 @@
|
|||
*/
|
||||
|
||||
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||
var VERSION = "1.1";
|
||||
var VERSION = "1.1.1";
|
||||
|
||||
var TEX = MathJax.InputJax.TeX;
|
||||
var TEXDEF = TEX.Definitions;
|
||||
|
||||
TEXDEF.macros.href = 'HREF_attribute';
|
||||
TEXDEF.macros["class"] = 'CLASS_attribute';
|
||||
TEXDEF.macros.style = 'STYLE_attribute';
|
||||
TEXDEF.macros.cssId = 'ID_attribute';
|
||||
TEXDEF.Add({
|
||||
macros: {
|
||||
href: 'HREF_attribute',
|
||||
"class": 'CLASS_attribute',
|
||||
style: 'STYLE_attribute',
|
||||
cssId: 'ID_attribute'
|
||||
}
|
||||
});
|
||||
|
||||
TEX.Parse.Augment({
|
||||
|
||||
|
|
76
unpacked/extensions/TeX/action.js
Normal file
76
unpacked/extensions/TeX/action.js
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*************************************************************
|
||||
*
|
||||
* MathJax/extensions/TeX/action.js
|
||||
*
|
||||
* Implements the \mathtip, \texttip, and \toggle macros, which give
|
||||
* access from TeX to the <maction> tag in the MathML that underlies
|
||||
* MathJax's internal format.
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* \mathtip{math}{tip} % use "tip" (in math mode) as tooltip for "math"
|
||||
* \texttip{math}{tip} % use "tip" (in text mode) as tooltip for "math"
|
||||
* \toggle{math1}{math2}...\endtoggle
|
||||
* % show math1, and when clicked, show math2, and so on.
|
||||
* % When the last one is clicked, go back to math1.
|
||||
*
|
||||
* ---------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2011 Design Science, Inc.
|
||||
*
|
||||
* 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["TeX/action"] = {
|
||||
version: "1.1",
|
||||
};
|
||||
|
||||
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||
var TEX = MathJax.InputJax.TeX,
|
||||
MML = MathJax.ElementJax.mml;
|
||||
|
||||
//
|
||||
// Set up control sequenecs
|
||||
//
|
||||
TEX.Definitions.macros.toggle = 'Toggle';
|
||||
TEX.Definitions.macros.mathtip = 'Mathtip';
|
||||
TEX.Definitions.macros.texttip = ['Macro','\\mathtip{#1}{\\text{#2}}',2];
|
||||
|
||||
TEX.Parse.Augment({
|
||||
|
||||
//
|
||||
// Implement \toggle {math1} {math2} ... \endtoggle
|
||||
// (as an <maction actiontype="toggle">)
|
||||
//
|
||||
Toggle: function (name) {
|
||||
var data = [], arg;
|
||||
while ((arg = this.GetArgument(name)) !== "\\endtoggle")
|
||||
{data.push(TEX.Parse(arg,this.stack.env).mml())}
|
||||
this.Push(MML.maction.apply(MML,data).With({actiontype: MML.ACTIONTYPE.TOGGLE}));
|
||||
},
|
||||
|
||||
//
|
||||
// Implement \mathtip{math}{tip}
|
||||
// (an an <maction actiontype="tooltip">)
|
||||
//
|
||||
Mathtip: function(name) {
|
||||
var arg = this.ParseArg(name), tip = this.ParseArg(name);
|
||||
this.Push(MML.maction(arg,tip).With({actiontype: MML.ACTIONTYPE.TOOLTIP}));
|
||||
}
|
||||
});
|
||||
|
||||
MathJax.Hub.Startup.signal.Post("TeX action Ready");
|
||||
|
||||
});
|
||||
|
||||
MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/action.js");
|
90
unpacked/extensions/TeX/bbox.js
Normal file
90
unpacked/extensions/TeX/bbox.js
Normal file
|
@ -0,0 +1,90 @@
|
|||
/*************************************************************
|
||||
*
|
||||
* MathJax/extensions/TeX/bbox.js
|
||||
*
|
||||
* This file implements the \bbox macro, which creates an box that
|
||||
* can be styled (for background colors, and so on). You can include
|
||||
* an optional dimension that tells how much extra padding to include
|
||||
* around the bounding box for the mathematics, or a color specification
|
||||
* for the background color to use, or both. E.g.,
|
||||
*
|
||||
* \bbox[2pt]{x+y} % an invisible box around x+y with 2pt of extra space
|
||||
* \bbox[green]{x+y} % a green box around x+y
|
||||
* \bbox[green,2pt]{x+y} % a green box with 2pt of extra space
|
||||
*
|
||||
* You can also specify style attributes, for example
|
||||
*
|
||||
* \bbox[red,border:3px solid blue,5px]{x+y}
|
||||
*
|
||||
* would give a red background with a 3px solid blue border that has 5px
|
||||
* of padding between the border and the mathematics. Note that not all
|
||||
* output formats support the style specifications. In particular, the
|
||||
* NativeMML output depends on the browser to render the attributes, and
|
||||
* not all MathML renderers will honor them (e.g., MathPlayer2 doesn't
|
||||
* render border styles).
|
||||
*
|
||||
* This file will be loaded automatically when \bbox is first used.
|
||||
*
|
||||
* ---------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2011 Design Science, Inc.
|
||||
*
|
||||
* 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["TeX/bbox"] = {
|
||||
version: "1.1"
|
||||
};
|
||||
|
||||
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||
|
||||
var TEX = MathJax.InputJax.TeX,
|
||||
MML = MathJax.ElementJax.mml;
|
||||
|
||||
TEX.Definitions.macros.bbox = "BBox";
|
||||
|
||||
TEX.Parse.Augment({
|
||||
BBox: function (name) {
|
||||
var bbox = this.GetBrackets(name),
|
||||
math = this.ParseArg(name);
|
||||
var parts = bbox.split(/,/), def, background, style;
|
||||
for (var i in parts) {
|
||||
var part = parts[i].replace(/^\s+/,'').replace(/\s+$/,'');
|
||||
var match = part.match(/^(\.\d+|\d+(\.\d*)?)(pt|em|ex|mu|px|in|cm|mm)$/);
|
||||
if (match) {
|
||||
var pad = match[1]+match[3];
|
||||
if (def) {TEX.Error("Padding specified twice in "+name)}
|
||||
def = {height:"+"+pad, depth:"+"+pad, lspace:pad, width:"+"+(2*match[1])+match[3]};
|
||||
} else if (part.match(/^([a-z0-9]+|\#[0-9a-f]{6}|\#[0-9a-f]{3})$/i)) {
|
||||
if (background) {TEX.Error("Background specified twice in "+name)}
|
||||
background = part;
|
||||
} else if (part.match(/^[-a-z]+:/i)) {
|
||||
if (style) {TEX.Error("Style specified twice in "+name)}
|
||||
style = part;
|
||||
} else if (part !== "") {
|
||||
TEX.Error("'"+part+"' doesn't look like a color, a padding dimension, or a style");
|
||||
}
|
||||
}
|
||||
if (def) {math = MML.mpadded(math).With(def)}
|
||||
if (background || style) {
|
||||
math = MML.mstyle(math).With({mathbackground:background, style:style});
|
||||
}
|
||||
this.Push(math);
|
||||
}
|
||||
});
|
||||
|
||||
MathJax.Hub.Startup.signal.Post("TeX bbox Ready");
|
||||
|
||||
});
|
||||
|
||||
MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/bbox.js");
|
293
unpacked/extensions/TeX/begingroup.js
Normal file
293
unpacked/extensions/TeX/begingroup.js
Normal file
|
@ -0,0 +1,293 @@
|
|||
/*************************************************************
|
||||
*
|
||||
* MathJax/extensions/TeX/begingroup.js
|
||||
*
|
||||
* Implements \begingroup and \endgroup commands that make local
|
||||
* definitions possible and are removed when the \endgroup occurs.
|
||||
*
|
||||
* ---------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2011 Design Science, Inc.
|
||||
*
|
||||
* 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.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||
var VERSION = "1.1.1";
|
||||
|
||||
var TEX = MathJax.InputJax.TeX,
|
||||
TEXDEF = TEX.Definitions;
|
||||
|
||||
/****************************************************/
|
||||
|
||||
//
|
||||
// A namespace for localizing macros and environments
|
||||
// (\begingroup and \endgroup create and destroy these)
|
||||
//
|
||||
var NSFRAME = MathJax.Object.Subclass({
|
||||
macros: null, // the local macro definitions
|
||||
environments: null, // the local environments
|
||||
Init: function (macros,environments) {
|
||||
this.macros = (macros || {});
|
||||
this.environments = (environments || {});
|
||||
},
|
||||
//
|
||||
// Find a macro or environment by name
|
||||
//
|
||||
Find: function (name,type) {if (this[type][name]) {return this[type][name]}},
|
||||
//
|
||||
// Define or remove a macro or environment
|
||||
//
|
||||
Def: function (name,value,type) {this[type][name] = value},
|
||||
Undef: function (name,type) {delete this[type][name]},
|
||||
//
|
||||
// Merge two namespaces (used when the equation namespace is combined with the root one)
|
||||
//
|
||||
Merge: function (frame) {
|
||||
MathJax.Hub.Insert(this.macros,frame.macros);
|
||||
MathJax.Hub.Insert(this.environments,frame.environments);
|
||||
},
|
||||
//
|
||||
// Move global macros to the stack (globally) and remove from the frame
|
||||
//
|
||||
MergeGlobals: function (stack) {
|
||||
var macros = this.macros;
|
||||
for (var cs in macros) {if (macros.hasOwnProperty(cs) && macros[cs].global) {
|
||||
stack.Def(cs,macros[cs],"macros",true);
|
||||
delete macros[cs].global; delete macros[cs];
|
||||
}}
|
||||
},
|
||||
//
|
||||
// Clear the macro and environment lists
|
||||
// (but not global macros unless "all" is true)
|
||||
//
|
||||
Clear: function (all) {
|
||||
this.environments = {};
|
||||
if (all) {this.macros = {}} else {
|
||||
var macros = this.macros;
|
||||
for (var cs in macros) {
|
||||
if (macros.hasOwnProperty(cs) && !macros[cs].global) {delete macros[cs]}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
/****************************************************/
|
||||
|
||||
//
|
||||
// A Stack of namespace frames
|
||||
//
|
||||
var NSSTACK = TEX.nsStack = MathJax.Object.Subclass({
|
||||
stack: null, // the namespace frames
|
||||
top: 0, // the current top one (we don't pop for real until the equation completes)
|
||||
isEqn: false, // true if this is the equation stack (not the global one)
|
||||
//
|
||||
// Set up the initial stack frame
|
||||
//
|
||||
Init: function (eqn) {
|
||||
this.isEqn = eqn; this.stack = [];
|
||||
if (!eqn) {this.Push(NSFRAME(TEXDEF.macros,TEXDEF.environments))}
|
||||
else {this.Push(NSFRAME())}
|
||||
},
|
||||
//
|
||||
// Define a macro or environment in the top frame
|
||||
//
|
||||
Def: function (name,value,type,global) {
|
||||
var n = this.top-1;
|
||||
if (global) {
|
||||
//
|
||||
// Define global macros in the base frame and remove that cs
|
||||
// from all other frames. Mark the global ones in equations
|
||||
// so they can be made global when merged with the root stack.
|
||||
//
|
||||
while (n > 0) {this.stack[n].Undef(name,type); n--}
|
||||
if (!(value instanceof Array)) {value = [value]}
|
||||
if (this.isEqn) {value.global = true}
|
||||
}
|
||||
this.stack[n].Def(name,value,type);
|
||||
},
|
||||
//
|
||||
// Push a new namespace frame on the stack
|
||||
//
|
||||
Push: function (frame) {
|
||||
this.stack.push(frame);
|
||||
this.top = this.stack.length;
|
||||
},
|
||||
//
|
||||
// Pop the top stack frame
|
||||
// (if it is the root, just keep track of the pop so we can
|
||||
// reset it if the equation is reprocessed)
|
||||
//
|
||||
Pop: function () {
|
||||
var top;
|
||||
if (this.top > 1) {
|
||||
top = this.stack[--this.top];
|
||||
if (this.isEqn) {this.stack.pop()}
|
||||
} else if (this.isEqn) {
|
||||
this.Clear();
|
||||
}
|
||||
return top;
|
||||
},
|
||||
//
|
||||
// Search the stack from top to bottom for the first
|
||||
// definition of the given control sequence in the given type
|
||||
//
|
||||
Find: function (name,type) {
|
||||
for (var i = this.top-1; i >= 0; i--) {
|
||||
var def = this.stack[i].Find(name,type);
|
||||
if (def) {return def}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
//
|
||||
// Combine the equation stack with the global one
|
||||
// (The bottom frame of the equation goes with the top frame of the global one,
|
||||
// and the remainder are pushed on the global stack, truncated to the
|
||||
// position where items were poped from it.)
|
||||
//
|
||||
Merge: function (stack) {
|
||||
stack.stack[0].MergeGlobals(this);
|
||||
this.stack[this.top-1].Merge(stack.stack[0]);
|
||||
var data = [this.top,this.stack.length-this.top].concat(stack.stack.slice(1));
|
||||
this.stack.splice.apply(this.stack,data);
|
||||
this.top = this.stack.length;
|
||||
},
|
||||
//
|
||||
// Put back the temporarily poped items
|
||||
//
|
||||
Reset: function () {this.top = this.stack.length},
|
||||
//
|
||||
// Clear the stack and start with a blank frame
|
||||
//
|
||||
Clear: function (all) {
|
||||
this.stack = [this.stack[0].Clear()];
|
||||
this.top = this.stack.length;
|
||||
}
|
||||
},{
|
||||
nsFrame: NSFRAME
|
||||
});
|
||||
|
||||
/****************************************************/
|
||||
|
||||
//
|
||||
// Define the new macros
|
||||
//
|
||||
TEXDEF.macros.begingroup = "BeginGroup";
|
||||
TEXDEF.macros.endgroup = "EndGroup";
|
||||
TEXDEF.macros.global = ["Extension","newcommand"];
|
||||
TEXDEF.macros.gdef = ["Extension","newcommand"];
|
||||
|
||||
TEX.Parse.Augment({
|
||||
//
|
||||
// Implement \begingroup
|
||||
//
|
||||
BeginGroup: function (name) {
|
||||
TEX.eqnStack.Push(NSFRAME());
|
||||
},
|
||||
//
|
||||
// Implements \endgroup
|
||||
//
|
||||
EndGroup: function (name) {
|
||||
//
|
||||
// If the equation has pushed frames, pop one,
|
||||
// Otherwise clear the equation stack and pop the top global one
|
||||
//
|
||||
if (TEX.eqnStack.top > 1) {
|
||||
TEX.eqnStack.Pop();
|
||||
} else if (TEX.rootStack.top === 1) {
|
||||
TEX.Error("Extra "+name+" or missing \\begingroup");
|
||||
} else {
|
||||
TEX.eqnStack.Clear();
|
||||
TEX.rootStack.Pop();
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Replace the original routines with ones that looks through the
|
||||
// equation and root stacks for the given name
|
||||
//
|
||||
csFindMacro: function (name) {
|
||||
return (TEX.eqnStack.Find(name,"macros") || TEX.rootStack.Find(name,"macros"));
|
||||
},
|
||||
envFindName: function (name) {
|
||||
return (TEX.eqnStack.Find(name,"environments") || TEX.rootStack.Find(name,"environments"));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/****************************************************/
|
||||
|
||||
TEX.rootStack = NSSTACK(); // the global namespace stack
|
||||
TEX.eqnStack = NSSTACK(true); // the equation stack
|
||||
|
||||
//
|
||||
// Reset the global stack and clear the equation stack
|
||||
// (this gets us back to the initial stack state as it was
|
||||
// before the equation was first processed, in case the equation
|
||||
// get restarted due to an autoloaded file)
|
||||
//
|
||||
TEX.prefilterHooks.Add(function () {TEX.rootStack.Reset(); TEX.eqnStack.Clear(true)});
|
||||
|
||||
//
|
||||
// We only get here if there were no errors and the equation is fully
|
||||
// processed (all restarts are complete). So we merge the equation
|
||||
// stack into the global stack, thus making the changes from this
|
||||
// equation permanent.
|
||||
//
|
||||
TEX.postfilterHooks.Add(function () {TEX.rootStack.Merge(TEX.eqnStack)});
|
||||
|
||||
/*********************************************************/
|
||||
|
||||
MathJax.Hub.Register.StartupHook("TeX newcommand Ready",function () {
|
||||
|
||||
//
|
||||
// Add the commands that depend on the newcommand code
|
||||
//
|
||||
TEXDEF.macros.global = "Global";
|
||||
TEXDEF.macros.gdef = ["Macro","\\global\\def"];
|
||||
|
||||
TEX.Parse.Augment({
|
||||
//
|
||||
// Modify the way macros and environments are defined
|
||||
// to make them go into the equation namespace stack
|
||||
//
|
||||
setDef: function (name,value) {
|
||||
value.isUser = true;
|
||||
TEX.eqnStack.Def(name,value,"macros",this.stack.env.isGlobal);
|
||||
delete this.stack.env.isGlobal;
|
||||
},
|
||||
setEnv: function (name,value) {
|
||||
value.isUser = true;
|
||||
TEX.eqnStack.Def(name,value,"environments")
|
||||
},
|
||||
|
||||
//
|
||||
// Implement \global (for \global\let, \global\def and \global\newcommand)
|
||||
//
|
||||
Global: function (name) {
|
||||
var i = this.i; var cs = this.GetCSname(name); this.i = i;
|
||||
if (cs !== "let" && cs !== "def" && cs !== "newcommand")
|
||||
{TEX.Error(name+" not followed by \\let, \\def, or \\newcommand")}
|
||||
this.stack.env.isGlobal = true;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
MathJax.Hub.Startup.signal.Post("TeX begingroup Ready");
|
||||
|
||||
});
|
||||
|
||||
MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/begingroup.js");
|
228
unpacked/extensions/TeX/color.js
Normal file
228
unpacked/extensions/TeX/color.js
Normal file
|
@ -0,0 +1,228 @@
|
|||
/*************************************************************
|
||||
*
|
||||
* MathJax/extensions/TeX/color.js
|
||||
*
|
||||
* Implements LaTeX-compatible \color macro rather than MathJax's
|
||||
* original (non-standard) version. It includes the rgb, gray, and
|
||||
* named color models, and the \definecolor macro.
|
||||
*
|
||||
* ---------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2011 Design Science, Inc.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//
|
||||
// The configuration defaults, augmented by the user settings
|
||||
//
|
||||
MathJax.Extension["TeX/color"] = {
|
||||
version: "1.1",
|
||||
|
||||
config: MathJax.Hub.CombineConfig("TeX.color",{
|
||||
padding: "5px",
|
||||
border: "2px"
|
||||
}),
|
||||
|
||||
colors: {
|
||||
Apricot: "#FBB982",
|
||||
Aquamarine: "#00B5BE",
|
||||
Bittersweet: "#C04F17",
|
||||
Black: "#221E1F",
|
||||
Blue: "#2D2F92",
|
||||
BlueGreen: "#00B3B8",
|
||||
BlueViolet: "#473992",
|
||||
BrickRed: "#B6321C",
|
||||
Brown: "#792500",
|
||||
BurntOrange: "#F7921D",
|
||||
CadetBlue: "#74729A",
|
||||
CarnationPink: "#F282B4",
|
||||
Cerulean: "#00A2E3",
|
||||
CornflowerBlue: "#41B0E4",
|
||||
Cyan: "#00AEEF",
|
||||
Dandelion: "#FDBC42",
|
||||
DarkOrchid: "#A4538A",
|
||||
Emerald: "#00A99D",
|
||||
ForestGreen: "#009B55",
|
||||
Fuchsia: "#8C368C",
|
||||
Goldenrod: "#FFDF42",
|
||||
Gray: "#949698",
|
||||
Green: "#00A64F",
|
||||
GreenYellow: "#DFE674",
|
||||
JungleGreen: "#00A99A",
|
||||
Lavender: "#F49EC4",
|
||||
LimeGreen: "#8DC73E",
|
||||
Magenta: "#EC008C",
|
||||
Mahogany: "#A9341F",
|
||||
Maroon: "#AF3235",
|
||||
Melon: "#F89E7B",
|
||||
MidnightBlue: "#006795",
|
||||
Mulberry: "#A93C93",
|
||||
NavyBlue: "#006EB8",
|
||||
OliveGreen: "#3C8031",
|
||||
Orange: "#F58137",
|
||||
OrangeRed: "#ED135A",
|
||||
Orchid: "#AF72B0",
|
||||
Peach: "#F7965A",
|
||||
Periwinkle: "#7977B8",
|
||||
PineGreen: "#008B72",
|
||||
Plum: "#92268F",
|
||||
ProcessBlue: "#00B0F0",
|
||||
Purple: "#99479B",
|
||||
RawSienna: "#974006",
|
||||
Red: "#ED1B23",
|
||||
RedOrange: "#F26035",
|
||||
RedViolet: "#A1246B",
|
||||
Rhodamine: "#EF559F",
|
||||
RoyalBlue: "#0071BC",
|
||||
RoyalPurple: "#613F99",
|
||||
RubineRed: "#ED017D",
|
||||
Salmon: "#F69289",
|
||||
SeaGreen: "#3FBC9D",
|
||||
Sepia: "#671800",
|
||||
SkyBlue: "#46C5DD",
|
||||
SpringGreen: "#C6DC67",
|
||||
Tan: "#DA9D76",
|
||||
TealBlue: "#00AEB3",
|
||||
Thistle: "#D883B7",
|
||||
Turquoise: "#00B4CE",
|
||||
Violet: "#58429B",
|
||||
VioletRed: "#EF58A0",
|
||||
White: "#FFFFFF",
|
||||
WildStrawberry: "#EE2967",
|
||||
Yellow: "#FFF200",
|
||||
YellowGreen: "#98CC70",
|
||||
YellowOrange: "#FAA21A"
|
||||
},
|
||||
|
||||
/*
|
||||
* Look up a color based on its model and definition
|
||||
*/
|
||||
getColor: function (model,def) {
|
||||
if (!model) {model = "named"}
|
||||
var fn = this["get_"+model];
|
||||
if (!fn) {this.TEX.Error("Color model '"+model+"' not defined")}
|
||||
return fn.call(this,def);
|
||||
},
|
||||
|
||||
/*
|
||||
* Get an RGB color
|
||||
*/
|
||||
get_rgb: function (rgb) {
|
||||
rgb = rgb.split(/,/); var RGB = "#";
|
||||
if (rgb.length !== 3) {this.TEX.Error("RGB colors require 3 decimal numbers")}
|
||||
for (var i = 0; i < 3; i++) {
|
||||
if (!rgb[i].match(/^(\d+(\.\d*)?|\.\d+)$/)) {this.TEX.Error("Invalid decimal number")}
|
||||
var n = parseFloat(rgb[i]);
|
||||
if (n < 0 || n > 1) {this.TEX.Error("RGB values must be between 0 and 1")}
|
||||
n = Math.floor(n*255).toString(16); if (n.length < 2) {n = "0"+n}
|
||||
RGB += n;
|
||||
}
|
||||
return RGB;
|
||||
},
|
||||
|
||||
/*
|
||||
* Get a gray-scale value
|
||||
*/
|
||||
get_gray: function (gray) {
|
||||
if (!gray.match(/^(\d+(\.\d*)?|\.\d+)$/)) {this.TEX.Error("Invalid decimal number")}
|
||||
var n = parseFloat(gray);
|
||||
if (n < 0 || n > 1) {this.TEX.Error("Grey-scale values must be between 0 and 1")}
|
||||
n = Math.floor(n*255).toString(16); if (n.length < 2) {n = "0"+n}
|
||||
return "#"+n+n+n;
|
||||
},
|
||||
|
||||
/*
|
||||
* Get a named value
|
||||
*/
|
||||
get_named: function (name) {
|
||||
if (this.colors[name]) {return this.colors[name]}
|
||||
return name;
|
||||
},
|
||||
|
||||
padding: function () {
|
||||
var pad = "+"+this.config.padding;
|
||||
var unit = this.config.padding.replace(/^.*?([a-z]*)$/,"$1");
|
||||
var pad2 = "+"+(2*parseFloat(pad))+unit;
|
||||
return {width:pad2, height:pad, depth:pad, lspace:this.config.padding};
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||
var TEX = MathJax.InputJax.TeX,
|
||||
MML = MathJax.ElementJax.mml;
|
||||
var STACKITEM = TEX.Stack.Item;
|
||||
var COLOR = MathJax.Extension["TeX/color"];
|
||||
|
||||
COLOR.TEX = TEX; // for reference in getColor above
|
||||
|
||||
TEX.Definitions.macros.definecolor = "DefineColor";
|
||||
TEX.Definitions.macros.colorbox = "ColorBox";
|
||||
TEX.Definitions.macros.fcolorbox = "fColorBox";
|
||||
|
||||
TEX.Parse.Augment({
|
||||
|
||||
//
|
||||
// Override \color macro definition
|
||||
//
|
||||
Color: function (name) {
|
||||
var model = this.GetBrackets(name),
|
||||
color = this.GetArgument(name);
|
||||
color = COLOR.getColor(model,color);
|
||||
var mml = STACKITEM.style().With({styles:{mathcolor:color}});
|
||||
this.stack.env.color = color;
|
||||
this.Push(mml);
|
||||
},
|
||||
|
||||
//
|
||||
// Define the \definecolor macro
|
||||
//
|
||||
DefineColor: function (name) {
|
||||
var cname = this.GetArgument(name),
|
||||
model = this.GetArgument(name),
|
||||
def = this.GetArgument(name);
|
||||
COLOR.colors[cname] = COLOR.getColor(model,def);
|
||||
},
|
||||
|
||||
//
|
||||
// Produce a text box with a colored background
|
||||
//
|
||||
ColorBox: function (name) {
|
||||
var cname = this.GetArgument(name),
|
||||
arg = this.InternalMath(this.GetArgument(name));
|
||||
this.Push(MML.mpadded.apply(MML,arg).With({
|
||||
mathbackground:COLOR.getColor("named",cname)
|
||||
}).With(COLOR.padding()));
|
||||
},
|
||||
|
||||
//
|
||||
// Procude a framed text box with a colored background
|
||||
//
|
||||
fColorBox: function (name) {
|
||||
var fname = this.GetArgument(name),
|
||||
cname = this.GetArgument(name),
|
||||
arg = this.InternalMath(this.GetArgument(name));
|
||||
this.Push(MML.mpadded.apply(MML,arg).With({
|
||||
mathbackground: COLOR.getColor("named",cname),
|
||||
style: "border: "+COLOR.config.border+" solid "+COLOR.getColor("named",fname)
|
||||
}).With(COLOR.padding()));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
MathJax.Hub.Startup.signal.Post("TeX color Ready");
|
||||
|
||||
});
|
||||
|
||||
MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/color.js");
|
84
unpacked/extensions/TeX/extpfeil.js
Normal file
84
unpacked/extensions/TeX/extpfeil.js
Normal file
|
@ -0,0 +1,84 @@
|
|||
/*************************************************************
|
||||
*
|
||||
* MathJax/extensions/TeX/extpfeil.js
|
||||
*
|
||||
* Implements additional stretchy arrow macros.
|
||||
*
|
||||
* ---------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2011 Design Science, Inc.
|
||||
*
|
||||
* 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.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||
var VERSION = "1.1";
|
||||
|
||||
var TEX = MathJax.InputJax.TeX,
|
||||
TEXDEF = TEX.Definitions;
|
||||
|
||||
//
|
||||
// Define the arrows to load the AMSmath extension
|
||||
// (since they need its xArrow method)
|
||||
//
|
||||
MathJax.Hub.Insert(TEXDEF,{
|
||||
macros: {
|
||||
xtwoheadrightarrow: ['Extension','AMSmath'],
|
||||
xtwoheadleftarrow: ['Extension','AMSmath'],
|
||||
xmapsto: ['Extension','AMSmath'],
|
||||
xlongequal: ['Extension','AMSmath'],
|
||||
xtofrom: ['Extension','AMSmath'],
|
||||
Newextarrow: ['Extension','AMSmath']
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
// Redefine the macros when AMSmath is loaded
|
||||
//
|
||||
MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () {
|
||||
MathJax.Hub.Insert(TEXDEF,{
|
||||
macros: {
|
||||
xtwoheadrightarrow: ['xArrow',0x21A0,12,16],
|
||||
xtwoheadleftarrow: ['xArrow',0x219E,17,13],
|
||||
xmapsto: ['xArrow',0x21A6,6,7],
|
||||
xlongequal: ['xArrow',0x003D,7,7],
|
||||
xtofrom: ['xArrow',0x21C4,12,12],
|
||||
Newextarrow: 'NewExtArrow'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//
|
||||
// Implements \Newextarrow to define a new arrow (not compatible with \newextarrow, but
|
||||
// the equivalent for MathJax)
|
||||
//
|
||||
TEX.Parse.Augment({
|
||||
NewExtArrow: function (name) {
|
||||
var cs = this.GetArgument(name),
|
||||
space = this.GetArgument(name),
|
||||
chr = this.GetArgument(name);
|
||||
if (!cs.match(/^\\([a-z]+|.)$/i))
|
||||
{TEX.Error("First argument to "+name+" must be a control sequence name")}
|
||||
if (!space.match(/^(\d+),(\d+)$/))
|
||||
{TEX.Error("Second argument to "+name+" must be two integers separated by a comma")}
|
||||
if (!chr.match(/^(\d+|0x[0-9A-F]+)$/i))
|
||||
{TEX.Error("Third argument to "+name+" must be a unicode character number")}
|
||||
cs = cs.substr(1); space = space.split(","); chr = parseInt(chr);
|
||||
TEXDEF.macros[cs] = ['xArrow',chr,parseInt(space[0]),parseInt(space[1])];
|
||||
}
|
||||
});
|
||||
|
||||
MathJax.Hub.Startup.signal.Post("TeX extpfeil Ready");
|
||||
});
|
||||
|
||||
MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/extpfeil.js");
|
410
unpacked/extensions/TeX/mhchem.js
Normal file
410
unpacked/extensions/TeX/mhchem.js
Normal file
|
@ -0,0 +1,410 @@
|
|||
/*************************************************************
|
||||
*
|
||||
* MathJax/extensions/TeX/mhchem.js
|
||||
*
|
||||
* Implements the \ce command for handling chemical formulas
|
||||
* from the mhchem LaTeX package.
|
||||
*
|
||||
* ---------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2011 Design Science, Inc.
|
||||
*
|
||||
* 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.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||
var VERSION = "1.1.1";
|
||||
|
||||
var TEX = MathJax.InputJax.TeX,
|
||||
MACROS = TEX.Definitions.macros;
|
||||
|
||||
/*
|
||||
* This is the main class for handing the \ce and related commands.
|
||||
* Its main method is Parse() which takes the argument to \ce and
|
||||
* returns the corresponding TeX string.
|
||||
*/
|
||||
|
||||
var CE = MathJax.Object.Subclass({
|
||||
string: "", // the \ce string being parsed
|
||||
i: 0, // the current position in the string
|
||||
tex: "", // the processed TeX result
|
||||
atom: false, // last processed token is an atom
|
||||
sup: "", // pending superscript
|
||||
sub: "", // pending subscript
|
||||
|
||||
//
|
||||
// Store the string when a CE object is created
|
||||
//
|
||||
Init: function (string) {this.string = string},
|
||||
|
||||
//
|
||||
// These are the special characters and the methods that
|
||||
// handle them. All others are passed through verbatim.
|
||||
//
|
||||
ParseTable: {
|
||||
'-': "Minus",
|
||||
'+': "Plus",
|
||||
'(': "Open",
|
||||
')': "Close",
|
||||
'[': "Open",
|
||||
']': "Close",
|
||||
'<': "Less",
|
||||
'^': "Superscript",
|
||||
'_': "Subscript",
|
||||
'*': "Dot",
|
||||
'.': "Dot",
|
||||
'=': "Equal",
|
||||
'#': "Pound",
|
||||
'$': "Math",
|
||||
'\\': "Macro",
|
||||
' ': "Space"
|
||||
},
|
||||
//
|
||||
// Basic arrow names for reactions
|
||||
//
|
||||
Arrows: {
|
||||
'->': "rightarrow",
|
||||
'<-': "leftarrow",
|
||||
'<->': "leftrightarrow",
|
||||
'<=>': "rightleftharpoons",
|
||||
'<=>>': "Rightleftharpoons",
|
||||
'^': "uparrow",
|
||||
'v': "downarrow"
|
||||
},
|
||||
|
||||
//
|
||||
// Implementations for the various bonds
|
||||
// (the ~ ones are hacks that don't work well in NativeMML)
|
||||
//
|
||||
Bonds: {
|
||||
'-': "-",
|
||||
'=': "=",
|
||||
'#': "\\equiv",
|
||||
'~': "\\tripledash",
|
||||
'~-': "\\begin{CEstack}{}\\tripledash\\\\-\\end{CEstack}",
|
||||
'~=': "\\raise2mu{\\begin{CEstack}{}\\tripledash\\\\-\\\\-\\end{CEstack}}",
|
||||
'~--': "\\raise2mu{\\begin{CEstack}{}\\tripledash\\\\-\\\\-\\end{CEstack}}",
|
||||
'-~-': "\\raise2mu{\\begin{CEstack}{}-\\\\\\tripledash\\\\-\\end{CEstack}}",
|
||||
'...': "{\\cdot}{\\cdot}{\\cdot}",
|
||||
'....': "{\\cdot}{\\cdot}{\\cdot}{\\cdot}",
|
||||
'->': "\\rightarrow",
|
||||
'<-': "\\leftarrow",
|
||||
'??': "\\text{??}" // unknown bond
|
||||
},
|
||||
|
||||
//
|
||||
// This converts the CE string to a TeX string.
|
||||
// It loops through the string and calls the proper
|
||||
// method depending on the ccurrent character.
|
||||
//
|
||||
Parse: function () {
|
||||
this.tex = ""; this.atom = false;
|
||||
while (this.i < this.string.length) {
|
||||
var c = this.string.charAt(this.i);
|
||||
if (c.match(/[a-z]/i)) {this.ParseLetter()}
|
||||
else if (c.match(/[0-9]/)) {this.ParseNumber()}
|
||||
else {this["Parse"+(this.ParseTable[c]||"Other")](c)}
|
||||
}
|
||||
this.FinishAtom();
|
||||
return this.tex;
|
||||
},
|
||||
|
||||
//
|
||||
// Make an atom name or a down arrow
|
||||
//
|
||||
ParseLetter: function () {
|
||||
this.FinishAtom();
|
||||
if (this.Match(/^v( |$)/)) {
|
||||
this.tex += "{\\"+this.Arrows["v"]+"}";
|
||||
} else {
|
||||
this.tex += "\\text{"+this.Match(/^[a-z]+/i)+"}";
|
||||
this.atom = true;
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Make a number of fraction preceeding an atom,
|
||||
// or a subscript for an atom.
|
||||
//
|
||||
ParseNumber: function () {
|
||||
var n = this.Match(/^\d+/);
|
||||
if (this.atom && !this.sub) {
|
||||
this.sub = n;
|
||||
} else {
|
||||
this.FinishAtom();
|
||||
var match = this.Match(/^\/\d+/);
|
||||
if (match) {
|
||||
var frac = "\\frac{"+n+"}{"+match.substr(1)+"}";
|
||||
this.tex += "\\mathchoice{\\textstyle"+frac+"}{"+frac+"}{"+frac+"}{"+frac+"}";
|
||||
} else {
|
||||
this.tex += n;
|
||||
if (this.i < this.string.length) {this.tex += "\\,"}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Make a superscript minus, or an arrow, or a single bond.
|
||||
//
|
||||
ParseMinus: function (c) {
|
||||
if (this.atom && (this.i === this.string.length-1 || this.string.charAt(this.i+1) === " ")) {
|
||||
this.sup += c;
|
||||
} else {
|
||||
this.FinishAtom();
|
||||
if (this.string.substr(this.i,2) === "->") {this.i += 2; this.AddArrow("->"); return}
|
||||
else {this.tex += "{-}"}
|
||||
}
|
||||
this.i++;
|
||||
},
|
||||
|
||||
//
|
||||
// Make a superscript plus, or pass it through
|
||||
//
|
||||
ParsePlus: function (c) {
|
||||
if (this.atom) {this.sup += c} else {this.FinishAtom(); this.tex += c}
|
||||
this.i++;
|
||||
},
|
||||
|
||||
//
|
||||
// Handle dots and double or triple bonds
|
||||
//
|
||||
ParseDot: function (c) {this.FinishAtom(); this.tex += "\\cdot "; this.i++},
|
||||
ParseEqual: function (c) {this.FinishAtom(); this.tex += "{=}"; this.i++},
|
||||
ParsePound: function (c) {this.FinishAtom(); this.tex += "{\\equiv}"; this.i++},
|
||||
|
||||
//
|
||||
// Look for (v) or (^), or pass it through
|
||||
//
|
||||
ParseOpen: function (c) {
|
||||
this.FinishAtom();
|
||||
var match = this.Match(/^\([v^]\)/);
|
||||
if (match) {this.tex += "{\\"+this.Arrows[match.charAt(1)]+"}"}
|
||||
else {this.tex += "{"+c; this.i++}
|
||||
},
|
||||
//
|
||||
// Allow ) and ] to get super- and subscripts
|
||||
//
|
||||
ParseClose: function (c) {this.FinishAtom(); this.atom = true; this.tex += c+"}"; this.i++},
|
||||
|
||||
//
|
||||
// Make the proper arrow
|
||||
//
|
||||
ParseLess: function (c) {
|
||||
this.FinishAtom();
|
||||
var arrow = this.Match(/^(<->?|<=>>?)/);
|
||||
if (!arrow) {this.tex += c; this.i++} else {this.AddArrow(arrow)}
|
||||
},
|
||||
|
||||
//
|
||||
// Look for a superscript, or an up arrow
|
||||
//
|
||||
ParseSuperscript: function (c) {
|
||||
c = this.string.charAt(++this.i);
|
||||
if (c === "{") {
|
||||
this.i++; var m = this.Find("}");
|
||||
if (m === "-.") {this.sup += "{-}{\\cdot}"} else if (m) {this.sup += CE(m).Parse()}
|
||||
} else if (c === " " || c === "") {
|
||||
this.tex += "{\\"+this.Arrows["^"]+"}"; this.i++;
|
||||
} else {
|
||||
var n = this.Match(/^(\d+|-\.)/);
|
||||
if (n) {this.sup += n}
|
||||
}
|
||||
},
|
||||
//
|
||||
// Look for subscripts
|
||||
//
|
||||
ParseSubscript: function (c) {
|
||||
if (this.string.charAt(++this.i) == "{") {
|
||||
this.i++; this.sub += CE(this.Find("}")).Parse();
|
||||
} else {
|
||||
var n = this.Match(/^\d+/);
|
||||
if (n) {this.sub += n}
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Look for raw TeX code to include
|
||||
//
|
||||
ParseMath: function (c) {
|
||||
this.FinishAtom();
|
||||
this.i++; this.tex += this.Find(c);
|
||||
},
|
||||
|
||||
//
|
||||
// Look for specific macros for bonds
|
||||
// and allow \} to have subscripts
|
||||
//
|
||||
ParseMacro: function (c) {
|
||||
this.FinishAtom();
|
||||
this.i++; var match = this.Match(/^([a-z]+|.)/i)||" ";
|
||||
if (match === "sbond") {this.tex += "{-}"}
|
||||
else if (match === "dbond") {this.tex += "{=}"}
|
||||
else if (match === "tbond") {this.tex += "{\\equiv}"}
|
||||
else if (match === "bond") {
|
||||
var bond = (this.Match(/^\{.*?\}/)||"");
|
||||
bond = bond.substr(1,bond.length-2);
|
||||
this.tex += "{"+(this.Bonds[bond]||"\\text{??}")+"}";
|
||||
}
|
||||
else if (match === "{") {this.tex += "{\\{"}
|
||||
else if (match === "}") {this.tex += "\\}}"; this.atom = true}
|
||||
else {this.tex += c+match}
|
||||
},
|
||||
|
||||
//
|
||||
// Ignore spaces
|
||||
//
|
||||
ParseSpace: function (c) {this.FinishAtom(); this.i++},
|
||||
|
||||
//
|
||||
// Pass anything else on verbatim
|
||||
//
|
||||
ParseOther: function (c) {this.FinishAtom(); this.tex += c; this.i++},
|
||||
|
||||
//
|
||||
// Process an arrow (looking for brackets for above and below)
|
||||
//
|
||||
AddArrow: function (arrow) {
|
||||
var c = this.Match(/^[CT]\[/);
|
||||
if (c) {this.i--; c = c.charAt(0)}
|
||||
var above = this.GetBracket(c), below = this.GetBracket(c);
|
||||
arrow = this.Arrows[arrow];
|
||||
if (above || below) {
|
||||
if (below) {arrow += "["+below+"]"}
|
||||
arrow += "{"+above+"}";
|
||||
arrow = "\\mathrel{\\x"+arrow+"}";
|
||||
} else {
|
||||
arrow = "\\long"+arrow+" ";
|
||||
}
|
||||
this.tex += arrow;
|
||||
},
|
||||
|
||||
//
|
||||
// Handle the super and subscripts for an atom
|
||||
//
|
||||
FinishAtom: function () {
|
||||
if (this.sup || this.sub) {
|
||||
if (this.sup && this.sub && !this.atom) {
|
||||
//
|
||||
// right-justify super- and subscripts when they are before the atom
|
||||
//
|
||||
var n = Math.abs(this.sup.length-this.sub.length);
|
||||
if (n) {
|
||||
var zeros = "0000000000".substr(0,n);
|
||||
var script = (this.sup.length > this.sub.length ? "sub" : "sup");
|
||||
this[script] = "\\phantom{"+zeros+"}" + this[script];
|
||||
}
|
||||
}
|
||||
if (!this.sup) {this.sup = "\\Space{0pt}{0pt}{.2em}"} // forces subscripts to align properly
|
||||
this.tex += "^{"+this.sup+"}_{"+this.sub+"}";
|
||||
this.sup = this.sub = "";
|
||||
}
|
||||
this.atom = false;
|
||||
},
|
||||
|
||||
//
|
||||
// Find a bracket group and handle C and T prefixes
|
||||
//
|
||||
GetBracket: function (c) {
|
||||
if (this.string.charAt(this.i) !== "[") {return ""}
|
||||
this.i++; var bracket = this.Find("]");
|
||||
if (c === "C") {bracket = "\\ce{"+bracket+"}"} else
|
||||
if (c === "T") {
|
||||
if (!bracket.match(/^\{.*\}$/)) {bracket = "{"+bracket+"}"}
|
||||
bracket = "\\text"+bracket;
|
||||
};
|
||||
return bracket;
|
||||
},
|
||||
|
||||
//
|
||||
// Check if the string matches a regular expression
|
||||
// and move past it if so, returning the match
|
||||
//
|
||||
Match: function (regex) {
|
||||
var match = regex.exec(this.string.substr(this.i));
|
||||
if (match) {match = match[0]; this.i += match.length}
|
||||
return match;
|
||||
},
|
||||
|
||||
//
|
||||
// Find a particular character, skipping over braced groups
|
||||
//
|
||||
Find: function (c) {
|
||||
var m = this.string.length, i = this.i, braces = 0;
|
||||
while (this.i < m) {
|
||||
var C = this.string.charAt(this.i++);
|
||||
if (C === c && braces === 0) {return this.string.substr(i,this.i-i-1)}
|
||||
if (C === "{") {braces++} else
|
||||
if (C === "}") {
|
||||
if (braces) {braces--}
|
||||
else {TEX.Error("Extra close brace or missing open brace")}
|
||||
}
|
||||
}
|
||||
if (braces) {TEX.Error("Missing close brace")};
|
||||
TEX.Error("Can't find closing "+c);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
//
|
||||
// Set up the macros for chemistry
|
||||
//
|
||||
MACROS.ce = 'CE';
|
||||
MACROS.cf = 'CE';
|
||||
MACROS.cee = 'CE';
|
||||
|
||||
//
|
||||
// Include some missing arrows (some are hacks)
|
||||
//
|
||||
MACROS.xleftrightarrow = ['xArrow',0x2194,6,6];
|
||||
MACROS.xrightleftharpoons = ['xArrow',0x21CC,5,7]; // FIXME: doesn't stretch in HTML-CSS output
|
||||
MACROS.xRightleftharpoons = ['xArrow',0x21CC,5,7]; // FIXME: how should this be handled?
|
||||
|
||||
// FIXME: These don't work well in FF NativeMML mode
|
||||
MACROS.longrightleftharpoons = ["Macro","\\stackrel{\\textstyle{{-}\\!\\!{\\rightharpoonup}}}{\\smash{{\\leftharpoondown}\\!\\!{-}}}"];
|
||||
MACROS.longRightleftharpoons = ["Macro","\\stackrel{\\textstyle{-}\\!\\!{\\rightharpoonup}}{\\small\\smash\\leftharpoondown}"];
|
||||
|
||||
//
|
||||
// Needed for \bond for the ~ forms
|
||||
//
|
||||
MACROS.tripledash = ["Macro","\\raise3mu{\\tiny\\text{-}\\kern2mu\\text{-}\\kern2mu\\text{-}}"];
|
||||
TEX.Definitions.environment.CEstack = ['Array',null,null,null,'r',null,"0.001em",'T',1]
|
||||
|
||||
//
|
||||
// Add \hyphen used in some mhchem examples
|
||||
//
|
||||
MACROS.hyphen = ["Macro","\\text{-}"];
|
||||
|
||||
TEX.Parse.Augment({
|
||||
|
||||
//
|
||||
// Implements \ce and friends
|
||||
//
|
||||
CE: function (name) {
|
||||
var arg = this.GetArgument(name);
|
||||
var tex = CE(arg).Parse();
|
||||
this.string = tex + this.string.substr(this.i); this.i = 0;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//
|
||||
// Indicate that the extension is ready
|
||||
//
|
||||
MathJax.Hub.Startup.signal.Post("TeX mhchem Ready");
|
||||
|
||||
});
|
||||
|
||||
MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mhchem.js");
|
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* ---------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2009 Design Science, Inc.
|
||||
* Copyright (c) 2009-2011 Design Science, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -23,19 +23,21 @@
|
|||
*/
|
||||
|
||||
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||
var VERSION = "1.1";
|
||||
var VERSION = "1.1.2";
|
||||
|
||||
var TEX = MathJax.InputJax.TeX;
|
||||
var TEXDEF = TEX.Definitions;
|
||||
|
||||
MathJax.Hub.Insert(TEXDEF,{
|
||||
TEXDEF.Add({
|
||||
macros: {
|
||||
newcommand: 'NewCommand',
|
||||
renewcommand: 'NewCommand',
|
||||
newenvironment: 'NewEnvironment',
|
||||
def: 'MacroDef'
|
||||
newcommand: 'NewCommand',
|
||||
renewcommand: 'NewCommand',
|
||||
newenvironment: 'NewEnvironment',
|
||||
renewenvironment: 'NewEnvironment',
|
||||
def: 'MacroDef',
|
||||
let: 'Let'
|
||||
}
|
||||
})
|
||||
},null,true);
|
||||
|
||||
TEX.Parse.Augment({
|
||||
|
||||
|
@ -50,7 +52,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
if (cs.charAt(0) === "\\") {cs = cs.substr(1)}
|
||||
if (!cs.match(/^(.|[a-z]+)$/i)) {TEX.Error("Illegal control sequence name for "+name)}
|
||||
if (n != null && !n.match(/^[0-9]+$/)) {TEX.Error("Illegal number of parameters specified in "+name)}
|
||||
TEXDEF.macros[cs] = ['Macro',def,n];
|
||||
this.setDef(cs,['Macro',def,n]);
|
||||
},
|
||||
|
||||
/*
|
||||
|
@ -63,7 +65,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
edef = this.GetArgument(name);
|
||||
if (n === '') {n = null}
|
||||
if (n != null && !n.match(/^[0-9]+$/)) {TEX.Error("Illegal number of parameters specified in "+name)}
|
||||
TEXDEF.environment[env] = ['BeginEnv','EndEnv',bdef,edef,n];
|
||||
this.setEnv(env,['BeginEnv','EndEnv',bdef,edef,n]);
|
||||
},
|
||||
|
||||
/*
|
||||
|
@ -73,10 +75,46 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
var cs = this.GetCSname(name),
|
||||
params = this.GetTemplate(name,"\\"+cs),
|
||||
def = this.GetArgument(name);
|
||||
if (!(params instanceof Array)) {TEXDEF.macros[cs] = ['Macro',def,params]}
|
||||
else {TEXDEF.macros[cs] = ['MacroWithTemplate',def,params[0],params[1]]}
|
||||
if (!(params instanceof Array)) {this.setDef(cs,['Macro',def,params])}
|
||||
else {this.setDef(cs,['MacroWithTemplate',def].concat(params))}
|
||||
},
|
||||
|
||||
/*
|
||||
* Implements the \let command
|
||||
*/
|
||||
Let: function (name) {
|
||||
var cs = this.GetCSname(name), macro;
|
||||
var c = this.GetNext(); if (c === "=") {this.i++; c = this.GetNext()}
|
||||
//
|
||||
// All \let commands create entries in the macros array, but we
|
||||
// have to look in the various mathchar and delimiter arrays if
|
||||
// the source isn't a macro already, and attach the data to a
|
||||
// macro with the proper routine to process it.
|
||||
//
|
||||
// A command of the form \let\cs=char produces a macro equivalent
|
||||
// to \def\cs{char}, which is as close as MathJax can get for this.
|
||||
// So \let\bgroup={ is possible, but doesn't work as it does in TeX.
|
||||
//
|
||||
if (c === "\\") {
|
||||
name = this.GetCSname(name);
|
||||
macro = this.csFindMacro(name);
|
||||
if (!macro) {
|
||||
if (TEXDEF.mathchar0mi[name]) {macro = ["csMathchar0mi",TEXDEF.mathchar0mi[name]]} else
|
||||
if (TEXDEF.mathchar0mo[name]) {macro = ["csMathchar0mo",TEXDEF.mathchar0mo[name]]} else
|
||||
if (TEXDEF.mathchar7[name]) {macro = ["csMathchar7",TEXDEF.mathchar7[name]]} else
|
||||
if (TEXDEF.delimiter["\\"+name] != null) {macro = ["csDelimiter",TEXDEF.delimiter["\\"+name]]}
|
||||
}
|
||||
} else {macro = ["Macro",c]; this.i++}
|
||||
this.setDef(cs,macro);
|
||||
},
|
||||
|
||||
/*
|
||||
* Routines to set the macro and environment definitions
|
||||
* (overridden by begingroup to make localized versions)
|
||||
*/
|
||||
setDef: function (name,value) {value.isUser = true; TEXDEF.macros[name] = value},
|
||||
setEnv: function (name,value) {value.isUser = true; TEXDEF.environment[name] = value},
|
||||
|
||||
/*
|
||||
* Get a CS name or give an error
|
||||
*/
|
||||
|
@ -181,6 +219,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
|
||||
TEX.Environment = function (name) {
|
||||
TEXDEF.environment[name] = ['BeginEnv','EndEnv'].concat([].slice.call(arguments,1));
|
||||
TEXDEF.environment[name].isUser = true;
|
||||
}
|
||||
|
||||
MathJax.Hub.Startup.signal.Post("TeX newcommand Ready");
|
||||
|
|
|
@ -56,6 +56,8 @@ MathJax.Extension.tex2jax = {
|
|||
processEnvironments: true, // set to true to process \begin{xxx}...\end{xxx} outside
|
||||
// of math mode, false to prevent that
|
||||
|
||||
processRefs: true, // set to true to process \ref{...} outside of math mode
|
||||
|
||||
preview: "TeX" // set to "none" to not insert MathJax_Preview spans
|
||||
// or set to an array specifying an HTML snippet
|
||||
// to use the same preview for every equation.
|
||||
|
@ -96,9 +98,10 @@ MathJax.Extension.tex2jax = {
|
|||
};
|
||||
}
|
||||
this.start = new RegExp(
|
||||
starts.sort(this.sortLength).join("|") +
|
||||
(config.processEnvironments ? "|\\\\begin\\{([^}]*)\\}" : "") +
|
||||
(config.processEscapes ? "|\\\\*\\\\\\\$" : ""), "g"
|
||||
starts.sort(this.sortLength).join("|") +
|
||||
(config.processEnvironments ? "|\\\\begin\\{([^}]*)\\}" : "") +
|
||||
(config.processEscapes ? "|\\\\*\\\\\\\$" : "") +
|
||||
(config.processRefs ? "|\\\\(eq)?ref\\{[^}]*\\}" : ""), "g"
|
||||
);
|
||||
this.skipTags = new RegExp("^("+config.skipTags.join("|")+")$","i");
|
||||
this.ignoreClass = new RegExp("(^| )("+config.ignoreClass+")( |$)");
|
||||
|
@ -174,6 +177,12 @@ MathJax.Extension.tex2jax = {
|
|||
isBeginEnd: true
|
||||
};
|
||||
this.switchPattern(this.endPattern(this.search.end));
|
||||
} else if (match[0].substr(0,4) === "\\ref" || match[0].substr(0,6) === "\\eqref") {
|
||||
this.search = {
|
||||
mode: "", end: "", open: element,
|
||||
olen: 0, opos: this.pattern.lastIndex - match[0].length,
|
||||
}
|
||||
return this.endMatch([""],element);
|
||||
} else { // escaped dollar signs
|
||||
// put $ in a span so it doesn't get processed again
|
||||
// split off backslashes so they don't get removed later
|
||||
|
|
|
@ -27,7 +27,7 @@ MathJax.ElementJax.mml = MathJax.ElementJax({
|
|||
mimeType: "jax/mml"
|
||||
},{
|
||||
id: "mml",
|
||||
version: "1.1.3",
|
||||
version: "1.1.4",
|
||||
directory: MathJax.ElementJax.directory + "/mml",
|
||||
extensionDir: MathJax.ElementJax.extensionDir + "/mml",
|
||||
optableDir: MathJax.ElementJax.directory + "/mml/optable"
|
||||
|
@ -218,6 +218,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
noInheritAttribute: {
|
||||
texClass: true
|
||||
},
|
||||
linebreakContainer: FALSE,
|
||||
|
||||
Init: function () {
|
||||
this.data = [];
|
||||
|
@ -346,16 +347,23 @@ MathJax.ElementJax.mml.Augment({
|
|||
isEmbellished: function () {return FALSE},
|
||||
Core: function () {return this},
|
||||
CoreMO: function () {return this},
|
||||
lineBreak: function () {
|
||||
lineBreak: function () { // FIXME: should be removed (and from elements below) when SVG is converted to new linebreak style
|
||||
if (this.isEmbellished()) {return this.CoreMO().lineBreak()} else {return "none"}
|
||||
},
|
||||
hasNewline: function () {
|
||||
if (this.isEmbellished()) {return this.CoreMO().hasNewline()}
|
||||
if (this.isToken || this.linebreakContainer) {return FALSE}
|
||||
for (var i = 0, m = this.data.length; i < m; i++) {
|
||||
if (this.data[i] && this.data[i].hasNewline()) {return TRUE}
|
||||
}
|
||||
return FALSE;
|
||||
},
|
||||
array: function () {if (this.inferred) {return this.data} else {return [this]}},
|
||||
toString: function () {return this.type+"("+this.data.join(",")+")"}
|
||||
},{
|
||||
childrenSpacelike: function () {
|
||||
for (var i = 0; i < this.data.length; i++) {
|
||||
if (!this.data[i].isSpacelike()) {return FALSE}
|
||||
}
|
||||
for (var i = 0, m = this.data.length; i < m; i++)
|
||||
{if (!this.data[i].isSpacelike()) {return FALSE}}
|
||||
return TRUE;
|
||||
},
|
||||
childEmbellished: function () {
|
||||
|
@ -536,6 +544,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
return MML.FORM.INFIX;
|
||||
},
|
||||
isEmbellished: function () {return TRUE},
|
||||
hasNewline: function () {return (this.Get("linebreak") === MML.LINEBREAK.NEWLINE)},
|
||||
lineBreak: function () {
|
||||
var values = this.getValues("linebreak","linebreakstyle");
|
||||
if (values.linebreak === MML.LINEBREAK.NEWLINE) {
|
||||
|
@ -592,6 +601,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
depth: "0ex",
|
||||
linebreak: MML.LINEBREAK.AUTO
|
||||
},
|
||||
hasNewline: function () {return (this.Get("linebreak") === MML.LINEBREAK.NEWLINE)},
|
||||
lineBreak: function () {
|
||||
return (this.Get("linebreak") === MML.LINEBREAK.NEWLINE ?
|
||||
MML.LINEBREAKSTYLE.AFTER : "none");
|
||||
|
@ -678,6 +688,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
|
||||
MML.mfrac = MML.mbase.Subclass({
|
||||
type: "mfrac", num: 0, den: 1,
|
||||
linebreakContainer: TRUE,
|
||||
texClass: MML.TEXCLASS.INNER,
|
||||
isEmbellished: MML.mbase.childEmbellished,
|
||||
Core: MML.mbase.childCore,
|
||||
|
@ -706,6 +717,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
MML.msqrt = MML.mbase.Subclass({
|
||||
type: "msqrt",
|
||||
inferRow: TRUE,
|
||||
linebreakContainer: TRUE,
|
||||
texClass: MML.TEXCLASS.ORD,
|
||||
setTeXclass: MML.mbase.setSeparateTeXclasses,
|
||||
adjustChild_texprimestyle: function (n) {return TRUE}
|
||||
|
@ -713,6 +725,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
|
||||
MML.mroot = MML.mbase.Subclass({
|
||||
type: "mroot",
|
||||
linebreakContainer: TRUE,
|
||||
texClass: MML.TEXCLASS.ORD,
|
||||
adjustChild_displaystyle: function (n) {
|
||||
if (n === 1) {return FALSE}
|
||||
|
@ -770,6 +783,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
MML.merror = MML.mbase.Subclass({
|
||||
type: "merror",
|
||||
inferRow: TRUE,
|
||||
linebreakContainer: TRUE,
|
||||
texClass: MML.TEXCLASS.ORD
|
||||
});
|
||||
|
||||
|
@ -855,6 +869,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
MML.menclose = MML.mbase.Subclass({
|
||||
type: "menclose",
|
||||
inferRow: TRUE,
|
||||
linebreakContainer: TRUE,
|
||||
defaults: {
|
||||
mathbackground: MML.INHERIT,
|
||||
mathcolor: MML.INHERIT,
|
||||
|
@ -866,6 +881,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
|
||||
MML.msubsup = MML.mbase.Subclass({
|
||||
type: "msubsup", base: 0, sub: 1, sup: 2,
|
||||
linebreakContainer: TRUE,
|
||||
isEmbellished: MML.mbase.childEmbellished,
|
||||
Core: MML.mbase.childCore,
|
||||
CoreMO: MML.mbase.childCoreMO,
|
||||
|
@ -913,6 +929,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
type: "munderover",
|
||||
base: 0, under: 1, over: 2, sub: 1, sup: 2,
|
||||
ACCENTS: ["", "accentunder", "accent"],
|
||||
linebreakContainer: TRUE,
|
||||
isEmbellished: MML.mbase.childEmbellished,
|
||||
Core: MML.mbase.childCore,
|
||||
CoreMO: MML.mbase.childCoreMO,
|
||||
|
@ -992,6 +1009,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
side: TRUE, minlabelspacing: TRUE, texClass: TRUE, useHeight: 1
|
||||
}
|
||||
},
|
||||
linebreakContainer: TRUE,
|
||||
Append: function () {
|
||||
for (var i = 0, m = arguments.length; i < m; i++) {
|
||||
if (!((arguments[i] instanceof MML.mtr) ||
|
||||
|
@ -1016,6 +1034,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
mrow: {rowalign: TRUE, columnalign: TRUE, groupalign: TRUE},
|
||||
mtable: {rowalign: TRUE, columnalign: TRUE, groupalign: TRUE}
|
||||
},
|
||||
linebreakContainer: TRUE,
|
||||
Append: function () {
|
||||
for (var i = 0, m = arguments.length; i < m; i++) {
|
||||
if (!(arguments[i] instanceof MML.mtd)) {arguments[i] = MML.mtd(arguments[i])}
|
||||
|
@ -1028,6 +1047,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
MML.mtd = MML.mbase.Subclass({
|
||||
type: "mtd",
|
||||
inferRow: TRUE,
|
||||
linebreakContainer: TRUE,
|
||||
isEmbellished: MML.mbase.childEmbellished,
|
||||
Core: MML.mbase.childCore,
|
||||
CoreMO: MML.mbase.childCoreMO,
|
||||
|
@ -1101,6 +1121,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
});
|
||||
MML.annotation = MML.mbase.Subclass({
|
||||
type: "annotation", isToken: TRUE,
|
||||
linebreakContainer: TRUE,
|
||||
defaults: {
|
||||
definitionURL: null,
|
||||
encoding: null,
|
||||
|
@ -1146,6 +1167,8 @@ MathJax.ElementJax.mml.Augment({
|
|||
indentalign: MML.INDENTALIGN.AUTO,
|
||||
indentalignfirst: MML.INDENTALIGN.INDENTALIGN,
|
||||
indentshiftfirst: MML.INDENTSHIFT.INDENTSHIFT,
|
||||
indentalignlast: MML.INDENTALIGN.INDENTALIGN,
|
||||
indentshiftlast: MML.INDENTSHIFT.INDENTSHIFT,
|
||||
decimalseparator: ".",
|
||||
texprimestyle: FALSE // is it in TeX's C' style?
|
||||
},
|
||||
|
@ -1153,6 +1176,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
if (name === "displaystyle") {return this.Get("display") === "block"}
|
||||
return "";
|
||||
},
|
||||
linebreakContainer: TRUE,
|
||||
setTeXclass: MML.mbase.setChildTeXclass
|
||||
});
|
||||
|
||||
|
@ -1250,13 +1274,15 @@ MathJax.ElementJax.mml.Augment({
|
|||
BIN3: [3,3,TEXCLASS.BIN],
|
||||
BIN4: [4,4,TEXCLASS.BIN],
|
||||
BIN01: [0,1,TEXCLASS.BIN],
|
||||
BIN5: [5,5,TEXCLASS.BIN],
|
||||
TALLBIN: [4,4,TEXCLASS.BIN,{stretchy: true}],
|
||||
BINOP: [4,4,TEXCLASS.BIN,{largeop: true, movablelimits: true}],
|
||||
REL: [5,5,TEXCLASS.REL],
|
||||
REL1: [1,1,TEXCLASS.REL,{stretchy: true}],
|
||||
REL4: [4,4,TEXCLASS.REL],
|
||||
WIDEREL: [5,5,TEXCLASS.REL,{stretchy: true}],
|
||||
RELACCENT: [5,5,TEXCLASS.REL,{accent: true, stretchy: true}],
|
||||
RELSTRETCH: [5,5,TEXCLASS.REL,{stretchy: true}],
|
||||
RELACCENT: [5,5,TEXCLASS.REL,{accent: true}],
|
||||
WIDEREL: [5,5,TEXCLASS.REL,{accent: true, stretchy: true}],
|
||||
OPEN: [0,0,TEXCLASS.OPEN,{fence: true, stretchy: true, symmetric: true}],
|
||||
CLOSE: [0,0,TEXCLASS.CLOSE,{fence: true, stretchy: true, symmetric: true}],
|
||||
INNER: [0,0,TEXCLASS.INNER],
|
||||
|
@ -1296,17 +1322,15 @@ MathJax.ElementJax.mml.Augment({
|
|||
[0x25A0,0x25FF,TEXCLASS.ORD,"GeometricShapes"],
|
||||
[0x2700,0x27BF,TEXCLASS.ORD,"Dingbats"],
|
||||
[0x27C0,0x27EF,TEXCLASS.ORD,"MiscMathSymbolsA"],
|
||||
[0x27F0,0x27FF,TEXCLASS.REL,"SupplementalArrowsA"],
|
||||
[0x2900,0x297F,TEXCLASS.REL,"SupplementalArrowsB"],
|
||||
[0x2980,0x29FF,TEXCLASS.ORD,"MiscMathSymbolsB"],
|
||||
[0x2A00,0x2AFF,TEXCLASS.BIN,"SuppMathOperators"],
|
||||
[0x2B00,0x2BFF,TEXCLASS.ORD],
|
||||
[0x2B00,0x2BFF,TEXCLASS.ORD,"MiscSymbolsAndArrows"],
|
||||
[0x1D400,0x1D7FF,TEXCLASS.ORD]
|
||||
],
|
||||
OPTABLE: {
|
||||
prefix: {
|
||||
'\u2111': MO.ORD11, // black-letter capital i
|
||||
'\u2113': MO.ORD11, // script small l
|
||||
'\u211C': MO.ORD11, // black-letter capital r
|
||||
'\u2200': MO.ORD21, // for all
|
||||
'\u2202': MO.ORD21, // partial differential
|
||||
'\u2203': MO.ORD21, // there exists
|
||||
|
@ -1327,6 +1351,7 @@ MathJax.ElementJax.mml.Augment({
|
|||
'\u2308': MO.OPEN, // left ceiling
|
||||
'\u230A': MO.OPEN, // left floor
|
||||
'\u27E8': MO.OPEN, // mathematical left angle bracket
|
||||
'\u27EE': MO.OPEN, // mathematical left flattened parenthesis
|
||||
'\u2A00': MO.OP, // n-ary circled dot operator
|
||||
'\u2A01': MO.OP, // n-ary circled plus operator
|
||||
'\u2A02': MO.OP, // n-ary circled times operator
|
||||
|
@ -1354,12 +1379,16 @@ MathJax.ElementJax.mml.Augment({
|
|||
'\u266E': MO.ORD02, // music natural sign
|
||||
'\u266F': MO.ORD02, // music sharp sign
|
||||
'\u27E9': MO.CLOSE, // mathematical right angle bracket
|
||||
'\u27EF': MO.CLOSE, // mathematical right flattened parenthesis
|
||||
'\u02C6': MO.WIDEACCENT, // modifier letter circumflex accent
|
||||
'\u02C7': MO.WIDEACCENT, // caron
|
||||
'\u02C9': MO.WIDEACCENT, // modifier letter macron
|
||||
'\u02CA': MO.ACCENT, // modifier letter acute accent
|
||||
'\u02CB': MO.ACCENT, // modifier letter grave accent
|
||||
'\u02D8': MO.ACCENT, // breve
|
||||
'\u02D9': MO.ACCENT, // dot above
|
||||
'\u02DC': MO.WIDEACCENT, // small tilde
|
||||
'\u0302': MO.ACCENT, // combining circumflex accent
|
||||
'\u0302': MO.WIDEACCENT, // combining circumflex accent
|
||||
'\u00A8': MO.ACCENT, // diaeresis
|
||||
'\u00AF': MO.WIDEACCENT, // macron
|
||||
')': MO.CLOSE, // right parenthesis
|
||||
|
@ -1372,38 +1401,39 @@ MathJax.ElementJax.mml.Augment({
|
|||
'~': MO.WIDEACCENT // tilde
|
||||
},
|
||||
infix: {
|
||||
'': MO.ORD, // empty <mo>
|
||||
'%': [3,3,TEXCLASS.ORD], // percent sign
|
||||
'\u2022': MO.BIN4, // bullet
|
||||
'\u2026': MO.INNER, // horizontal ellipsis
|
||||
'\u2044': MO.TALLBIN, // fraction slash
|
||||
'\u2061': MO.ORD, // function application
|
||||
'\u2062': MO.ORD, // invisible times
|
||||
'\u2063': [0,0,TEXCLASS.ORD,{separator: true}], // invisible separator
|
||||
'\u2063': [0,0,TEXCLASS.ORD,{linebreakstyle:"after", separator: true}], // invisible separator
|
||||
'\u2064': MO.ORD, // invisible plus
|
||||
'\u2190': MO.RELACCENT, // leftwards arrow
|
||||
'\u2191': MO.WIDEREL, // upwards arrow
|
||||
'\u2192': MO.RELACCENT, // rightwards arrow
|
||||
'\u2193': MO.WIDEREL, // downwards arrow
|
||||
'\u2194': MO.RELACCENT, // left right arrow
|
||||
'\u2195': MO.WIDEREL, // up down arrow
|
||||
'\u2196': MO.WIDEREL, // north west arrow
|
||||
'\u2197': MO.WIDEREL, // north east arrow
|
||||
'\u2198': MO.WIDEREL, // south east arrow
|
||||
'\u2199': MO.WIDEREL, // south west arrow
|
||||
'\u2190': MO.WIDEREL, // leftwards arrow
|
||||
'\u2191': MO.RELSTRETCH, // upwards arrow
|
||||
'\u2192': MO.WIDEREL, // rightwards arrow
|
||||
'\u2193': MO.RELSTRETCH, // downwards arrow
|
||||
'\u2194': MO.WIDEREL, // left right arrow
|
||||
'\u2195': MO.RELSTRETCH, // up down arrow
|
||||
'\u2196': MO.RELSTRETCH, // north west arrow
|
||||
'\u2197': MO.RELSTRETCH, // north east arrow
|
||||
'\u2198': MO.RELSTRETCH, // south east arrow
|
||||
'\u2199': MO.RELSTRETCH, // south west arrow
|
||||
'\u21A6': MO.WIDEREL, // rightwards arrow from bar
|
||||
'\u21A9': MO.WIDEREL, // leftwards arrow with hook
|
||||
'\u21AA': MO.WIDEREL, // rightwards arrow with hook
|
||||
'\u21BC': MO.RELACCENT, // leftwards harpoon with barb upwards
|
||||
'\u21BC': MO.WIDEREL, // leftwards harpoon with barb upwards
|
||||
'\u21BD': MO.WIDEREL, // leftwards harpoon with barb downwards
|
||||
'\u21C0': MO.RELACCENT, // rightwards harpoon with barb upwards
|
||||
'\u21C0': MO.WIDEREL, // rightwards harpoon with barb upwards
|
||||
'\u21C1': MO.WIDEREL, // rightwards harpoon with barb downwards
|
||||
'\u21CC': MO.WIDEREL, // rightwards harpoon over leftwards harpoon
|
||||
'\u21D0': MO.WIDEREL, // leftwards double arrow
|
||||
'\u21D1': MO.WIDEREL, // upwards double arrow
|
||||
'\u21D1': MO.RELSTRETCH, // upwards double arrow
|
||||
'\u21D2': MO.WIDEREL, // rightwards double arrow
|
||||
'\u21D3': MO.WIDEREL, // downwards double arrow
|
||||
'\u21D3': MO.RELSTRETCH, // downwards double arrow
|
||||
'\u21D4': MO.WIDEREL, // left right double arrow
|
||||
'\u21D5': MO.WIDEREL, // up down double arrow
|
||||
'\u21D5': MO.RELSTRETCH, // up down double arrow
|
||||
'\u2208': MO.REL, // element of
|
||||
'\u2209': MO.REL, // not an element of
|
||||
'\u220B': MO.REL, // contains as member
|
||||
|
@ -1462,20 +1492,20 @@ MathJax.ElementJax.mml.Augment({
|
|||
'\u22EE': MO.ORD55, // vertical ellipsis
|
||||
'\u22EF': MO.INNER, // midline horizontal ellipsis
|
||||
'\u22F1': [5,5,TEXCLASS.INNER], // down right diagonal ellipsis
|
||||
'\u2500': [0,0,TEXCLASS.ORD,{stretchy: true}], // box drawings light horizontal
|
||||
'\u25B3': MO.BIN4, // white up-pointing triangle
|
||||
'\u25B5': MO.BIN4, // white up-pointing small triangle
|
||||
'\u25B9': MO.BIN4, // white right-pointing small triangle
|
||||
'\u25BD': MO.BIN4, // white down-pointing triangle
|
||||
'\u25BF': MO.BIN4, // white down-pointing small triangle
|
||||
'\u25C3': MO.BIN4, // white left-pointing small triangle
|
||||
'\u2758': [4,4,TEXCLASS.REL,{fence: true, stretchy: true, symmetric: true}], // light vertical bar
|
||||
'\u27F5': MO.REL1, // long leftwards arrow
|
||||
'\u27F6': MO.REL1, // long rightwards arrow
|
||||
'\u27F7': MO.REL1, // long left right arrow
|
||||
'\u27F8': MO.REL1, // long leftwards double arrow
|
||||
'\u27F9': MO.REL1, // long rightwards double arrow
|
||||
'\u27FA': MO.REL1, // long left right double arrow
|
||||
'\u2758': MO.REL, // light vertical bar
|
||||
'\u27F5': MO.WIDEREL, // long leftwards arrow
|
||||
'\u27F6': MO.WIDEREL, // long rightwards arrow
|
||||
'\u27F7': MO.WIDEREL, // long left right arrow
|
||||
'\u27F8': MO.WIDEREL, // long leftwards double arrow
|
||||
'\u27F9': MO.WIDEREL, // long rightwards double arrow
|
||||
'\u27FA': MO.WIDEREL, // long left right double arrow
|
||||
'\u27FC': MO.WIDEREL, // long rightwards arrow from bar
|
||||
'\u2A2F': MO.BIN4, // vector or cross product
|
||||
'\u2A3F': MO.BIN4, // amalgamation or coproduct
|
||||
'\u2AAF': MO.REL, // precedes above single-line equals sign
|
||||
|
@ -1486,26 +1516,24 @@ MathJax.ElementJax.mml.Augment({
|
|||
'\u00F7': MO.BIN4, // division sign
|
||||
'*': MO.BIN3, // asterisk
|
||||
'+': MO.BIN4, // plus sign
|
||||
',': [0,3,TEXCLASS.PUNCT,{separator: true}], // comma
|
||||
',': [0,3,TEXCLASS.PUNCT,{linebreakstyle:"after", separator: true}], // comma
|
||||
'-': MO.BIN4, // hyphen-minus
|
||||
'.': [3,3,TEXCLASS.ORD], // full stop
|
||||
'/': MO.ORD11, // solidus
|
||||
':': [1,2,TEXCLASS.REL], // colon
|
||||
';': [0,3,TEXCLASS.PUNCT,{separator: true}], // semicolon
|
||||
';': [0,3,TEXCLASS.PUNCT,{linebreakstyle:"after", separator: true}], // semicolon
|
||||
'<': MO.REL, // less-than sign
|
||||
'=': MO.REL, // equals sign
|
||||
'>': MO.REL, // greater-than sign
|
||||
'?': [1,1,TEXCLASS.CLOSE], // question mark
|
||||
'\\': MO.ORD, // reverse solidus
|
||||
'^': MO.ORD11, // circumflex accent
|
||||
'_': MO.ORD11, // low line
|
||||
'|': [2,2,TEXCLASS.ORD,{fence: true, stretchy: true, symmetric: true}], // vertical line
|
||||
'#': MO.ORD, // #
|
||||
'$': MO.ORD, // $
|
||||
'\u002E': [0,3,TEXCLASS.PUNCT,{separator: true}], // \ldotp
|
||||
'\u02B9': MO.ORD, // prime
|
||||
'\u02C9': MO.ACCENT, // \bar
|
||||
'\u02CA': MO.ACCENT, // \acute
|
||||
'\u02CB': MO.ACCENT, // \grave
|
||||
'\u0300': MO.ACCENT, // \grave
|
||||
'\u0301': MO.ACCENT, // \acute
|
||||
'\u0303': MO.WIDEACCENT, // \tilde
|
||||
|
@ -1521,7 +1549,10 @@ MathJax.ElementJax.mml.Augment({
|
|||
'\u2020': MO.BIN3, // \dagger
|
||||
'\u2021': MO.BIN3, // \ddagger
|
||||
'\u20D7': MO.ACCENT, // \vec
|
||||
'\u2111': MO.ORD, // \Im
|
||||
'\u2113': MO.ORD, // \ell
|
||||
'\u2118': MO.ORD, // \wp
|
||||
'\u211C': MO.ORD, // \Re
|
||||
'\u2205': MO.ORD, // \emptyset
|
||||
'\u221E': MO.ORD, // \infty
|
||||
'\u2305': MO.BIN3, // barwedge
|
||||
|
@ -1534,14 +1565,12 @@ MathJax.ElementJax.mml.Augment({
|
|||
'\u23AF': [0,0,TEXCLASS.ORD,{stretchy: true}], // \underline
|
||||
'\u23B0': MO.OPEN, // \lmoustache
|
||||
'\u23B1': MO.CLOSE, // \rmoustache
|
||||
'\u2500': MO.ORD, // horizontal line
|
||||
'\u25EF': MO.BIN3, // \bigcirc
|
||||
'\u2660': MO.ORD, // \spadesuit
|
||||
'\u2661': MO.ORD, // \heartsuit
|
||||
'\u2662': MO.ORD, // \diamondsuit
|
||||
'\u2663': MO.ORD, // \clubsuit
|
||||
'\u27EE': MO.OPEN, // \lgroup
|
||||
'\u27EF': MO.CLOSE, // \rgroup
|
||||
'\u27FC': MO.REL4, // \longmapsto
|
||||
'\u3008': MO.OPEN, // langle
|
||||
'\u3009': MO.CLOSE, // rangle
|
||||
'\uFE37': MO.WIDEACCENT, // horizontal brace down
|
||||
|
|
|
@ -25,56 +25,56 @@
|
|||
MathJax.Hub.Insert(MML.mo.prototype,{
|
||||
OPTABLE: {
|
||||
infix: {
|
||||
'\u219A': MO.REL, // leftwards arrow with stroke
|
||||
'\u219B': MO.REL, // rightwards arrow with stroke
|
||||
'\u219A': MO.RELACCENT, // leftwards arrow with stroke
|
||||
'\u219B': MO.RELACCENT, // rightwards arrow with stroke
|
||||
'\u219C': MO.WIDEREL, // leftwards wave arrow
|
||||
'\u219D': MO.WIDEREL, // rightwards wave arrow
|
||||
'\u219E': MO.WIDEREL, // leftwards two headed arrow
|
||||
'\u219F': MO.WIDEREL, // upwards two headed arrow
|
||||
'\u21A0': MO.WIDEREL, // rightwards two headed arrow
|
||||
'\u21A1': MO.WIDEREL, // downwards two headed arrow
|
||||
'\u21A1': MO.RELSTRETCH, // downwards two headed arrow
|
||||
'\u21A2': MO.WIDEREL, // leftwards arrow with tail
|
||||
'\u21A3': MO.WIDEREL, // rightwards arrow with tail
|
||||
'\u21A4': MO.WIDEREL, // leftwards arrow from bar
|
||||
'\u21A5': MO.WIDEREL, // upwards arrow from bar
|
||||
'\u21A7': MO.WIDEREL, // downwards arrow from bar
|
||||
'\u21A8': MO.WIDEREL, // up down arrow with base
|
||||
'\u21A5': MO.RELSTRETCH, // upwards arrow from bar
|
||||
'\u21A7': MO.RELSTRETCH, // downwards arrow from bar
|
||||
'\u21A8': MO.RELSTRETCH, // up down arrow with base
|
||||
'\u21AB': MO.WIDEREL, // leftwards arrow with loop
|
||||
'\u21AC': MO.WIDEREL, // rightwards arrow with loop
|
||||
'\u21AD': MO.WIDEREL, // left right wave arrow
|
||||
'\u21AE': MO.REL, // left right arrow with stroke
|
||||
'\u21AF': MO.WIDEREL, // downwards zigzag arrow
|
||||
'\u21B0': MO.WIDEREL, // upwards arrow with tip leftwards
|
||||
'\u21B1': MO.WIDEREL, // upwards arrow with tip rightwards
|
||||
'\u21B2': MO.WIDEREL, // downwards arrow with tip leftwards
|
||||
'\u21B3': MO.WIDEREL, // downwards arrow with tip rightwards
|
||||
'\u21B4': MO.WIDEREL, // rightwards arrow with corner downwards
|
||||
'\u21B5': MO.WIDEREL, // downwards arrow with corner leftwards
|
||||
'\u21B6': MO.REL, // anticlockwise top semicircle arrow
|
||||
'\u21B7': MO.REL, // clockwise top semicircle arrow
|
||||
'\u21AE': MO.RELACCENT, // left right arrow with stroke
|
||||
'\u21AF': MO.RELSTRETCH, // downwards zigzag arrow
|
||||
'\u21B0': MO.RELSTRETCH, // upwards arrow with tip leftwards
|
||||
'\u21B1': MO.RELSTRETCH, // upwards arrow with tip rightwards
|
||||
'\u21B2': MO.RELSTRETCH, // downwards arrow with tip leftwards
|
||||
'\u21B3': MO.RELSTRETCH, // downwards arrow with tip rightwards
|
||||
'\u21B4': MO.RELSTRETCH, // rightwards arrow with corner downwards
|
||||
'\u21B5': MO.RELSTRETCH, // downwards arrow with corner leftwards
|
||||
'\u21B6': MO.RELACCENT, // anticlockwise top semicircle arrow
|
||||
'\u21B7': MO.RELACCENT, // clockwise top semicircle arrow
|
||||
'\u21B8': MO.REL, // north west arrow to long bar
|
||||
'\u21B9': MO.WIDEREL, // leftwards arrow to bar over rightwards arrow to bar
|
||||
'\u21BA': MO.REL, // anticlockwise open circle arrow
|
||||
'\u21BB': MO.REL, // clockwise open circle arrow
|
||||
'\u21BE': MO.WIDEREL, // upwards harpoon with barb rightwards
|
||||
'\u21BF': MO.WIDEREL, // upwards harpoon with barb leftwards
|
||||
'\u21C2': MO.WIDEREL, // downwards harpoon with barb rightwards
|
||||
'\u21C3': MO.WIDEREL, // downwards harpoon with barb leftwards
|
||||
'\u21BE': MO.RELSTRETCH, // upwards harpoon with barb rightwards
|
||||
'\u21BF': MO.RELSTRETCH, // upwards harpoon with barb leftwards
|
||||
'\u21C2': MO.RELSTRETCH, // downwards harpoon with barb rightwards
|
||||
'\u21C3': MO.RELSTRETCH, // downwards harpoon with barb leftwards
|
||||
'\u21C4': MO.WIDEREL, // rightwards arrow over leftwards arrow
|
||||
'\u21C5': MO.WIDEREL, // upwards arrow leftwards of downwards arrow
|
||||
'\u21C5': MO.RELSTRETCH, // upwards arrow leftwards of downwards arrow
|
||||
'\u21C6': MO.WIDEREL, // leftwards arrow over rightwards arrow
|
||||
'\u21C7': MO.WIDEREL, // leftwards paired arrows
|
||||
'\u21C8': MO.WIDEREL, // upwards paired arrows
|
||||
'\u21C8': MO.RELSTRETCH, // upwards paired arrows
|
||||
'\u21C9': MO.WIDEREL, // rightwards paired arrows
|
||||
'\u21CA': MO.WIDEREL, // downwards paired arrows
|
||||
'\u21CA': MO.RELSTRETCH, // downwards paired arrows
|
||||
'\u21CB': MO.WIDEREL, // leftwards harpoon over rightwards harpoon
|
||||
'\u21CD': MO.REL, // leftwards double arrow with stroke
|
||||
'\u21CE': MO.REL, // left right double arrow with stroke
|
||||
'\u21CF': MO.REL, // rightwards double arrow with stroke
|
||||
'\u21D6': MO.WIDEREL, // north west double arrow
|
||||
'\u21D7': MO.WIDEREL, // north east double arrow
|
||||
'\u21D8': MO.WIDEREL, // south east double arrow
|
||||
'\u21D9': MO.WIDEREL, // south west double arrow
|
||||
'\u21CD': MO.RELACCENT, // leftwards double arrow with stroke
|
||||
'\u21CE': MO.RELACCENT, // left right double arrow with stroke
|
||||
'\u21CF': MO.RELACCENT, // rightwards double arrow with stroke
|
||||
'\u21D6': MO.RELSTRETCH, // north west double arrow
|
||||
'\u21D7': MO.RELSTRETCH, // north east double arrow
|
||||
'\u21D8': MO.RELSTRETCH, // south east double arrow
|
||||
'\u21D9': MO.RELSTRETCH, // south west double arrow
|
||||
'\u21DA': MO.WIDEREL, // leftwards triple arrow
|
||||
'\u21DB': MO.WIDEREL, // rightwards triple arrow
|
||||
'\u21DC': MO.WIDEREL, // leftwards squiggle arrow
|
||||
|
@ -82,34 +82,34 @@
|
|||
'\u21DE': MO.REL, // upwards arrow with double stroke
|
||||
'\u21DF': MO.REL, // downwards arrow with double stroke
|
||||
'\u21E0': MO.WIDEREL, // leftwards dashed arrow
|
||||
'\u21E1': MO.WIDEREL, // upwards dashed arrow
|
||||
'\u21E1': MO.RELSTRETCH, // upwards dashed arrow
|
||||
'\u21E2': MO.WIDEREL, // rightwards dashed arrow
|
||||
'\u21E3': MO.WIDEREL, // downwards dashed arrow
|
||||
'\u21E3': MO.RELSTRETCH, // downwards dashed arrow
|
||||
'\u21E4': MO.WIDEREL, // leftwards arrow to bar
|
||||
'\u21E5': MO.WIDEREL, // rightwards arrow to bar
|
||||
'\u21E6': MO.WIDEREL, // leftwards white arrow
|
||||
'\u21E7': MO.WIDEREL, // upwards white arrow
|
||||
'\u21E7': MO.RELSTRETCH, // upwards white arrow
|
||||
'\u21E8': MO.WIDEREL, // rightwards white arrow
|
||||
'\u21E9': MO.WIDEREL, // downwards white arrow
|
||||
'\u21EA': MO.WIDEREL, // upwards white arrow from bar
|
||||
'\u21EB': MO.WIDEREL, // upwards white arrow on pedestal
|
||||
'\u21EC': MO.WIDEREL, // upwards white arrow on pedestal with horizontal bar
|
||||
'\u21ED': MO.WIDEREL, // upwards white arrow on pedestal with vertical bar
|
||||
'\u21EE': MO.WIDEREL, // upwards white double arrow
|
||||
'\u21EF': MO.WIDEREL, // upwards white double arrow on pedestal
|
||||
'\u21E9': MO.RELSTRETCH, // downwards white arrow
|
||||
'\u21EA': MO.RELSTRETCH, // upwards white arrow from bar
|
||||
'\u21EB': MO.RELSTRETCH, // upwards white arrow on pedestal
|
||||
'\u21EC': MO.RELSTRETCH, // upwards white arrow on pedestal with horizontal bar
|
||||
'\u21ED': MO.RELSTRETCH, // upwards white arrow on pedestal with vertical bar
|
||||
'\u21EE': MO.RELSTRETCH, // upwards white double arrow
|
||||
'\u21EF': MO.RELSTRETCH, // upwards white double arrow on pedestal
|
||||
'\u21F0': MO.WIDEREL, // rightwards white arrow from wall
|
||||
'\u21F1': MO.REL, // north west arrow to corner
|
||||
'\u21F2': MO.REL, // south east arrow to corner
|
||||
'\u21F3': MO.WIDEREL, // up down white arrow
|
||||
'\u21F4': MO.REL, // right arrow with small circle
|
||||
'\u21F5': MO.WIDEREL, // downwards arrow leftwards of upwards arrow
|
||||
'\u21F3': MO.RELSTRETCH, // up down white arrow
|
||||
'\u21F4': MO.RELACCENT, // right arrow with small circle
|
||||
'\u21F5': MO.RELSTRETCH, // downwards arrow leftwards of upwards arrow
|
||||
'\u21F6': MO.WIDEREL, // three rightwards arrows
|
||||
'\u21F7': MO.REL, // leftwards arrow with vertical stroke
|
||||
'\u21F8': MO.REL, // rightwards arrow with vertical stroke
|
||||
'\u21F9': MO.REL, // left right arrow with vertical stroke
|
||||
'\u21FA': MO.REL, // leftwards arrow with double vertical stroke
|
||||
'\u21FB': MO.REL, // rightwards arrow with double vertical stroke
|
||||
'\u21FC': MO.REL, // left right arrow with double vertical stroke
|
||||
'\u21F7': MO.RELACCENT, // leftwards arrow with vertical stroke
|
||||
'\u21F8': MO.RELACCENT, // rightwards arrow with vertical stroke
|
||||
'\u21F9': MO.RELACCENT, // left right arrow with vertical stroke
|
||||
'\u21FA': MO.RELACCENT, // leftwards arrow with double vertical stroke
|
||||
'\u21FB': MO.RELACCENT, // rightwards arrow with double vertical stroke
|
||||
'\u21FC': MO.RELACCENT, // left right arrow with double vertical stroke
|
||||
'\u21FD': MO.WIDEREL, // leftwards open-headed arrow
|
||||
'\u21FE': MO.WIDEREL, // rightwards open-headed arrow
|
||||
'\u21FF': MO.WIDEREL // left right open-headed arrow
|
||||
|
|
|
@ -24,13 +24,19 @@
|
|||
|
||||
MathJax.Hub.Insert(MML.mo.prototype,{
|
||||
OPTABLE: {
|
||||
prefix: {
|
||||
'||': [0,0,TEXCLASS.BIN,{fence: true, stretchy: true, symmetric: true}], // multiple character operator: ||
|
||||
'|||': [0,0,TEXCLASS.ORD,{fence: true, stretchy: true, symmetric: true}] // multiple character operator: |||
|
||||
},
|
||||
postfix: {
|
||||
'!!': [1,0,TEXCLASS.BIN], // multiple character operator: !!
|
||||
'\'': MO.ACCENT, // apostrophe
|
||||
'++': [0,0,TEXCLASS.BIN], // multiple character operator: ++
|
||||
'--': [0,0,TEXCLASS.BIN], // multiple character operator: --
|
||||
'..': [0,0,TEXCLASS.BIN], // multiple character operator: ..
|
||||
'...': MO.ORD // multiple character operator: ...
|
||||
'...': MO.ORD, // multiple character operator: ...
|
||||
'||': [0,0,TEXCLASS.BIN,{fence: true, stretchy: true, symmetric: true}], // multiple character operator: ||
|
||||
'|||': [0,0,TEXCLASS.ORD,{fence: true, stretchy: true, symmetric: true}] // multiple character operator: |||
|
||||
},
|
||||
infix: {
|
||||
'!=': MO.BIN4, // multiple character operator: !=
|
||||
|
@ -39,16 +45,17 @@
|
|||
'*=': MO.BIN4, // multiple character operator: *=
|
||||
'+=': MO.BIN4, // multiple character operator: +=
|
||||
'-=': MO.BIN4, // multiple character operator: -=
|
||||
'->': MO.BIN4, // multiple character operator: ->
|
||||
'//': MO.BIN4, // multiple character operator: //
|
||||
'->': MO.BIN5, // multiple character operator: ->
|
||||
'//': [1,1,TEXCLASS.BIN], // multiple character operator: //
|
||||
'/=': MO.BIN4, // multiple character operator: /=
|
||||
':=': MO.BIN4, // multiple character operator: :=
|
||||
'<=': MO.BIN4, // multiple character operator: <=
|
||||
'<=': MO.BIN5, // multiple character operator: <=
|
||||
'<>': [1,1,TEXCLASS.BIN], // multiple character operator: <>
|
||||
'==': MO.BIN4, // multiple character operator: ==
|
||||
'>=': MO.BIN4, // multiple character operator: >=
|
||||
'>=': MO.BIN5, // multiple character operator: >=
|
||||
'@': MO.ORD11, // commercial at
|
||||
'||': MO.BIN3 // multiple character operator: ||
|
||||
'||': [2,2,TEXCLASS.BIN,{fence: true, stretchy: true, symmetric: true}], // multiple character operator: ||
|
||||
'|||': [2,2,TEXCLASS.ORD,{fence: true, stretchy: true, symmetric: true}] // multiple character operator: |||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
MathJax.Hub.Insert(MML.mo.prototype,{
|
||||
OPTABLE: {
|
||||
postfix: {
|
||||
'\u20DB': MO.ACCENT // combining three dots above
|
||||
'\u20DB': MO.ACCENT, // combining three dots above
|
||||
'\u20DC': MO.ACCENT // combining four dots above
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -24,8 +24,11 @@
|
|||
|
||||
MathJax.Hub.Insert(MML.mo.prototype,{
|
||||
OPTABLE: {
|
||||
infix: {
|
||||
'\u2713': MO.WIDEACCENT // check mark
|
||||
prefix: {
|
||||
'\u2772': MO.OPEN // light left tortoise shell bracket ornament
|
||||
},
|
||||
postfix: {
|
||||
'\u2773': MO.CLOSE // light right tortoise shell bracket ornament
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -25,10 +25,12 @@
|
|||
MathJax.Hub.Insert(MML.mo.prototype,{
|
||||
OPTABLE: {
|
||||
prefix: {
|
||||
'\u2016': [0,0,TEXCLASS.ORD,{fence: true, stretchy: true}], // double vertical line
|
||||
'\u2018': [0,0,TEXCLASS.OPEN,{fence: true}], // left single quotation mark
|
||||
'\u201C': [0,0,TEXCLASS.OPEN,{fence: true}] // left double quotation mark
|
||||
},
|
||||
postfix: {
|
||||
'\u2016': [0,0,TEXCLASS.ORD,{fence: true, stretchy: true}], // double vertical line
|
||||
'\u2019': [0,0,TEXCLASS.CLOSE,{fence: true}], // right single quotation mark
|
||||
'\u201D': [0,0,TEXCLASS.CLOSE,{fence: true}] // right double quotation mark
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
|
||||
MathJax.Hub.Insert(MML.mo.prototype,{
|
||||
OPTABLE: {
|
||||
prefix: {
|
||||
'\u03C3': MO.ORD11 // greek small letter sigma
|
||||
infix: {
|
||||
'\u03F6': MO.REL // greek reversed lunate epsilon symbol
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -26,10 +26,7 @@
|
|||
OPTABLE: {
|
||||
prefix: {
|
||||
'\u2145': MO.ORD21, // double-struck italic capital d
|
||||
'\u2146': [2,0,TEXCLASS.ORD], // double-struck italic small d
|
||||
'\u2147': MO.ORD, // double-struck italic small e
|
||||
'\u2148': MO.ORD, // double-struck italic small i
|
||||
'\u2149': MO.ORD // double-struck italic small j
|
||||
'\u2146': [2,0,TEXCLASS.ORD] // double-struck italic small d
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
'\u223F': MO.BIN3, // sine wave
|
||||
'\u2241': MO.REL, // not tilde
|
||||
'\u2242': MO.REL, // minus tilde
|
||||
'\u2242\u0338': MO.BIN4, // minus tilde with slash
|
||||
'\u2242\u0338': MO.REL, // minus tilde with slash
|
||||
'\u2244': MO.REL, // not asymptotically equal to
|
||||
'\u2246': MO.REL, // approximately but not actually equal to
|
||||
'\u2247': MO.REL, // neither approximately nor actually equal to
|
||||
|
@ -72,9 +72,9 @@
|
|||
'\u224B': MO.REL, // triple tilde
|
||||
'\u224C': MO.REL, // all equal to
|
||||
'\u224E': MO.REL, // geometrically equivalent to
|
||||
'\u224E\u0338': MO.BIN4, // geometrically equivalent to with slash
|
||||
'\u224E\u0338': MO.REL, // geometrically equivalent to with slash
|
||||
'\u224F': MO.REL, // difference between
|
||||
'\u224F\u0338': MO.BIN4, // difference between with slash
|
||||
'\u224F\u0338': MO.REL, // difference between with slash
|
||||
'\u2251': MO.REL, // geometrically equal to
|
||||
'\u2252': MO.REL, // approximately equal to or the image of
|
||||
'\u2253': MO.REL, // image of or approximately equal to
|
||||
|
@ -92,12 +92,12 @@
|
|||
'\u2262': MO.REL, // not identical to
|
||||
'\u2263': MO.REL, // strictly equivalent to
|
||||
'\u2266': MO.REL, // less-than over equal to
|
||||
'\u2266\u0338': MO.BIN4, // less-than over equal to with slash
|
||||
'\u2266\u0338': MO.REL, // less-than over equal to with slash
|
||||
'\u2267': MO.REL, // greater-than over equal to
|
||||
'\u2268': MO.REL, // less-than but not equal to
|
||||
'\u2269': MO.REL, // greater-than but not equal to
|
||||
'\u226A\u0338': MO.BIN4, // much less than with slash
|
||||
'\u226B\u0338': MO.BIN4, // much greater than with slash
|
||||
'\u226A\u0338': MO.REL, // much less than with slash
|
||||
'\u226B\u0338': MO.REL, // much greater than with slash
|
||||
'\u226C': MO.REL, // between
|
||||
'\u226D': MO.REL, // not equivalent to
|
||||
'\u226E': MO.REL, // not less-than
|
||||
|
@ -116,11 +116,11 @@
|
|||
'\u227D': MO.REL, // succeeds or equal to
|
||||
'\u227E': MO.REL, // precedes or equivalent to
|
||||
'\u227F': MO.REL, // succeeds or equivalent to
|
||||
'\u227F\u0338': MO.BIN4, // succeeds or equivalent to with slash
|
||||
'\u227F\u0338': MO.REL, // succeeds or equivalent to with slash
|
||||
'\u2280': MO.REL, // does not precede
|
||||
'\u2281': MO.REL, // does not succeed
|
||||
'\u2282\u20D2': MO.BIN4, // subset of with vertical line
|
||||
'\u2283\u20D2': MO.BIN4, // superset of with vertical line
|
||||
'\u2282\u20D2': MO.REL, // subset of with vertical line
|
||||
'\u2283\u20D2': MO.REL, // superset of with vertical line
|
||||
'\u2284': MO.REL, // not a subset of
|
||||
'\u2285': MO.REL, // not a superset of
|
||||
'\u2288': MO.REL, // neither a subset of nor equal to
|
||||
|
@ -130,9 +130,9 @@
|
|||
'\u228C': MO.BIN4, // multiset
|
||||
'\u228D': MO.BIN4, // multiset multiplication
|
||||
'\u228F': MO.REL, // square image of
|
||||
'\u228F\u0338': MO.BIN4, // square image of with slash
|
||||
'\u228F\u0338': MO.REL, // square image of with slash
|
||||
'\u2290': MO.REL, // square original of
|
||||
'\u2290\u0338': MO.BIN4, // square original of with slash
|
||||
'\u2290\u0338': MO.REL, // square original of with slash
|
||||
'\u229A': MO.BIN4, // circled ring operator
|
||||
'\u229B': MO.BIN4, // circled asterisk operator
|
||||
'\u229C': MO.BIN4, // circled equals
|
||||
|
|
|
@ -25,10 +25,14 @@
|
|||
MathJax.Hub.Insert(MML.mo.prototype,{
|
||||
OPTABLE: {
|
||||
prefix: {
|
||||
'\u27E6': MO.OPEN // mathematical left white square bracket
|
||||
'\u27E6': MO.OPEN, // mathematical left white square bracket
|
||||
'\u27EA': MO.OPEN, // mathematical left double angle bracket
|
||||
'\u27EC': MO.OPEN // mathematical left white tortoise shell bracket
|
||||
},
|
||||
postfix: {
|
||||
'\u27E7': MO.CLOSE // mathematical right white square bracket
|
||||
'\u27E7': MO.CLOSE, // mathematical right white square bracket
|
||||
'\u27EB': MO.CLOSE, // mathematical right double angle bracket
|
||||
'\u27ED': MO.CLOSE // mathematical right white tortoise shell bracket
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
MathJax.Hub.Insert(MML.mo.prototype,{
|
||||
OPTABLE: {
|
||||
prefix: {
|
||||
'\u2980': [0,0,TEXCLASS.ORD,{fence: true, stretchy: true}], // triple vertical bar delimiter
|
||||
'\u2983': MO.OPEN, // left white curly bracket
|
||||
'\u2985': MO.OPEN, // left white parenthesis
|
||||
'\u2987': MO.OPEN, // z notation left image bracket
|
||||
|
@ -39,6 +40,7 @@
|
|||
'\u29FC': MO.OPEN // left-pointing curved angle bracket
|
||||
},
|
||||
postfix: {
|
||||
'\u2980': [0,0,TEXCLASS.ORD,{fence: true, stretchy: true}], // triple vertical bar delimiter
|
||||
'\u2984': MO.CLOSE, // right white curly bracket
|
||||
'\u2986': MO.CLOSE, // right white parenthesis
|
||||
'\u2988': MO.CLOSE, // z notation right image bracket
|
||||
|
@ -53,7 +55,6 @@
|
|||
'\u29FD': MO.CLOSE // right-pointing curved angle bracket
|
||||
},
|
||||
infix: {
|
||||
'\u2980': MO.ORD, // triple vertical bar delimiter
|
||||
'\u2981': MO.BIN3, // z notation spot
|
||||
'\u2982': MO.BIN3, // z notation type colon
|
||||
'\u2999': MO.BIN3, // dotted fence
|
||||
|
@ -111,9 +112,9 @@
|
|||
'\u29CD': MO.BIN3, // triangle with serifs at bottom
|
||||
'\u29CE': MO.REL, // right triangle above left triangle
|
||||
'\u29CF': MO.REL, // left triangle beside vertical bar
|
||||
'\u29CF\u0338': MO.BIN4, // left triangle beside vertical bar with slash
|
||||
'\u29CF\u0338': MO.REL, // left triangle beside vertical bar with slash
|
||||
'\u29D0': MO.REL, // vertical bar beside right triangle
|
||||
'\u29D0\u0338': MO.BIN4, // vertical bar beside right triangle with slash
|
||||
'\u29D0\u0338': MO.REL, // vertical bar beside right triangle with slash
|
||||
'\u29D1': MO.REL, // bowtie with left half black
|
||||
'\u29D2': MO.REL, // bowtie with right half black
|
||||
'\u29D3': MO.REL, // black bowtie
|
||||
|
|
36
unpacked/jax/element/mml/optable/MiscSymbolsAndArrows.js
Normal file
36
unpacked/jax/element/mml/optable/MiscSymbolsAndArrows.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*************************************************************
|
||||
*
|
||||
* MathJax/jax/output/HTML-CSS/optable/MiscSymbolsAndArrows.js
|
||||
*
|
||||
* Copyright (c) 2010 Design Science, Inc.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
(function (MML) {
|
||||
var MO = MML.mo.OPTYPES;
|
||||
var TEXCLASS = MML.TEXCLASS;
|
||||
|
||||
MathJax.Hub.Insert(MML.mo.prototype,{
|
||||
OPTABLE: {
|
||||
infix: {
|
||||
'\u2B45': MO.RELSTRETCH, // leftwards quadruple arrow
|
||||
'\u2B46': MO.RELSTRETCH // rightwards quadruple arrow
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
MathJax.Ajax.loadComplete(MML.optableDir+"/MiscSymbolsAndArrows.js");
|
||||
|
||||
})(MathJax.ElementJax.mml);
|
|
@ -28,7 +28,9 @@
|
|||
'\u23B4': MO.WIDEACCENT, // top square bracket
|
||||
'\u23B5': MO.WIDEACCENT, // bottom square bracket
|
||||
'\u23DC': MO.WIDEACCENT, // top parenthesis
|
||||
'\u23DD': MO.WIDEACCENT // bottom parenthesis
|
||||
'\u23DD': MO.WIDEACCENT, // bottom parenthesis
|
||||
'\u23E0': MO.WIDEACCENT, // top tortoise shell bracket
|
||||
'\u23E1': MO.WIDEACCENT // bottom tortoise shell bracket
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -25,8 +25,10 @@
|
|||
MathJax.Hub.Insert(MML.mo.prototype,{
|
||||
OPTABLE: {
|
||||
postfix: {
|
||||
'\u02CD': MO.WIDEACCENT, // modifier letter low macron
|
||||
'\u02DA': MO.ACCENT, // ring above
|
||||
'\u02DD': MO.ACCENT // double acute accent
|
||||
'\u02DD': MO.ACCENT, // double acute accent
|
||||
'\u02F7': MO.WIDEACCENT // modifier letter low tilde
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -148,9 +148,9 @@
|
|||
'\u2A7B': MO.REL, // less-than with question mark above
|
||||
'\u2A7C': MO.REL, // greater-than with question mark above
|
||||
'\u2A7D': MO.REL, // less-than or slanted equal to
|
||||
'\u2A7D\u0338': MO.BIN4, // less-than or slanted equal to with slash
|
||||
'\u2A7D\u0338': MO.REL, // less-than or slanted equal to with slash
|
||||
'\u2A7E': MO.REL, // greater-than or slanted equal to
|
||||
'\u2A7E\u0338': MO.BIN4, // greater-than or slanted equal to with slash
|
||||
'\u2A7E\u0338': MO.REL, // greater-than or slanted equal to with slash
|
||||
'\u2A7F': MO.REL, // less-than or slanted equal to with dot inside
|
||||
'\u2A80': MO.REL, // greater-than or slanted equal to with dot inside
|
||||
'\u2A81': MO.REL, // less-than or slanted equal to with dot above
|
||||
|
@ -186,9 +186,9 @@
|
|||
'\u2A9F': MO.REL, // similar above less-than above equals sign
|
||||
'\u2AA0': MO.REL, // similar above greater-than above equals sign
|
||||
'\u2AA1': MO.REL, // double nested less-than
|
||||
'\u2AA1\u0338': MO.BIN4, // double nested less-than with slash
|
||||
'\u2AA1\u0338': MO.REL, // double nested less-than with slash
|
||||
'\u2AA2': MO.REL, // double nested greater-than
|
||||
'\u2AA2\u0338': MO.BIN4, // double nested greater-than with slash
|
||||
'\u2AA2\u0338': MO.REL, // double nested greater-than with slash
|
||||
'\u2AA3': MO.REL, // double nested less-than with underbar
|
||||
'\u2AA4': MO.REL, // greater-than overlapping less-than
|
||||
'\u2AA5': MO.REL, // greater-than beside less-than
|
||||
|
@ -201,8 +201,8 @@
|
|||
'\u2AAC': MO.REL, // smaller than or equal to
|
||||
'\u2AAD': MO.REL, // larger than or equal to
|
||||
'\u2AAE': MO.REL, // equals sign with bumpy above
|
||||
'\u2AAF\u0338': MO.BIN4, // precedes above single-line equals sign with slash
|
||||
'\u2AB0\u0338': MO.BIN4, // succeeds above single-line equals sign with slash
|
||||
'\u2AAF\u0338': MO.REL, // precedes above single-line equals sign with slash
|
||||
'\u2AB0\u0338': MO.REL, // succeeds above single-line equals sign with slash
|
||||
'\u2AB1': MO.REL, // precedes above single-line not equal to
|
||||
'\u2AB2': MO.REL, // succeeds above single-line not equal to
|
||||
'\u2AB3': MO.REL, // precedes above equals sign
|
||||
|
|
40
unpacked/jax/element/mml/optable/SupplementalArrowsA.js
Normal file
40
unpacked/jax/element/mml/optable/SupplementalArrowsA.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*************************************************************
|
||||
*
|
||||
* MathJax/jax/output/HTML-CSS/optable/SupplementalArrowsA.js
|
||||
*
|
||||
* Copyright (c) 2010 Design Science, Inc.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
(function (MML) {
|
||||
var MO = MML.mo.OPTYPES;
|
||||
var TEXCLASS = MML.TEXCLASS;
|
||||
|
||||
MathJax.Hub.Insert(MML.mo.prototype,{
|
||||
OPTABLE: {
|
||||
infix: {
|
||||
'\u27F0': MO.RELSTRETCH, // upwards quadruple arrow
|
||||
'\u27F1': MO.RELSTRETCH, // downwards quadruple arrow
|
||||
'\u27FB': MO.WIDEREL, // long leftwards arrow from bar
|
||||
'\u27FD': MO.WIDEREL, // long leftwards double arrow from bar
|
||||
'\u27FE': MO.WIDEREL, // long rightwards double arrow from bar
|
||||
'\u27FF': MO.WIDEREL // long rightwards squiggle arrow
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
MathJax.Ajax.loadComplete(MML.optableDir+"/SupplementalArrowsA.js");
|
||||
|
||||
})(MathJax.ElementJax.mml);
|
|
@ -25,41 +25,41 @@
|
|||
MathJax.Hub.Insert(MML.mo.prototype,{
|
||||
OPTABLE: {
|
||||
infix: {
|
||||
'\u2900': MO.REL, // rightwards two-headed arrow with vertical stroke
|
||||
'\u2901': MO.REL, // rightwards two-headed arrow with double vertical stroke
|
||||
'\u2902': MO.REL, // leftwards double arrow with vertical stroke
|
||||
'\u2903': MO.REL, // rightwards double arrow with vertical stroke
|
||||
'\u2904': MO.REL, // left right double arrow with vertical stroke
|
||||
'\u2905': MO.REL, // rightwards two-headed arrow from bar
|
||||
'\u2906': MO.REL, // leftwards double arrow from bar
|
||||
'\u2907': MO.REL, // rightwards double arrow from bar
|
||||
'\u2900': MO.RELACCENT, // rightwards two-headed arrow with vertical stroke
|
||||
'\u2901': MO.RELACCENT, // rightwards two-headed arrow with double vertical stroke
|
||||
'\u2902': MO.RELACCENT, // leftwards double arrow with vertical stroke
|
||||
'\u2903': MO.RELACCENT, // rightwards double arrow with vertical stroke
|
||||
'\u2904': MO.RELACCENT, // left right double arrow with vertical stroke
|
||||
'\u2905': MO.RELACCENT, // rightwards two-headed arrow from bar
|
||||
'\u2906': MO.RELACCENT, // leftwards double arrow from bar
|
||||
'\u2907': MO.RELACCENT, // rightwards double arrow from bar
|
||||
'\u2908': MO.REL, // downwards arrow with horizontal stroke
|
||||
'\u2909': MO.REL, // upwards arrow with horizontal stroke
|
||||
'\u290A': MO.WIDEREL, // upwards triple arrow
|
||||
'\u290B': MO.WIDEREL, // downwards triple arrow
|
||||
'\u290A': MO.RELSTRETCH, // upwards triple arrow
|
||||
'\u290B': MO.RELSTRETCH, // downwards triple arrow
|
||||
'\u290C': MO.WIDEREL, // leftwards double dash arrow
|
||||
'\u290D': MO.WIDEREL, // rightwards double dash arrow
|
||||
'\u290E': MO.WIDEREL, // leftwards triple dash arrow
|
||||
'\u290F': MO.WIDEREL, // rightwards triple dash arrow
|
||||
'\u2910': MO.WIDEREL, // rightwards two-headed triple dash arrow
|
||||
'\u2911': MO.REL, // rightwards arrow with dotted stem
|
||||
'\u2912': MO.WIDEREL, // upwards arrow to bar
|
||||
'\u2913': MO.WIDEREL, // downwards arrow to bar
|
||||
'\u2914': MO.REL, // rightwards arrow with tail with vertical stroke
|
||||
'\u2915': MO.REL, // rightwards arrow with tail with double vertical stroke
|
||||
'\u2916': MO.REL, // rightwards two-headed arrow with tail
|
||||
'\u2917': MO.REL, // rightwards two-headed arrow with tail with vertical stroke
|
||||
'\u2918': MO.REL, // rightwards two-headed arrow with tail with double vertical stroke
|
||||
'\u2919': MO.REL, // leftwards arrow-tail
|
||||
'\u291A': MO.REL, // rightwards arrow-tail
|
||||
'\u291B': MO.REL, // leftwards double arrow-tail
|
||||
'\u291C': MO.REL, // rightwards double arrow-tail
|
||||
'\u291D': MO.REL, // leftwards arrow to black diamond
|
||||
'\u291E': MO.REL, // rightwards arrow to black diamond
|
||||
'\u291F': MO.REL, // leftwards arrow from bar to black diamond
|
||||
'\u2920': MO.REL, // rightwards arrow from bar to black diamond
|
||||
'\u2921': MO.WIDEREL, // north west and south east arrow
|
||||
'\u2922': MO.WIDEREL, // north east and south west arrow
|
||||
'\u2911': MO.RELACCENT, // rightwards arrow with dotted stem
|
||||
'\u2912': MO.RELSTRETCH, // upwards arrow to bar
|
||||
'\u2913': MO.RELSTRETCH, // downwards arrow to bar
|
||||
'\u2914': MO.RELACCENT, // rightwards arrow with tail with vertical stroke
|
||||
'\u2915': MO.RELACCENT, // rightwards arrow with tail with double vertical stroke
|
||||
'\u2916': MO.RELACCENT, // rightwards two-headed arrow with tail
|
||||
'\u2917': MO.RELACCENT, // rightwards two-headed arrow with tail with vertical stroke
|
||||
'\u2918': MO.RELACCENT, // rightwards two-headed arrow with tail with double vertical stroke
|
||||
'\u2919': MO.RELACCENT, // leftwards arrow-tail
|
||||
'\u291A': MO.RELACCENT, // rightwards arrow-tail
|
||||
'\u291B': MO.RELACCENT, // leftwards double arrow-tail
|
||||
'\u291C': MO.RELACCENT, // rightwards double arrow-tail
|
||||
'\u291D': MO.RELACCENT, // leftwards arrow to black diamond
|
||||
'\u291E': MO.RELACCENT, // rightwards arrow to black diamond
|
||||
'\u291F': MO.RELACCENT, // leftwards arrow from bar to black diamond
|
||||
'\u2920': MO.RELACCENT, // rightwards arrow from bar to black diamond
|
||||
'\u2921': MO.RELSTRETCH, // north west and south east arrow
|
||||
'\u2922': MO.RELSTRETCH, // north east and south west arrow
|
||||
'\u2923': MO.REL, // north west arrow with hook
|
||||
'\u2924': MO.REL, // north east arrow with hook
|
||||
'\u2925': MO.REL, // south east arrow with hook
|
||||
|
@ -76,81 +76,81 @@
|
|||
'\u2930': MO.REL, // rising diagonal crossing south east arrow
|
||||
'\u2931': MO.REL, // north east arrow crossing north west arrow
|
||||
'\u2932': MO.REL, // north west arrow crossing north east arrow
|
||||
'\u2933': MO.REL, // wave arrow pointing directly right
|
||||
'\u2933': MO.RELACCENT, // wave arrow pointing directly right
|
||||
'\u2934': MO.REL, // arrow pointing rightwards then curving upwards
|
||||
'\u2935': MO.REL, // arrow pointing rightwards then curving downwards
|
||||
'\u2936': MO.REL, // arrow pointing downwards then curving leftwards
|
||||
'\u2937': MO.REL, // arrow pointing downwards then curving rightwards
|
||||
'\u2938': MO.REL, // right-side arc clockwise arrow
|
||||
'\u2939': MO.REL, // left-side arc anticlockwise arrow
|
||||
'\u293A': MO.REL, // top arc anticlockwise arrow
|
||||
'\u293B': MO.REL, // bottom arc anticlockwise arrow
|
||||
'\u293C': MO.REL, // top arc clockwise arrow with minus
|
||||
'\u293D': MO.REL, // top arc anticlockwise arrow with plus
|
||||
'\u293A': MO.RELACCENT, // top arc anticlockwise arrow
|
||||
'\u293B': MO.RELACCENT, // bottom arc anticlockwise arrow
|
||||
'\u293C': MO.RELACCENT, // top arc clockwise arrow with minus
|
||||
'\u293D': MO.RELACCENT, // top arc anticlockwise arrow with plus
|
||||
'\u293E': MO.REL, // lower right semicircular clockwise arrow
|
||||
'\u293F': MO.REL, // lower left semicircular anticlockwise arrow
|
||||
'\u2940': MO.REL, // anticlockwise closed circle arrow
|
||||
'\u2941': MO.REL, // clockwise closed circle arrow
|
||||
'\u2942': MO.REL, // rightwards arrow above short leftwards arrow
|
||||
'\u2943': MO.REL, // leftwards arrow above short rightwards arrow
|
||||
'\u2944': MO.REL, // short rightwards arrow above leftwards arrow
|
||||
'\u2945': MO.REL, // rightwards arrow with plus below
|
||||
'\u2946': MO.REL, // leftwards arrow with plus below
|
||||
'\u2947': MO.REL, // rightwards arrow through x
|
||||
'\u2948': MO.REL, // left right arrow through small circle
|
||||
'\u2942': MO.RELACCENT, // rightwards arrow above short leftwards arrow
|
||||
'\u2943': MO.RELACCENT, // leftwards arrow above short rightwards arrow
|
||||
'\u2944': MO.RELACCENT, // short rightwards arrow above leftwards arrow
|
||||
'\u2945': MO.RELACCENT, // rightwards arrow with plus below
|
||||
'\u2946': MO.RELACCENT, // leftwards arrow with plus below
|
||||
'\u2947': MO.RELACCENT, // rightwards arrow through x
|
||||
'\u2948': MO.RELACCENT, // left right arrow through small circle
|
||||
'\u2949': MO.REL, // upwards two-headed arrow from small circle
|
||||
'\u294A': MO.REL, // left barb up right barb down harpoon
|
||||
'\u294B': MO.REL, // left barb down right barb up harpoon
|
||||
'\u294A': MO.RELACCENT, // left barb up right barb down harpoon
|
||||
'\u294B': MO.RELACCENT, // left barb down right barb up harpoon
|
||||
'\u294C': MO.REL, // up barb right down barb left harpoon
|
||||
'\u294D': MO.REL, // up barb left down barb right harpoon
|
||||
'\u294E': MO.RELACCENT, // left barb up right barb up harpoon
|
||||
'\u294F': MO.WIDEREL, // up barb right down barb right harpoon
|
||||
'\u294E': MO.WIDEREL, // left barb up right barb up harpoon
|
||||
'\u294F': MO.RELSTRETCH, // up barb right down barb right harpoon
|
||||
'\u2950': MO.WIDEREL, // left barb down right barb down harpoon
|
||||
'\u2951': MO.WIDEREL, // up barb left down barb left harpoon
|
||||
'\u2951': MO.RELSTRETCH, // up barb left down barb left harpoon
|
||||
'\u2952': MO.WIDEREL, // leftwards harpoon with barb up to bar
|
||||
'\u2953': MO.WIDEREL, // rightwards harpoon with barb up to bar
|
||||
'\u2954': MO.WIDEREL, // upwards harpoon with barb right to bar
|
||||
'\u2955': MO.WIDEREL, // downwards harpoon with barb right to bar
|
||||
'\u2956': MO.WIDEREL, // leftwards harpoon with barb down to bar
|
||||
'\u2957': MO.WIDEREL, // rightwards harpoon with barb down to bar
|
||||
'\u2958': MO.WIDEREL, // upwards harpoon with barb left to bar
|
||||
'\u2959': MO.WIDEREL, // downwards harpoon with barb left to bar
|
||||
'\u2954': MO.RELSTRETCH, // upwards harpoon with barb right to bar
|
||||
'\u2955': MO.RELSTRETCH, // downwards harpoon with barb right to bar
|
||||
'\u2956': MO.RELSTRETCH, // leftwards harpoon with barb down to bar
|
||||
'\u2957': MO.RELSTRETCH, // rightwards harpoon with barb down to bar
|
||||
'\u2958': MO.RELSTRETCH, // upwards harpoon with barb left to bar
|
||||
'\u2959': MO.RELSTRETCH, // downwards harpoon with barb left to bar
|
||||
'\u295A': MO.WIDEREL, // leftwards harpoon with barb up from bar
|
||||
'\u295B': MO.WIDEREL, // rightwards harpoon with barb up from bar
|
||||
'\u295C': MO.WIDEREL, // upwards harpoon with barb right from bar
|
||||
'\u295D': MO.WIDEREL, // downwards harpoon with barb right from bar
|
||||
'\u295C': MO.RELSTRETCH, // upwards harpoon with barb right from bar
|
||||
'\u295D': MO.RELSTRETCH, // downwards harpoon with barb right from bar
|
||||
'\u295E': MO.WIDEREL, // leftwards harpoon with barb down from bar
|
||||
'\u295F': MO.WIDEREL, // rightwards harpoon with barb down from bar
|
||||
'\u2960': MO.WIDEREL, // upwards harpoon with barb left from bar
|
||||
'\u2961': MO.WIDEREL, // downwards harpoon with barb left from bar
|
||||
'\u2962': MO.REL, // leftwards harpoon with barb up above leftwards harpoon with barb down
|
||||
'\u2960': MO.RELSTRETCH, // upwards harpoon with barb left from bar
|
||||
'\u2961': MO.RELSTRETCH, // downwards harpoon with barb left from bar
|
||||
'\u2962': MO.RELACCENT, // leftwards harpoon with barb up above leftwards harpoon with barb down
|
||||
'\u2963': MO.REL, // upwards harpoon with barb left beside upwards harpoon with barb right
|
||||
'\u2964': MO.REL, // rightwards harpoon with barb up above rightwards harpoon with barb down
|
||||
'\u2964': MO.RELACCENT, // rightwards harpoon with barb up above rightwards harpoon with barb down
|
||||
'\u2965': MO.REL, // downwards harpoon with barb left beside downwards harpoon with barb right
|
||||
'\u2966': MO.REL, // leftwards harpoon with barb up above rightwards harpoon with barb up
|
||||
'\u2967': MO.REL, // leftwards harpoon with barb down above rightwards harpoon with barb down
|
||||
'\u2968': MO.REL, // rightwards harpoon with barb up above leftwards harpoon with barb up
|
||||
'\u2969': MO.REL, // rightwards harpoon with barb down above leftwards harpoon with barb down
|
||||
'\u296A': MO.REL, // leftwards harpoon with barb up above long dash
|
||||
'\u296B': MO.REL, // leftwards harpoon with barb down below long dash
|
||||
'\u296C': MO.REL, // rightwards harpoon with barb up above long dash
|
||||
'\u296D': MO.REL, // rightwards harpoon with barb down below long dash
|
||||
'\u296E': MO.WIDEREL, // upwards harpoon with barb left beside downwards harpoon with barb right
|
||||
'\u296F': MO.WIDEREL, // downwards harpoon with barb left beside upwards harpoon with barb right
|
||||
'\u2970': MO.REL, // right double arrow with rounded head
|
||||
'\u2971': MO.REL, // equals sign above rightwards arrow
|
||||
'\u2972': MO.REL, // tilde operator above rightwards arrow
|
||||
'\u2973': MO.REL, // leftwards arrow above tilde operator
|
||||
'\u2974': MO.REL, // rightwards arrow above tilde operator
|
||||
'\u2975': MO.REL, // rightwards arrow above almost equal to
|
||||
'\u2976': MO.REL, // less-than above leftwards arrow
|
||||
'\u2977': MO.REL, // leftwards arrow through less-than
|
||||
'\u2978': MO.REL, // greater-than above rightwards arrow
|
||||
'\u2979': MO.REL, // subset above rightwards arrow
|
||||
'\u297A': MO.REL, // leftwards arrow through subset
|
||||
'\u297B': MO.REL, // superset above leftwards arrow
|
||||
'\u297C': MO.REL, // left fish tail
|
||||
'\u297D': MO.REL, // right fish tail
|
||||
'\u2966': MO.RELACCENT, // leftwards harpoon with barb up above rightwards harpoon with barb up
|
||||
'\u2967': MO.RELACCENT, // leftwards harpoon with barb down above rightwards harpoon with barb down
|
||||
'\u2968': MO.RELACCENT, // rightwards harpoon with barb up above leftwards harpoon with barb up
|
||||
'\u2969': MO.RELACCENT, // rightwards harpoon with barb down above leftwards harpoon with barb down
|
||||
'\u296A': MO.RELACCENT, // leftwards harpoon with barb up above long dash
|
||||
'\u296B': MO.RELACCENT, // leftwards harpoon with barb down below long dash
|
||||
'\u296C': MO.RELACCENT, // rightwards harpoon with barb up above long dash
|
||||
'\u296D': MO.RELACCENT, // rightwards harpoon with barb down below long dash
|
||||
'\u296E': MO.RELSTRETCH, // upwards harpoon with barb left beside downwards harpoon with barb right
|
||||
'\u296F': MO.RELSTRETCH, // downwards harpoon with barb left beside upwards harpoon with barb right
|
||||
'\u2970': MO.RELACCENT, // right double arrow with rounded head
|
||||
'\u2971': MO.RELACCENT, // equals sign above rightwards arrow
|
||||
'\u2972': MO.RELACCENT, // tilde operator above rightwards arrow
|
||||
'\u2973': MO.RELACCENT, // leftwards arrow above tilde operator
|
||||
'\u2974': MO.RELACCENT, // rightwards arrow above tilde operator
|
||||
'\u2975': MO.RELACCENT, // rightwards arrow above almost equal to
|
||||
'\u2976': MO.RELACCENT, // less-than above leftwards arrow
|
||||
'\u2977': MO.RELACCENT, // leftwards arrow through less-than
|
||||
'\u2978': MO.RELACCENT, // greater-than above rightwards arrow
|
||||
'\u2979': MO.RELACCENT, // subset above rightwards arrow
|
||||
'\u297A': MO.RELACCENT, // leftwards arrow through subset
|
||||
'\u297B': MO.RELACCENT, // superset above leftwards arrow
|
||||
'\u297C': MO.RELACCENT, // left fish tail
|
||||
'\u297D': MO.RELACCENT, // right fish tail
|
||||
'\u297E': MO.REL, // up fish tail
|
||||
'\u297F': MO.REL // down fish tail
|
||||
}
|
||||
|
|
|
@ -24,14 +24,23 @@
|
|||
|
||||
MathJax.InputJax.TeX = MathJax.InputJax({
|
||||
id: "TeX",
|
||||
version: "1.1.9",
|
||||
version: "1.1.10",
|
||||
directory: MathJax.InputJax.directory + "/TeX",
|
||||
extensionDir: MathJax.InputJax.extensionDir + "/TeX",
|
||||
|
||||
config: {
|
||||
TagSide: "right",
|
||||
TagIndent: "0.8em",
|
||||
MultLineWidth: "85%"
|
||||
MultLineWidth: "85%",
|
||||
|
||||
equationNumbers: {
|
||||
autoNumber: "none", // "AMS" for standard AMS numbering,
|
||||
// or "all" for all displayed equations
|
||||
formatNumber: function (n) {return n},
|
||||
formatTag: function (n) {return '('+n+')'},
|
||||
formatID: function (n) {return 'mjx-eqn-'+n},
|
||||
formatURL: function (n) {return '#mjx-eqn-'+escape(n)}
|
||||
}
|
||||
}
|
||||
});
|
||||
MathJax.InputJax.TeX.Register("math/tex");
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
(function (TEX) {
|
||||
(function (TEX,HUB,AJAX) {
|
||||
var TRUE = true, FALSE = false, MML, NBSP = String.fromCharCode(0xA0);
|
||||
|
||||
var STACK = MathJax.Object.Subclass({
|
||||
Init: function (env) {
|
||||
this.global = {};
|
||||
this.data = [STACKITEM.start().With({global: this.global})];
|
||||
Init: function (env,inner) {
|
||||
this.global = {isInner: inner};
|
||||
this.data = [STACKITEM.start(this.global)];
|
||||
if (env) {this.data[0].env = env}
|
||||
this.env = this.data[0].env;
|
||||
},
|
||||
|
@ -102,6 +102,10 @@
|
|||
|
||||
STACKITEM.start = STACKITEM.Subclass({
|
||||
type: "start", isOpen: TRUE,
|
||||
Init: function (global) {
|
||||
this.SUPER(arguments).Init.call(this);
|
||||
this.global = global;
|
||||
},
|
||||
checkItem: function (item) {
|
||||
if (item.type === "stop") {return STACKITEM.mml(this.mmlData())}
|
||||
return this.SUPER(arguments).checkItem.call(this,item);
|
||||
|
@ -296,10 +300,24 @@
|
|||
});
|
||||
|
||||
|
||||
var TEXDEF = {};
|
||||
var TEXDEF = {
|
||||
//
|
||||
// Add new definitions without overriding user-defined ones
|
||||
//
|
||||
Add: function (src,dst,nouser) {
|
||||
if (!dst) {dst = this}
|
||||
for (var id in src) {if (src.hasOwnProperty(id)) {
|
||||
if (typeof src[id] === 'object' && !(src[id] instanceof Array) &&
|
||||
(typeof dst[id] === 'object' || typeof dst[id] === 'function'))
|
||||
{this.Add(src[id],dst[id],src[id],nouser)}
|
||||
else if (!dst[id] || !dst[id].isUser || !nouser) {dst[id] = src[id]}
|
||||
}}
|
||||
return dst;
|
||||
}
|
||||
};
|
||||
var STARTUP = function () {
|
||||
MML = MathJax.ElementJax.mml;
|
||||
MathJax.Hub.Insert(TEXDEF,{
|
||||
HUB.Insert(TEXDEF,{
|
||||
|
||||
// patterns for letters and numbers
|
||||
letter: /[a-z]/i,
|
||||
|
@ -799,7 +817,7 @@
|
|||
matrix: 'Matrix',
|
||||
array: 'Matrix',
|
||||
pmatrix: ['Matrix','(',')'],
|
||||
cases: ['Matrix','{','',"left left",null,".1em"],
|
||||
cases: ['Matrix','{','',"left left",null,".1em",null,true],
|
||||
eqalign: ['Matrix',null,null,"right left",MML.LENGTH.THICKMATHSPACE,".5em",'D'],
|
||||
displaylines: ['Matrix',null,null,"center",null,".5em",'D'],
|
||||
cr: 'Cr',
|
||||
|
@ -846,7 +864,9 @@
|
|||
newcommand: ['Extension','newcommand'],
|
||||
renewcommand: ['Extension','newcommand'],
|
||||
newenvironment: ['Extension','newcommand'],
|
||||
renewenvironment: ['Extension','newcommand'],
|
||||
def: ['Extension','newcommand'],
|
||||
let: ['Extension','newcommand'],
|
||||
|
||||
verb: ['Extension','verb'],
|
||||
|
||||
|
@ -854,8 +874,10 @@
|
|||
|
||||
tag: ['Extension','AMSmath'],
|
||||
notag: ['Extension','AMSmath'],
|
||||
label: ['Macro','',1], // not implemented yet
|
||||
nonumber: ['Macro',''], // not implemented yet
|
||||
label: ['Extension','AMSmath'],
|
||||
ref: ['Extension','AMSmath'],
|
||||
eqref: ['Extension','AMSmath'],
|
||||
nonumber: ['Macro','\\notag'],
|
||||
|
||||
// Extensions to TeX
|
||||
unicode: ['Extension','unicode'],
|
||||
|
@ -865,7 +887,7 @@
|
|||
'class': ['Extension','HTML'],
|
||||
style: ['Extension','HTML'],
|
||||
cssId: ['Extension','HTML'],
|
||||
// bbox: ['Extension','bbox'],
|
||||
bbox: ['Extension','bbox'],
|
||||
|
||||
mmlToken: 'MmlToken',
|
||||
|
||||
|
@ -914,6 +936,7 @@
|
|||
for (var id in MACROS) {if (MACROS.hasOwnProperty(id)) {
|
||||
if (typeof(MACROS[id]) === "string") {TEXDEF.macros[id] = ['Macro',MACROS[id]]}
|
||||
else {TEXDEF.macros[id] = ["Macro"].concat(MACROS[id])}
|
||||
TEXDEF.macros[id].isUser = true;
|
||||
}}
|
||||
}
|
||||
};
|
||||
|
@ -927,9 +950,8 @@
|
|||
Init: function (string,env) {
|
||||
this.string = string; this.i = 0; this.macroCount = 0;
|
||||
var ENV; if (env) {ENV = {}; for (var id in env) {if (env.hasOwnProperty(id)) {ENV[id] = env[id]}}}
|
||||
this.stack = TEX.Stack(ENV);
|
||||
this.Parse();
|
||||
this.Push(STACKITEM.stop());
|
||||
this.stack = TEX.Stack(ENV,!!env);
|
||||
this.Parse(); this.Push(STACKITEM.stop());
|
||||
},
|
||||
Parse: function () {
|
||||
var c;
|
||||
|
@ -957,34 +979,60 @@
|
|||
* Lookup a control-sequence and process it
|
||||
*/
|
||||
ControlSequence: function (c) {
|
||||
var name = this.GetCS(), mchar, def;
|
||||
if (TEXDEF.macros[name]) { // javascript macro
|
||||
var macro = TEXDEF.macros[name];
|
||||
var name = this.GetCS(), macro = this.csFindMacro(name);
|
||||
if (macro) {
|
||||
if (!(macro instanceof Array)) {macro = [macro]}
|
||||
var fn = macro[0]; if (!(fn instanceof Function)) {fn = this[fn]}
|
||||
fn.apply(this,["\\"+name].concat(macro.slice(1)));
|
||||
} else if (TEXDEF.mathchar0mi[name]) { // normal mathchar (mi)
|
||||
mchar = TEXDEF.mathchar0mi[name]; def = {mathvariant: MML.VARIANT.ITALIC};
|
||||
if (mchar instanceof Array) {def = mchar[1]; mchar = mchar[0]}
|
||||
this.Push(this.mmlToken(MML.mi(MML.entity("#x"+mchar)).With(def)));
|
||||
} else if (TEXDEF.mathchar0mo[name]) { // normal mathchar (mo)
|
||||
mchar = TEXDEF.mathchar0mo[name]; def = {stretchy: FALSE};
|
||||
if (mchar instanceof Array) {def = mchar[1]; def.stretchy = FALSE; mchar = mchar[0]}
|
||||
this.Push(this.mmlToken(MML.mo(MML.entity("#x"+mchar)).With(def)));
|
||||
} else if (TEXDEF.mathchar7[name]) { // mathchar in current family
|
||||
mchar = TEXDEF.mathchar7[name]; def = {mathvariant: MML.VARIANT.NORMAL};
|
||||
if (mchar instanceof Array) {def = mchar[1]; mchar = mchar[0]}
|
||||
if (this.stack.env.font) {def.mathvariant = this.stack.env.font}
|
||||
this.Push(this.mmlToken(MML.mi(MML.entity("#x"+mchar)).With(def)));
|
||||
} else if (TEXDEF.delimiter["\\"+name] != null) { // delimiter
|
||||
var delim = TEXDEF.delimiter["\\"+name]; def = {};
|
||||
if (delim instanceof Array) {def = delim[1]; delim = delim[0]}
|
||||
if (delim.length === 4) {delim = MML.entity('#x'+delim)} else {delim = MML.chars(delim)}
|
||||
this.Push(this.mmlToken(MML.mo(delim).With({fence: FALSE, stretchy: FALSE}).With(def)));
|
||||
} else { // error
|
||||
this.csUndefined("\\"+name);
|
||||
}
|
||||
fn.apply(this,[c+name].concat(macro.slice(1)));
|
||||
} else if (TEXDEF.mathchar0mi[name]) {this.csMathchar0mi(name,TEXDEF.mathchar0mi[name])}
|
||||
else if (TEXDEF.mathchar0mo[name]) {this.csMathchar0mo(name,TEXDEF.mathchar0mo[name])}
|
||||
else if (TEXDEF.mathchar7[name]) {this.csMathchar7(name,TEXDEF.mathchar7[name])}
|
||||
else if (TEXDEF.delimiter["\\"+name] != null) {this.csDelimiter(name,TEXDEF.delimiter["\\"+name])}
|
||||
else {this.csUndefined(c+name)}
|
||||
},
|
||||
//
|
||||
// Look up a macro in the macros list
|
||||
// (overridden in begingroup extension)
|
||||
//
|
||||
csFindMacro: function (name) {return TEXDEF.macros[name]},
|
||||
//
|
||||
// Handle normal mathchar (as an mi)
|
||||
//
|
||||
csMathchar0mi: function (name,mchar) {
|
||||
var def = {mathvariant: MML.VARIANT.ITALIC};
|
||||
if (mchar instanceof Array) {def = mchar[1]; mchar = mchar[0]}
|
||||
this.Push(this.mmlToken(MML.mi(MML.entity("#x"+mchar)).With(def)));
|
||||
},
|
||||
//
|
||||
// Handle normal mathchar (as an m0)
|
||||
//
|
||||
csMathchar0mo: function (name,mchar) {
|
||||
var def = {stretchy: false};
|
||||
if (mchar instanceof Array) {def = mchar[1]; def.stretchy = false; mchar = mchar[0]}
|
||||
this.Push(this.mmlToken(MML.mo(MML.entity("#x"+mchar)).With(def)));
|
||||
},
|
||||
//
|
||||
// Handle mathchar in current family
|
||||
//
|
||||
csMathchar7: function (name,mchar) {
|
||||
var def = {mathvariant: MML.VARIANT.NORMAL};
|
||||
if (mchar instanceof Array) {def = mchar[1]; mchar = mchar[0]}
|
||||
if (this.stack.env.font) {def.mathvariant = this.stack.env.font}
|
||||
this.Push(this.mmlToken(MML.mi(MML.entity("#x"+mchar)).With(def)));
|
||||
},
|
||||
//
|
||||
// Handle delimiter
|
||||
//
|
||||
csDelimiter: function (name,delim) {
|
||||
var def = {};
|
||||
if (delim instanceof Array) {def = delim[1]; delim = delim[0]}
|
||||
if (delim.length === 4) {delim = MML.entity('#x'+delim)} else {delim = MML.chars(delim)}
|
||||
this.Push(this.mmlToken(MML.mo(delim).With({fence: false, stretchy: false}).With(def)));
|
||||
},
|
||||
//
|
||||
// Handle undefined control sequence
|
||||
// (overridden in noUndefined extension)
|
||||
//
|
||||
csUndefined: function (name) {
|
||||
TEX.Error("Undefined control sequence "+name);
|
||||
},
|
||||
|
@ -1370,9 +1418,9 @@
|
|||
if (name && !typeof(name) === "string") {name = name.name}
|
||||
file = TEX.extensionDir+"/"+file;
|
||||
if (!file.match(/\.js$/)) {file += ".js"}
|
||||
if (!MathJax.Ajax.loaded[MathJax.Ajax.fileURL(file)]) {
|
||||
if (!AJAX.loaded[AJAX.fileURL(file)]) {
|
||||
if (name != null) {delete TEXDEF[array || 'macros'][name.replace(/^\\/,"")]}
|
||||
MathJax.Hub.RestartAfter(MathJax.Ajax.Require(file));
|
||||
HUB.RestartAfter(AJAX.Require(file));
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1388,7 +1436,7 @@
|
|||
{TEX.Error("MathJax maximum macro substitution count exceeded; is there a recursive macro call?")}
|
||||
},
|
||||
|
||||
Matrix: function (name,open,close,align,spacing,vspacing,style) {
|
||||
Matrix: function (name,open,close,align,spacing,vspacing,style,cases) {
|
||||
var c = this.GetNext(); if (c === "") {TEX.Error("Missing argument for "+name)}
|
||||
if (c === "{") {this.i++} else {this.string = c+"}"+this.string.slice(this.i+1); this.i = 0}
|
||||
var array = STACKITEM.array().With({
|
||||
|
@ -1398,6 +1446,7 @@
|
|||
columnspacing: (spacing||"1em")
|
||||
}
|
||||
});
|
||||
if (cases) {array.isCases = TRUE}
|
||||
if (open || close) {array.open = open; array.close = close}
|
||||
if (style === "D") {array.arraydef.displaystyle = TRUE}
|
||||
if (align != null) {array.arraydef.columnalign = align}
|
||||
|
@ -1406,6 +1455,24 @@
|
|||
|
||||
Entry: function (name) {
|
||||
this.Push(STACKITEM.cell().With({isEntry: TRUE, name: name}));
|
||||
if (this.stack.Top().isCases) {
|
||||
var string = this.string;
|
||||
var braces = 0, i = this.i, m = string.length;
|
||||
while (i < m) {
|
||||
var c = string.charAt(i);
|
||||
if (c === "{") {braces++; i++}
|
||||
else if (c === "}") {if (braces === 0) {m = 0} else {braces--; i++}}
|
||||
else if (c === "&" && braces === 0) {TEX.Error("Extra alignment tab in \\cases text")}
|
||||
else if (c === "\\") {
|
||||
if (string.substr(i).match(/^((\\cr)[^a-zA-Z]|\\\\)/)) {m = 0} else {i += 2}
|
||||
} else {i++}
|
||||
}
|
||||
var text = string.substr(this.i,i-this.i);
|
||||
if (!text.match(/^\s*\\text[^a-zA-Z]/)) {
|
||||
this.Push.apply(this,this.InternalMath(text));
|
||||
this.i = i;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Cr: function (name) {
|
||||
|
@ -1467,10 +1534,10 @@
|
|||
Begin: function (name) {
|
||||
var env = this.GetArgument(name);
|
||||
if (env.match(/[^a-z*]/i)) {TEX.Error('Invalid environment name "'+env+'"')}
|
||||
if (!TEXDEF.environment[env]) {TEX.Error('Unknown environment "'+env+'"')}
|
||||
var cmd = this.envFindName(env); if (!cmd) {TEX.Error('Unknown environment "'+env+'"')}
|
||||
if (++this.macroCount > TEX.config.MAXMACROS)
|
||||
{TEX.Error("MathJax maximum substitution count exceeded; is there a recursive latex environment?")}
|
||||
var cmd = TEXDEF.environment[env]; if (!(cmd instanceof Array)) {cmd = [cmd]}
|
||||
if (!(cmd instanceof Array)) {cmd = [cmd]}
|
||||
var mml = STACKITEM.begin().With({name: env, end: cmd[1], parse:this});
|
||||
if (cmd[0] && this[cmd[0]]) {mml = this[cmd[0]].apply(this,[mml].concat(cmd.slice(2)))}
|
||||
this.Push(mml);
|
||||
|
@ -1478,6 +1545,7 @@
|
|||
End: function (name) {
|
||||
this.Push(STACKITEM.end().With({name: this.GetArgument(name)}));
|
||||
},
|
||||
envFindName: function (name) {return TEXDEF.environment[name]},
|
||||
|
||||
Equation: function (begin,row) {return row},
|
||||
|
||||
|
@ -1683,27 +1751,35 @@
|
|||
InternalMath: function (text,level) {
|
||||
var def = {displaystyle: FALSE}; if (level != null) {def.scriptlevel = level}
|
||||
if (this.stack.env.font) {def.mathvariant = this.stack.env.font}
|
||||
if (!text.match(/\$|\\\(/)) {return [this.InternalText(text,def)]}
|
||||
if (!text.match(/\$|\\\(|\\(eq)?ref\s*\{/)) {return [this.InternalText(text,def)]}
|
||||
var i = 0, k = 0, c, match = '';
|
||||
var mml = [];
|
||||
while (i < text.length) {
|
||||
c = text.charAt(i++);
|
||||
if (c === '$') {
|
||||
if (match === '$') {
|
||||
mml.push(MML.TeXAtom(TEX.Parse(text.slice(k,i-1)).mml().With(def)));
|
||||
mml.push(MML.TeXAtom(TEX.Parse(text.slice(k,i-1),{}).mml().With(def)));
|
||||
match = ''; k = i;
|
||||
} else if (match === '') {
|
||||
if (k < i-1) {mml.push(this.InternalText(text.slice(k,i-1),def))}
|
||||
match = '$'; k = i;
|
||||
}
|
||||
} else if (c === '}' && match === '}') {
|
||||
mml.push(MML.TeXAtom(TEX.Parse(text.slice(k,i),{}).mml().With(def)));
|
||||
match = ''; k = i;
|
||||
} else if (c === '\\') {
|
||||
c = text.charAt(i++);
|
||||
if (c === '(' && match === '') {
|
||||
if (k < i-2) {mml.push(this.InternalText(text.slice(k,i-2),def))}
|
||||
match = ')'; k = i;
|
||||
} else if (c === ')' && match === ')') {
|
||||
mml.push(MML.TeXAtom(TEX.Parse(text.slice(k,i-2)).mml().With(def)));
|
||||
match = ''; k = i;
|
||||
if (match === '' && text.substr(i).match(/^(eq)?ref\s*\{/)) {
|
||||
if (k < i-1) {mml.push(this.InternalText(text.slice(k,i-1),def))}
|
||||
match = '}'; k = i-1;
|
||||
} else {
|
||||
c = text.charAt(i++);
|
||||
if (c === '(' && match === '') {
|
||||
if (k < i-2) {mml.push(this.InternalText(text.slice(k,i-2),def))}
|
||||
match = ')'; k = i;
|
||||
} else if (c === ')' && match === ')') {
|
||||
mml.push(MML.TeXAtom(TEX.Parse(text.slice(k,i-2),{}).mml().With(def)));
|
||||
match = ''; k = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1762,42 +1838,76 @@
|
|||
|
||||
sourceMenuTitle: "TeX Commands",
|
||||
|
||||
prefilterHooks: MathJax.Callback.Hooks(true), // hooks to run before processing TeX
|
||||
postfilterHooks: MathJax.Callback.Hooks(true), // hooks to run after processing TeX
|
||||
|
||||
//
|
||||
// Check if AMSmath extension must be loaded and push
|
||||
// it on the extensions array, if needed
|
||||
//
|
||||
Config: function () {
|
||||
this.SUPER(arguments).Config.apply(this,arguments);
|
||||
if (this.config.equationNumbers.autoNumber !== "none") {
|
||||
if (!this.config.extensions) {this.config.extensions = []}
|
||||
this.config.extensions.push("AMSmath.js");
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Convert TeX to ElementJax
|
||||
//
|
||||
Translate: function (script) {
|
||||
var mml, math = script.innerHTML.replace(/^\s+/,"").replace(/\s+$/,"");
|
||||
if (MathJax.Hub.Browser.isKonqueror)
|
||||
{math = math.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}
|
||||
var displaystyle =
|
||||
(script.type.replace(/\n/g," ").match(/(;|\s|\n)mode\s*=\s*display(;|\s|\n|$)/) != null);
|
||||
math = TEX.prefilterMath(math,displaystyle,script);
|
||||
var mml, isError = false, math = script.innerHTML.replace(/^\s+/,"").replace(/\s+$/,"");
|
||||
var display = (script.type.replace(/\n/g," ").match(/(;|\s|\n)mode\s*=\s*display(;|\s|\n|$)/) != null);
|
||||
var data = {math:math, display:display, script:script};
|
||||
this.prefilterHooks.Execute(data); math = data.math;
|
||||
try {
|
||||
mml = TEX.Parse(math).mml();
|
||||
// mml = MML.semantics(mml,MML.annotation(math).With({encoding:"application:x-tex"}));
|
||||
} catch(err) {
|
||||
if (!err.texError) {throw err}
|
||||
mml = this.formatError(err,math,displaystyle,script);
|
||||
mml = this.formatError(err,math,display,script);
|
||||
isError = true;
|
||||
}
|
||||
if (mml.inferred) {mml = MML.apply(MathJax.ElementJax,mml.data)} else {mml = MML(mml)}
|
||||
if (displaystyle) {mml.root.display = "block"}
|
||||
return this.postfilterMath(mml,displaystyle,script);
|
||||
if (display) {mml.root.display = "block"}
|
||||
if (isError) {mml.texError = true}
|
||||
data.math = mml; this.postfilterHooks.Execute(data);
|
||||
return data.math;
|
||||
},
|
||||
prefilterMath: function (math,displaystyle,script) {
|
||||
prefilterMath: function (data) {
|
||||
// Konqueror incorrectly quotes these characters in script.innerHTML
|
||||
if (HUB.Browser.isKonqueror)
|
||||
{data.math = data.math.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}
|
||||
// avoid parsing super- and subscript numbers as a unit
|
||||
return math.replace(/([_^]\s*\d)([0-9.,])/g,"$1 $2");
|
||||
data.math = data.math.replace(/([_^]\s*\d)([0-9.,])/g,"$1 $2");
|
||||
},
|
||||
postfilterMath: function (math,displaystyle,script) {
|
||||
this.combineRelations(math.root);
|
||||
return math;
|
||||
postfilterMath: function (data) {
|
||||
this.combineRelations(data.math.root);
|
||||
},
|
||||
formatError: function (err,math,displaystyle,script) {
|
||||
formatError: function (err,math,display,script) {
|
||||
return MML.merror(err.message.replace(/\n.*/,""));
|
||||
},
|
||||
|
||||
//
|
||||
// Produce an error and stop processing this equation
|
||||
//
|
||||
Error: function (message) {
|
||||
throw MathJax.Hub.Insert(Error(message),{texError: TRUE});
|
||||
},
|
||||
Macro: function (name,def,argn) {
|
||||
TEXDEF.macros[name] = ['Macro'].concat([].slice.call(arguments,1));
|
||||
throw HUB.Insert(Error(message),{texError: TRUE});
|
||||
},
|
||||
|
||||
//
|
||||
// Add a user-defined macro to the macro list
|
||||
//
|
||||
Macro: function (name,def,argn) {
|
||||
TEXDEF.macros[name] = ['Macro'].concat([].slice.call(arguments,1));
|
||||
TEXDEF.macros[name].isUser = true;
|
||||
},
|
||||
|
||||
//
|
||||
// Combine adjacent <mo> elements that are relations
|
||||
// (since MathML treats the spacing very differently)
|
||||
//
|
||||
combineRelations: function (mml) {
|
||||
var i, m, m1, m2;
|
||||
for (i = 0, m = mml.data.length; i < m; i++) {
|
||||
|
@ -1821,6 +1931,12 @@
|
|||
}
|
||||
});
|
||||
|
||||
//
|
||||
// Add the default filters
|
||||
//
|
||||
TEX.prefilterHooks.Add(["prefilterMath",TEX]);
|
||||
TEX.postfilterHooks.Add(["postfilterMath",TEX]);
|
||||
|
||||
TEX.loadComplete("jax.js");
|
||||
|
||||
})(MathJax.InputJax.TeX);
|
||||
})(MathJax.InputJax.TeX,MathJax.Hub,MathJax.Ajax);
|
||||
|
|
|
@ -42,35 +42,38 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
|
|||
|
||||
toHTML: function (span,HW,D) {
|
||||
span = this.HTMLhandleSize(this.HTMLcreateSpan(span)); span.bbox = null;
|
||||
var values = this.getValues("actiontype","selection"), frame;
|
||||
var selected = this.data[values.selection-1];
|
||||
var selected = this.selected();
|
||||
if (selected) {
|
||||
HTMLCSS.Measured(selected.toHTML(span),span);
|
||||
if (D != null) {HTMLCSS.Remeasured(selected.HTMLstretchV(span,HW,D),span)}
|
||||
else if (HW != null) {HTMLCSS.Remeasured(selected.HTMLstretchH(span,HW),span)}
|
||||
if (HTMLCSS.msieHitBoxBug) {
|
||||
// margin-left doesn't work on inline-block elements in IE, so put it in a SPAN
|
||||
var box = HTMLCSS.addElement(span,"span",{isMathJax:true});
|
||||
frame = HTMLCSS.createFrame(box,span.bbox.h,span.bbox.d,span.bbox.w,0,"none");
|
||||
span.insertBefore(box,span.firstChild); // move below the content
|
||||
box.style.marginRight = HTMLCSS.Em(-span.bbox.w);
|
||||
if (HTMLCSS.msieInlineBlockAlignBug)
|
||||
{frame.style.verticalAlign = HTMLCSS.Em(HTMLCSS.getHD(span).d-span.bbox.d)}
|
||||
} else {
|
||||
frame = HTMLCSS.createFrame(span,span.bbox.h,span.bbox.d,span.bbox.w,0,"none");
|
||||
span.insertBefore(frame,span.firstChild); // move below the content
|
||||
frame.style.marginRight = HTMLCSS.Em(-span.bbox.w);
|
||||
}
|
||||
frame.className = "MathJax_HitBox";
|
||||
frame.id = "MathJax-HitBox-"+this.spanID;
|
||||
|
||||
if (this.HTMLaction[values.actiontype])
|
||||
{this.HTMLaction[values.actiontype].call(this,span,frame,values.selection)}
|
||||
this.HTMLhandleHitBox(span);
|
||||
}
|
||||
this.HTMLhandleSpace(span);
|
||||
this.HTMLhandleColor(span);
|
||||
return span;
|
||||
},
|
||||
HTMLhandleHitBox: function (span,postfix) {
|
||||
var frame;
|
||||
if (HTMLCSS.msieHitBoxBug) {
|
||||
// margin-left doesn't work on inline-block elements in IE, so put it in a SPAN
|
||||
var box = HTMLCSS.addElement(span,"span",{isMathJax:true});
|
||||
frame = HTMLCSS.createFrame(box,span.bbox.h,span.bbox.d,span.bbox.w,0,"none");
|
||||
span.insertBefore(box,span.firstChild); // move below the content
|
||||
box.style.marginRight = HTMLCSS.Em(-span.bbox.w);
|
||||
if (HTMLCSS.msieInlineBlockAlignBug)
|
||||
{frame.style.verticalAlign = HTMLCSS.Em(HTMLCSS.getHD(span).d-span.bbox.d)}
|
||||
} else {
|
||||
frame = HTMLCSS.createFrame(span,span.bbox.h,span.bbox.d,span.bbox.w,0,"none");
|
||||
span.insertBefore(frame,span.firstChild); // move below the content
|
||||
frame.style.marginRight = HTMLCSS.Em(-span.bbox.w);
|
||||
}
|
||||
frame.className = "MathJax_HitBox";
|
||||
frame.id = "MathJax-HitBox-" + this.spanID + (postfix||"") + HTMLCSS.idPostfix;
|
||||
|
||||
var type = this.Get("actiontype");
|
||||
if (this.HTMLaction[type]) {this.HTMLaction[type].call(this,span,frame,this.Get("selection"))}
|
||||
},
|
||||
HTMLstretchH: MML.mbase.HTMLstretchH,
|
||||
HTMLstretchV: MML.mbase.HTMLstretchV,
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* MathJax/jax/output/HTML-CSS/autoload/multiline.js
|
||||
*
|
||||
* Implements the HTML-CSS output <mrow>'s that contain line breaks.
|
||||
* Implements the HTML-CSS output for <mrow>'s that contain line breaks.
|
||||
*
|
||||
* ---------------------------------------------------------------------
|
||||
*
|
||||
|
@ -25,59 +25,97 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
|
|||
var VERSION = "1.1";
|
||||
var MML = MathJax.ElementJax.mml,
|
||||
HTMLCSS = MathJax.OutputJax["HTML-CSS"];
|
||||
|
||||
//
|
||||
// Penalties for the various line breaks
|
||||
//
|
||||
var PENALTY = {
|
||||
newline: 0,
|
||||
nobreak: 1000000,
|
||||
goodbreak: [-200],
|
||||
badbreak: [+200],
|
||||
auto: [0],
|
||||
|
||||
toobig: 500,
|
||||
nestfactor: 400,
|
||||
fence: 500
|
||||
};
|
||||
|
||||
var ENDVALUES = {linebreakstyle: "after"};
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
MML.mbase.Augment({
|
||||
toHTMLmultiline: function (span,split) {
|
||||
span = this.HTMLcreateSpan(span); if (!this.type !== "mrow") {span = this.HTMLhandleSize(span)}
|
||||
var stack = HTMLCSS.createStack(span);
|
||||
var box = [], stretchy = [], H = -HTMLCSS.BIGDIMEN, D = -HTMLCSS.BIGDIMEN, i, j, m, M;
|
||||
for (j = 0, M = split.length-1; j < M; j++) {
|
||||
box[j] = HTMLCSS.createBox(stack);
|
||||
for (i = split[j][0], m = split[j+1][0]; i < m; i++)
|
||||
{if (this.data[i]) {this.data[i].toHTML(box[j])}}
|
||||
// remove inter-object spacing
|
||||
if (this.data[split[j][0]]) {this.data[split[j][0]].HTMLspanElement().style.paddingLeft = ""}
|
||||
if (this.data[split[j][m-1]]) {this.data[split[j][m-1]].HTMLspanElement().style.paddingRight = ""}
|
||||
//
|
||||
stretchy[j] = this.HTMLcomputeBBox(box[j],null,split[j][0],split[j+1][0]);
|
||||
if (box[j].bbox.h > H) {H = box[j].bbox.h}
|
||||
if (box[j].bbox.d > D) {D = box[j].bbox.d}
|
||||
}
|
||||
var y = 0, scale = this.HTMLgetScale(), LHD = HTMLCSS.FONTDATA.baselineskip * scale;
|
||||
var parent = this, first;
|
||||
HTMLlinebreakPenalty: PENALTY,
|
||||
|
||||
/****************************************************************/
|
||||
//
|
||||
// Handle breaking an mrow into separate lines
|
||||
//
|
||||
HTMLmultiline: function (span) {
|
||||
|
||||
//
|
||||
// Find the parent element and mark it as multiline
|
||||
//
|
||||
var parent = this;
|
||||
while (parent.inferred || (parent.parent && parent.parent.type === "mrow" &&
|
||||
parent.parent.data.length === 1)) {parent = parent.parent}
|
||||
var isTop = (parent.type === "math" || parent.type === "mtd"); parent.isMultiline = true;
|
||||
for (j = 0, M = split.length-1; j < M; j++) {
|
||||
for (i = 0, m = stretchy[j].length; i < m; i++) {stretchy[j][i].HTMLstretchV(box[j],H,D)}
|
||||
if (stretchy[j].length) {this.HTMLcomputeBBox(box[j],true,split[j][0],split[j+1][0])}
|
||||
var values = split[j][1].getValues("indentalign","indentshift");
|
||||
values.lineleading = HTMLCSS.length2em(split[j+1][1].Get("lineleading"),.5);
|
||||
// handle first/last special cases
|
||||
if (j === 0) {
|
||||
first = split[j+1][1].getValues("indentalignfirst","indentshiftfirst");
|
||||
values.ALIGN = first.indentalignfirst; values.SHIFT = first.indentshiftfirst;
|
||||
} else if (j === M-1) {
|
||||
first = split[j][1].getValues("indentalignlast","indentshiftlast");
|
||||
values.ALIGN = first.indentalignlast; values.SHIFT = first.indentshiftlast;
|
||||
}
|
||||
if (values.ALIGN && values.ALIGN !== MML.INDENTALIGN.INDENTALIGN)
|
||||
{values.indentalign = values.ALIGN}
|
||||
if (values.SHIFT && values.SHIFT !== MML.INDENTSHIFT.INDENTSHIFT)
|
||||
{values.indentshift = values.SHIFT}
|
||||
//
|
||||
if (values.indentalign == MML.INDENTALIGN.AUTO)
|
||||
{values.indentalign = (isTop ? this.displayAlign : MML.INDENTALIGN.LEFT)}
|
||||
if (values.indentshift === "auto" || values.indentshift === "")
|
||||
{values.indentshift = (isTop ? this.displayIndent : "0")}
|
||||
values.indentshift = HTMLCSS.length2em(values.indentshift,0);
|
||||
if (values.indentshift && values.indentalign !== MML.INDENTALIGN.CENTER) {
|
||||
HTMLCSS.createBlank(box[j],values.indentshift,(values.indentalign !== MML.INDENTALIGN.RIGHT));
|
||||
box[j].bbox.w += values.indentshift; box[j].bbox.rw += values.indentshift;
|
||||
}
|
||||
HTMLCSS.alignBox(box[j],values.indentalign,y);
|
||||
if (j < M-1) {y -= Math.max(LHD,box[j].bbox.d + box[j+1].bbox.h + values.lineleading)}
|
||||
var isTop = ((parent.type === "math" && parent.Get("display") === "block") ||
|
||||
parent.type === "mtd");
|
||||
parent.isMultiline = true;
|
||||
|
||||
//
|
||||
// Default values for the line-breaking parameters
|
||||
//
|
||||
var VALUES = this.getValues(
|
||||
"linebreak","linebreakstyle","lineleading","linebreakmultchar",
|
||||
"indentalign","indentshift",
|
||||
"indentalignfirst","indentshiftfirst",
|
||||
"indentalignlast","indentshiftlast"
|
||||
);
|
||||
if (VALUES.linebreakstyle === MML.LINEBREAKSTYLE.INFIXLINEBREAKSTYLE)
|
||||
{VALUES.linebreakstyle = this.Get("infixlinebreakstyle")}
|
||||
VALUES.lineleading = HTMLCSS.length2em(VALUES.lineleading,0.5);
|
||||
|
||||
//
|
||||
// Remove old color and break the span at its best line breaks
|
||||
//
|
||||
this.HTMLremoveColor(span);
|
||||
var stack = HTMLCSS.createStack(span);
|
||||
var state = {
|
||||
n: 0, Y: 0,
|
||||
scale: this.HTMLgetScale(),
|
||||
isTop: isTop,
|
||||
values: {},
|
||||
VALUES: VALUES
|
||||
},
|
||||
align = this.HTMLgetAlign(state,{}),
|
||||
shift = this.HTMLgetShift(state,{},align),
|
||||
start = [],
|
||||
end = {
|
||||
index:[], penalty:PENALTY.nobreak,
|
||||
w:0, W:shift, shift:shift, scanW:shift,
|
||||
nest: 0
|
||||
},
|
||||
broken = false;
|
||||
|
||||
while (this.HTMLbetterBreak(end,state) &&
|
||||
(end.scanW >= HTMLCSS.linebreakWidth || end.penalty == PENALTY.newline)) {
|
||||
this.HTMLaddLine(stack,start,end.index,state,end.values,broken);
|
||||
start = end.index.slice(0); broken = true;
|
||||
align = this.HTMLgetAlign(state,end.values);
|
||||
shift = this.HTMLgetShift(state,end.values,align);
|
||||
if (align === MML.INDENTALIGN.CENTER) {shift = 0}
|
||||
end.W = end.shift = end.scanW = shift; end.penalty = PENALTY.nobreak;
|
||||
}
|
||||
state.isLast = true;
|
||||
this.HTMLaddLine(stack,start,[],state,ENDVALUES,broken);
|
||||
|
||||
//
|
||||
// Make top-level spans 100% wide.
|
||||
// Finish up the space and add the color again
|
||||
//
|
||||
if (isTop) {
|
||||
stack.style.width = "100%";
|
||||
if (parent.type === "math") {span.bbox.width = "100%"}
|
||||
|
@ -85,10 +123,399 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
|
|||
this.HTMLhandleSpace(span);
|
||||
this.HTMLhandleColor(span);
|
||||
span.bbox.isMultiline = true;
|
||||
|
||||
return span;
|
||||
},
|
||||
|
||||
/****************************************************************/
|
||||
//
|
||||
// Locate the next linebreak that is better than the current one
|
||||
//
|
||||
HTMLbetterBreak: function (info,state) {
|
||||
if (this.isToken) {return false} // FIXME: handle breaking of token elements
|
||||
if (this.isEmbellished()) {
|
||||
info.embellished = this;
|
||||
return this.CoreMO().HTMLbetterBreak(info,state);
|
||||
}
|
||||
if (this.linebreakContainer) {return false}
|
||||
//
|
||||
// Get the current breakpoint position and other data
|
||||
//
|
||||
var index = info.index.slice(0), i = info.index.shift(),
|
||||
m = this.data.length, W, scanW = info.W,
|
||||
broken = (info.index.length > 0), better = false;
|
||||
if (i == null) {i = -1}; if (!broken) {i++; info.W += info.w};
|
||||
info.w = 0; info.nest++;
|
||||
//
|
||||
// Look through the line for breakpoints,
|
||||
// (as long as we are not too far past the breaking width)
|
||||
//
|
||||
while (i < m && info.W < 1.33*HTMLCSS.linebreakWidth) {
|
||||
if (this.data[i]) {
|
||||
if (this.data[i].HTMLbetterBreak(info,state)) {
|
||||
better = true; index = [i].concat(info.index); W = info.W;
|
||||
if (info.penalty === PENALTY.newline) {info.index = index; info.nest--; return true}
|
||||
}
|
||||
if (!broken) {
|
||||
var span = this.data[i].HTMLspanElement();
|
||||
scanW += span.bbox.w;
|
||||
if (span.style.paddingLeft) {scanW += parseFloat(span.style.paddingLeft)}
|
||||
if (span.style.paddingRight) {scanW += parseFloat(span.style.paddingRight)}
|
||||
info.W = info.scanW = scanW;
|
||||
}
|
||||
}
|
||||
info.index = []; i++; broken = false;
|
||||
}
|
||||
info.nest--; info.index = index;
|
||||
if (better) {info.W = W}
|
||||
return better;
|
||||
},
|
||||
|
||||
/****************************************************************/
|
||||
//
|
||||
// Create a new line and move the required elements into it
|
||||
// Position it using proper alignment and indenting
|
||||
//
|
||||
HTMLaddLine: function (stack,start,end,state,values,broken) {
|
||||
//
|
||||
// Create a box for the line, with empty BBox
|
||||
// fill it with the proper elements,
|
||||
// and clean up the bbox
|
||||
//
|
||||
line = HTMLCSS.createBox(stack);
|
||||
line.bbox = this.HTMLemptyBBox({});
|
||||
state.first = broken; state.last = true;
|
||||
this.HTMLmoveLine(start,end,line,state,values);
|
||||
this.HTMLcleanBBox(line.bbox);
|
||||
//
|
||||
// Get the alignment and shift values
|
||||
//
|
||||
var align = this.HTMLgetAlign(state,values),
|
||||
shift = this.HTMLgetShift(state,values,align);
|
||||
//
|
||||
// Add in space for the shift
|
||||
//
|
||||
if (shift) {
|
||||
HTMLCSS.createBlank(line,shift,(align !== MML.INDENTALIGN.RIGHT));
|
||||
line.bbox.w += shift; line.bbox.rw += shift;
|
||||
}
|
||||
//
|
||||
// Set the Y offset based on previous depth, leading, and current height
|
||||
//
|
||||
if (state.n > 0) {
|
||||
var LHD = HTMLCSS.FONTDATA.baselineskip * state.scale;
|
||||
var leading = (state.values.lineleading == null ? state.VALUES : state.values).lineleading;
|
||||
state.Y -= Math.max(LHD,state.d + line.bbox.h + leading);
|
||||
}
|
||||
//
|
||||
// Place the new line
|
||||
//
|
||||
HTMLCSS.alignBox(line,align,state.Y);
|
||||
//
|
||||
// Save the values needed for the future
|
||||
//
|
||||
state.d = line.bbox.d; state.values = values; state.n++;
|
||||
},
|
||||
|
||||
/****************************************************************/
|
||||
//
|
||||
// Get alignment and shift values from the given data
|
||||
//
|
||||
HTMLgetAlign: function (state,values) {
|
||||
var cur = values, prev = state.values, def = state.VALUES, align;
|
||||
if (state.n === 0) {align = cur.indentalignfirst || prev.indentalignfirst || def.indentalignfirst}
|
||||
else if (state.isLast) {align = prev.indentalignlast || def.indentalignlast}
|
||||
else {align = prev.indentalign || def.indentalign}
|
||||
if (align === MML.INDENTALIGN.INDENTALIGN) {align = prev.indentalign || def.indentalign}
|
||||
if (align === MML.INDENTALIGN.AUTO) {align = (state.isTop ? this.displayAlign : MML.INDENTALIGN.LEFT)}
|
||||
return align;
|
||||
},
|
||||
HTMLgetShift: function (state,values,align) {
|
||||
if (align === MML.INDENTALIGN.CENTER) {return 0}
|
||||
var cur = values, prev = state.values, def = state.VALUES, shift;
|
||||
if (state.n === 0) {shift = cur.indentshiftfirst || prev.indentshiftfirst || def.indentshiftfirst}
|
||||
else if (state.isLast) {shift = prev.indentshiftlast || def.indentshiftlast}
|
||||
else {shift = prev.indentshift || def.indentshift}
|
||||
if (shift === MML.INDENTSHIFT.INDENTSHIFT) {shift = prev.indentshift || def.indentshift}
|
||||
if (shift === "auto" || shift === "") {shift = (state.isTSop ? this.displayIndent : "0")}
|
||||
return HTMLCSS.length2em(shift,0);
|
||||
},
|
||||
|
||||
/****************************************************************/
|
||||
//
|
||||
// Move the selected elements into the new line's span,
|
||||
// moving whole items when possible, and parts of ones
|
||||
// that are split by a line break.
|
||||
//
|
||||
HTMLmoveLine: function (start,end,span,state,values) {
|
||||
var i = start[0], j = end[0];
|
||||
if (i == null) {i = -1}; if (j == null) {j = this.data.length-1}
|
||||
if (i === j && start.length > 1) {
|
||||
//
|
||||
// If starting and ending in the same element move the subpiece to the new line
|
||||
//
|
||||
this.data[i].HTMLmoveSlice(start.slice(1),end.slice(1),span,state,values,"paddingLeft");
|
||||
} else {
|
||||
//
|
||||
// Otherwise, move the remainder of the initial item
|
||||
// and any others up tp the last one
|
||||
//
|
||||
var last = state.last; state.last = false;
|
||||
while (i < j) {
|
||||
if (this.data[i]) {
|
||||
if (start.length <= 1) {this.data[i].HTMLmoveSpan(span,state,values)}
|
||||
else {this.data[i].HTMLmoveSlice(start.slice(1),[],span,state,values,"paddingLeft")}
|
||||
}
|
||||
i++; state.first = false; start = [];
|
||||
}
|
||||
//
|
||||
// If the last item is complete, move it,
|
||||
// otherwise move the first part of it up to the split
|
||||
//
|
||||
state.last = last;
|
||||
if (this.data[i]) {
|
||||
if (end.length <= 1) {this.data[i].HTMLmoveSpan(span,state,values)}
|
||||
else {this.data[i].HTMLmoveSlice([],end.slice(1),span,state,values,"paddingRight")}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/****************************************************************/
|
||||
//
|
||||
// Split an element and copy the selected items into the new part
|
||||
//
|
||||
HTMLmoveSlice: function (start,end,span,state,values,padding) {
|
||||
//
|
||||
// Get rid of color, if any (added back in later)
|
||||
// Create a new span for the slice of the element
|
||||
// Move the selected portion into the slice
|
||||
// If it is the last slice
|
||||
// Remove the original (now empty) span
|
||||
// Rename the Continue-0 span with the original name (for HTMLspanElement)
|
||||
// Add back the color
|
||||
//
|
||||
this.HTMLremoveColor();
|
||||
var slice = this.HTMLcreateSliceSpan(span);
|
||||
this.HTMLmoveLine(start,end,slice,state,values);
|
||||
slice.style[padding] = "";
|
||||
this.HTMLcombineBBoxes(slice,span.bbox);
|
||||
this.HTMLcleanBBox(slice.bbox);
|
||||
if (end.length === 0) {
|
||||
span = this.HTMLspanElement();
|
||||
span.parentNode.removeChild(span);
|
||||
span.nextMathJaxSpan.id = span.id; var n = 0;
|
||||
while (span = span.nextMathJaxSpan) {
|
||||
var color = this.HTMLhandleColor(span);
|
||||
if (color) {color.id += "-MathJax-Continue-"+n; n++}
|
||||
}
|
||||
}
|
||||
return slice;
|
||||
},
|
||||
|
||||
/****************************************************************/
|
||||
//
|
||||
// Create a new span for an element that is split in two
|
||||
// Clone the original and update its ID.
|
||||
// Link the old span to the new one so we can find it later
|
||||
//
|
||||
HTMLcreateSliceSpan: function (span) {
|
||||
var SPAN = this.HTMLspanElement(), n = 0;
|
||||
var LAST = SPAN; while (LAST.nextMathJaxSpan) {LAST = LAST.nextMathJaxSpan; n++}
|
||||
var SLICE = SPAN.cloneNode(false); LAST.nextMathJaxSpan = SLICE;
|
||||
SLICE.id += "-MathJax-Continue-"+n;
|
||||
SLICE.bbox = this.HTMLemptyBBox({});
|
||||
return span.appendChild(SLICE);
|
||||
},
|
||||
|
||||
/****************************************************************/
|
||||
//
|
||||
// Move an element from its original span to its new location in
|
||||
// a split element or the new line's span
|
||||
//
|
||||
HTMLmoveSpan: function (line,state,values) {
|
||||
// FIXME: handle linebreakstyle === "duplicate"
|
||||
// FIXME: handle linebreakmultchar
|
||||
if (!(state.first || state.last) ||
|
||||
(state.first && state.values.linebreakstyle === MML.LINEBREAKSTYLE.BEFORE) ||
|
||||
(state.last && values.linebreakstyle === MML.LINEBREAKSTYLE.AFTER)) {
|
||||
//
|
||||
// Move color and span
|
||||
//
|
||||
var color = document.getElementById("MathJax-Color-"+this.spanID+HTMLCSS.idPostfix);
|
||||
if (color) {line.appendChild(color)}
|
||||
var span = this.HTMLspanElement();
|
||||
line.appendChild(span);
|
||||
//
|
||||
// If it is last, remove right padding
|
||||
// If it is first, remove left padding and recolor
|
||||
//
|
||||
if (state.last) {span.style.paddingRight = ""}
|
||||
if (state.first || state.nextIsFirst) {
|
||||
delete state.nextIsFirst;
|
||||
span.style.paddingLeft = "";
|
||||
if (color) {this.HTMLremoveColor(span); this.HTMLhandleColor(span)}
|
||||
}
|
||||
//
|
||||
// Update bounding box
|
||||
//
|
||||
this.HTMLcombineBBoxes(this,line.bbox);
|
||||
} else if (state.first) {state.nextIsFirst = true} else {delete state.nextIsFirst}
|
||||
}
|
||||
});
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
MML.mo.Augment({
|
||||
//
|
||||
// Override the method for checking line breaks to properly handle <mo>
|
||||
//
|
||||
HTMLbetterBreak: function (info,state) {
|
||||
var values = this.getValues(
|
||||
"linebreak","linebreakstyle","lineleading","linebreakmultchar",
|
||||
"indentalign","indentshift",
|
||||
"indentalignfirst","indentshiftfirst",
|
||||
"indentalignlast","indentshiftlast"
|
||||
);
|
||||
if (values.linebreakstyle === MML.LINEBREAKSTYLE.INFIXLINEBREAKSTYLE)
|
||||
{values.linebreakstyle = this.Get("infixlinebreakstyle")}
|
||||
//
|
||||
// Get the default penalty for this location
|
||||
//
|
||||
var W = info.W, mo = (info.embellished||this); delete info.embellished;
|
||||
var span = mo.HTMLspanElement(), w = span.bbox.w;
|
||||
if (span.style.paddingLeft) {w += parseFloat(span.style.paddingLeft)}
|
||||
if (values.linebreakstyle === MML.LINEBREAKSTYLE.AFTER) {W += w; w = 0}
|
||||
if (W - info.shift === 0) {return false} // don't break at zero width (FIXME?)
|
||||
var offset = HTMLCSS.linebreakWidth - W;
|
||||
// adjust offest for explicit first-line indent and align
|
||||
if (state.n === 0 && (values.indentshiftfirst !== state.VALUES.indentshiftfirst ||
|
||||
values.indentalignfirst !== state.VALUES.indentalignfirst)) {
|
||||
var align = this.HTMLgetAlign(state,values),
|
||||
shift = this.HTMLgetShift(state,values,align);
|
||||
offset += (info.shift - shift);
|
||||
}
|
||||
//
|
||||
var penalty = Math.floor(offset / HTMLCSS.linebreakWidth * 1000);
|
||||
if (penalty < 0) {penalty = PENALTY.toobig - 3*penalty}
|
||||
if (this.Get("fence")) {penalty += PENALTY.fence}
|
||||
penalty += info.nest * PENALTY.nestfactor;
|
||||
//
|
||||
// Get the penalty for this type of break and
|
||||
// use it to modify the default penalty
|
||||
//
|
||||
var linebreak = PENALTY[values.linebreak||MML.LINEBREAK.AUTO];
|
||||
if (!(linebreak instanceof Array)) {
|
||||
// for breaks past the width, don't modify penalty
|
||||
if (offset >= 0) {penalty = linebreak * info.nest}
|
||||
} else {penalty = Math.max(1,penalty + linebreak[0] * info.nest)}
|
||||
//
|
||||
// If the penalty is no better than the current one, return false
|
||||
// Otherwise save the data for this breakpoint and return true
|
||||
//
|
||||
if (penalty >= info.penalty) {return false}
|
||||
info.penalty = penalty; info.values = values; info.W = W; info.w = w;
|
||||
values.lineleading = HTMLCSS.length2em(values.lineleading,state.VALUES.lineleading);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
MML.mspace.Augment({
|
||||
//
|
||||
// Override the method for checking line breaks to properly handle <mspace>
|
||||
//
|
||||
HTMLbetterBreak: function (info,state) {
|
||||
var values = this.getValues("linebreak");
|
||||
//
|
||||
// Get the default penalty for this location
|
||||
//
|
||||
var W = info.W, span = this.HTMLspanElement(), w = span.bbox.w;
|
||||
if (span.style.paddingLeft) {w += parseFloat(span.style.paddingLeft)}
|
||||
if (values.linebreakstyle === MML.LINEBREAKSTYLE.AFTER) {W += w; w = 0}
|
||||
if (W - info.shift === 0) {return false} // don't break at zero width (FIXME?)
|
||||
var offset = HTMLCSS.linebreakWidth - W;
|
||||
//
|
||||
var penalty = Math.floor(offset / HTMLCSS.linebreakWidth * 1000);
|
||||
if (penalty < 0) {penalty = PENALTY.toobig - 3*penalty}
|
||||
penalty += info.nest * PENALTY.nestfactor;
|
||||
//
|
||||
// Get the penalty for this type of break and
|
||||
// use it to modify the default penalty
|
||||
//
|
||||
var linebreak = PENALTY[values.linebreak||MML.LINEBREAK.AUTO];
|
||||
if (!(linebreak instanceof Array)) {
|
||||
// for breaks past the width, don't modify penalty
|
||||
if (offset >= 0) {penalty = linebreak * info.nest}
|
||||
} else {penalty = Math.max(1,penalty + linebreak[0] * info.nest)}
|
||||
//
|
||||
// If the penalty is no better than the current one, return false
|
||||
// Otherwise save the data for this breakpoint and return true
|
||||
//
|
||||
if (penalty >= info.penalty) {return false}
|
||||
info.penalty = penalty; info.values = values; info.W = W; info.w = w;
|
||||
values.lineleading = state.VALUES.lineleading; values.linebreakstyle = "before";
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
// Hook into the mathchoice extension
|
||||
//
|
||||
MathJax.Hub.Register.StartupHook("TeX mathchoice Ready",function () {
|
||||
MML.TeXmathchoice.Augment({
|
||||
HTMLbetterBreak: function (info,state) {
|
||||
return this.Core().HTMLbetterBreak(info,state);
|
||||
},
|
||||
HTMLmoveLine: function (start,end,span,state,values) {
|
||||
return this.Core().HTMLmoveSlice(start,end,span,state,values);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//
|
||||
// Have maction process only the selected item
|
||||
//
|
||||
MML.maction.Augment({
|
||||
HTMLbetterBreak: function (info,state) {
|
||||
return this.Core().HTMLbetterBreak(info,state);
|
||||
},
|
||||
HTMLmoveLine: function (start,end,span,state,values) {
|
||||
return this.Core().HTMLmoveSlice(start,end,span,state,values);
|
||||
},
|
||||
//
|
||||
// Split and move the hit boxes as well
|
||||
//
|
||||
HTMLmoveSlice: function (start,end,span,state,values,padding) {
|
||||
var hitbox = document.getElementById("MathJax-HitBox-"+this.spanID+HTMLCSS.idPostfix);
|
||||
if (hitbox) {hitbox.parentNode.removeChild(hitbox)}
|
||||
var slice = this.SUPER(arguments).HTMLmoveSlice.apply(this,arguments);
|
||||
if (end.length === 0) {
|
||||
span = this.HTMLspanElement(); var n = 0;
|
||||
while (span) {
|
||||
hitbox = this.HTMLhandleHitBox(span,"-Continue-"+n);
|
||||
span = span.nextMathJaxSpan; n++;
|
||||
}
|
||||
}
|
||||
return slice;
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
// Have semantics only do the first element
|
||||
// (FIXME: do we need to do anything special about annotation-xml?)
|
||||
//
|
||||
MML.semantics.Augment({
|
||||
HTMLbetterBreak: function (info,state) {
|
||||
return (this.data[0] ? this.data[0].HTMLbetterBreak(info,state) : false);
|
||||
},
|
||||
HTMLmoveLine: function (start,end,span,state,values) {
|
||||
return (this.data[0] ? this.data[0].HTMLmoveSlice(start,end,span,state,values) : null);
|
||||
}
|
||||
});
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
MathJax.Hub.Startup.signal.Post("HTML-CSS multiline Ready");
|
||||
MathJax.Ajax.loadComplete(HTMLCSS.autoloadDir+"/multiline.js");
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
MathJax.OutputJax["HTML-CSS"] = MathJax.OutputJax({
|
||||
id: "HTML-CSS",
|
||||
version: "1.1.13",
|
||||
version: "1.1.14",
|
||||
directory: MathJax.OutputJax.directory + "/HTML-CSS",
|
||||
extensionDir: MathJax.OutputJax.extensionDir + "/HTML-CSS",
|
||||
autoloadDir: MathJax.OutputJax.directory + "/HTML-CSS/autoload",
|
||||
|
@ -39,6 +39,16 @@ MathJax.OutputJax["HTML-CSS"] = MathJax.OutputJax({
|
|||
imageFont: "TeX",
|
||||
undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif",
|
||||
|
||||
linebreaks: {
|
||||
automatic: false, // when false, only process linebreak="newline",
|
||||
// when true, insert line breaks automatically in long expressions.
|
||||
|
||||
width: "container" // maximum width of a line for automatic line breaks (e.g. "30em").
|
||||
// use "container" to compute size from containing element,
|
||||
// use "nn% container" for a portion of the container,
|
||||
// use "nn%" for a portion of the window size
|
||||
},
|
||||
|
||||
styles: {
|
||||
".MathJax_Display": {
|
||||
"text-align": "center",
|
||||
|
@ -56,7 +66,7 @@ MathJax.OutputJax["HTML-CSS"] = MathJax.OutputJax({
|
|||
},
|
||||
|
||||
".MathJax_Preview": {color: "#888888"},
|
||||
|
||||
|
||||
"#MathJax_Tooltip": {
|
||||
"background-color": "InfoBackground", color: "InfoText",
|
||||
border: "1px solid black",
|
||||
|
@ -108,7 +118,7 @@ MathJax.Hub.Register.StartupHook("End Config",[function (HUB,HTMLCSS) {
|
|||
minBrowserTranslate: function (script) {
|
||||
var MJ = HUB.getJaxFor(script), text = ["[Math]"], delim;
|
||||
var span = document.createElement("span",{className: "MathJax_Preview"});
|
||||
if (MJ.inputJax.id === "TeX") {
|
||||
if (MJ.inputJax === "TeX") {
|
||||
if (MJ.root.Get("displaystyle")) {
|
||||
delim = CONFIG.displayMathDelimiters;
|
||||
text = [delim[0]+MJ.originalText+delim[1]];
|
||||
|
|
411
unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata-extra.js
Normal file
411
unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata-extra.js
Normal file
|
@ -0,0 +1,411 @@
|
|||
/*************************************************************
|
||||
*
|
||||
* MathJax/jax/output/HTML-CSS/fonts/STIX/fontdata-extra.js
|
||||
*
|
||||
* Adds extra stretchy characters to the STIX data.
|
||||
*
|
||||
* ---------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2011 Design Science, Inc.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
(function (HTMLCSS) {
|
||||
|
||||
var DELIMITERS = HTMLCSS.FONTDATA.DELIMITERS;
|
||||
|
||||
var GENERAL = "STIXGeneral",
|
||||
BOLD = "STIXGeneral-bold",
|
||||
VARIANT = "STIXVariants",
|
||||
NONUNI = "STIXNonUnicode",
|
||||
SIZE1 = "STIXSizeOneSym",
|
||||
SIZE2 = "STIXSizeTwoSym",
|
||||
SIZE3 = "STIXSizeThreeSym",
|
||||
SIZE4 = "STIXSizeFourSym",
|
||||
SIZE5 = "STIXSizeFiveSym";
|
||||
var H = "H", V = "V";
|
||||
|
||||
var delim = {
|
||||
0x003D: // equal sign
|
||||
{
|
||||
dir: H, HW: [[.685,GENERAL]], stretch: {rep:[0x003D,GENERAL]}
|
||||
},
|
||||
0x219E: // left two-headed arrow
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]], stretch: {left:[0x219E,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x21A0: // right two-headed arrow
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]], stretch: {right:[0x221A0,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x21A4: // left arrow from bar
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0x2190,VARIANT], rep:[0x2212,GENERAL], right:[0x22A3,BOLD,0,.1,.6]}
|
||||
},
|
||||
0x21A5: // up arrow from bar
|
||||
{
|
||||
dir: V, HW: [[.816,GENERAL]],
|
||||
stretch: {bot:[0x5F,GENERAL,.05,-.01,.8], ext:[0x23D0,GENERAL], top:[0x2191,GENERAL]}
|
||||
},
|
||||
0x21A6: // right arrow from bar
|
||||
{
|
||||
dir: H, HW: [[1,GENERAL]],
|
||||
stretch: {left:[0x22A2,BOLD,0,0.1,.6], rep:[0x2212,GENERAL], right:[0x2192,GENERAL]}
|
||||
},
|
||||
0x21A7: // down arrow from bar
|
||||
{
|
||||
dir: V, HW: [[.816,GENERAL]],
|
||||
stretch: {top:[0x22A4,BOLD,0.04,0,.6], ext:[0x23D0,GENERAL], bot:[0x2193,GENERAL]}
|
||||
},
|
||||
0x21B0: // up arrow with top leftwards
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {top:[0x21B0,GENERAL], ext:[0x23D0,GENERAL,.152]}
|
||||
},
|
||||
0x21B1: // up arrow with top right
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {top:[0x21B1,GENERAL], ext:[0x23D0,GENERAL,-.195]}
|
||||
},
|
||||
0x21BC: // left harpoon with barb up
|
||||
{
|
||||
dir: H, HW: [[.955,GENERAL]], stretch: {left:[0x21BC,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x21BD: // left harpoon with barb down
|
||||
{
|
||||
dir: H, HW: [[.955,GENERAL]], stretch: {left:[0x21BD,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x21BE: // up harpoon with barb right
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {top:[0x21BE,GENERAL], ext:[0x23D0,GENERAL]}
|
||||
},
|
||||
0x21BF: // up harpoon with barb left
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {top:[0x21BF,GENERAL], ext:[0x23D0,GENERAL]}
|
||||
},
|
||||
0x21C0: // right harpoon with barb up
|
||||
{
|
||||
dir: H, HW: [[.955,GENERAL]], stretch: {right:[0x21C0,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x21C1: // right harpoon with barb down
|
||||
{
|
||||
dir: H, HW: [[.955,GENERAL]], stretch: {right:[0x21C1,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x21C2: // down harpoon with barb right
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {bot:[0x21C2,GENERAL], ext:[0x23D0,GENERAL]}
|
||||
},
|
||||
0x21C3: // down harpoon with barb left
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {bot:[0x21C3,GENERAL], ext:[0x23D0,GENERAL]}
|
||||
},
|
||||
0x21DA: // left triple arrow
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]], stretch: {left:[0x21DA,GENERAL], rep:[0x2261,GENERAL]}
|
||||
},
|
||||
0x21DB: // right triple arrow
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]], stretch: {right:[0x21DB,GENERAL], rep:[0x2261,GENERAL]}
|
||||
},
|
||||
0x23B4: // top square bracket
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL],[1.063,SIZE1],[1.606,SIZE2],[2.147,SIZE3],[2.692,SIZE4],[3.237,SIZE5]],
|
||||
stretch: {left:[0x2310,GENERAL], rep:[0x2212,GENERAL,0,.12], right:[0xAC,GENERAL]}
|
||||
},
|
||||
0x23B5: // bottom square bracket
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL],[1.063,SIZE1],[1.606,SIZE2],[2.147,SIZE3],[2.692,SIZE4],[3.237,SIZE5]],
|
||||
stretch: {left:[0x2A3D,GENERAL,0,.12], rep:[0x2212,GENERAL,0,0,0,.12], right:[0x2A3C,GENERAL,0,.12]}
|
||||
},
|
||||
0x23DC: // top paren
|
||||
{
|
||||
dir: H, HW: [[.556,GENERAL],[.926,SIZE1],[1.460,SIZE2],[1.886,SIZE3],[2.328,SIZE4],[3.237,SIZE5]],
|
||||
stretch: {left:[0xE13B,NONUNI], right:[0xE13C,NONUNI], rep:[0xE14A,NONUNI]}
|
||||
},
|
||||
0x23DD: // bottom paren
|
||||
{
|
||||
dir: H, HW: [[.556,GENERAL],[.926,SIZE1],[1.460,SIZE2],[1.886,SIZE3],[2.328,SIZE4],[3.237,SIZE5]],
|
||||
stretch: {left:[0xE13D,NONUNI], right:[0xE13E,NONUNI], rep:[0xE14B,NONUNI]}
|
||||
},
|
||||
0x23E0: // top tortoise shell
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL],[1.460,SIZE1],[1.886,SIZE2],[2.312,SIZE3],[2.738,SIZE4],[3.164,SIZE5]],
|
||||
stretch: {left:[0xE10D,NONUNI,-.1,-.1], rep:[0x2212,GENERAL,0,.05], right:[0xE10C,NONUNI,0,-.1], fullExtenders:true}
|
||||
},
|
||||
0x23E1: // bottom tortoise shell
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL],[1.460,SIZE1],[1.886,SIZE2],[2.312,SIZE3],[2.738,SIZE4],[3.164,SIZE5]],
|
||||
stretch: {left:[0xE10C,NONUNI,-.1,.1], rep:[0x2212,GENERAL,0,-.1,0,.1], right:[0xE10D,NONUNI,0,.1], fullExtenders:true}
|
||||
},
|
||||
0x2906: // leftwards double arrow from bar
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0x21D0,GENERAL], rep:[0x3D,GENERAL], right:[0x2AE4,GENERAL,0,-.09]}
|
||||
},
|
||||
0x2907: // rightwards double arrow from bar
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0x22A8,GENERAL,0,-.09], rep:[0x3D,GENERAL], right:[0x21D2,GENERAL]}
|
||||
},
|
||||
0x294E: // left barb up right barb up harpoon
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x21BC,GENERAL], rep:[0x2212,GENERAL], right:[0x21C0,GENERAL]}
|
||||
},
|
||||
0x294F: // up barb right down barb right harpoon
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]],
|
||||
stretch: {top:[0x21BE,GENERAL], ext:[0x23D0,GENERAL], bot:[0x21C2,GENERAL]}
|
||||
},
|
||||
0x2950: // left barb dow right barb down harpoon
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0x21BD,GENERAL], rep:[0x2212,GENERAL], right:[0x21C1,GENERAL]}
|
||||
},
|
||||
0x2951: // up barb left down barb left harpoon
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]],
|
||||
stretch: {top:[0x21BF,GENERAL], ext:[0x23D0,GENERAL], bot:[0x21C3,GENERAL]}
|
||||
},
|
||||
0x295A: // leftwards harpoon with barb up from bar
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0x21BC,GENERAL], rep:[0x2212,GENERAL], right:[0x22A3,BOLD,0,.1,.6]}
|
||||
},
|
||||
0x295B: // rightwards harpoon with barb up from bar
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0x22A2,BOLD,0,0.1,.6], rep:[0x2212,GENERAL], right:[0x21C0,GENERAL]}
|
||||
},
|
||||
0x295C: // up harpoon with barb right from bar
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]],
|
||||
stretch: {bot:[0x5F,GENERAL,.05,-.01,.8], ext:[0x23D0,GENERAL], top:[0x21BE,GENERAL]}
|
||||
},
|
||||
0x295D: // down harpoon with barb right from bar
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]],
|
||||
stretch: {top:[0x22A4,BOLD,0.04,0,.6], ext:[0x23D0,GENERAL], bot:[0x21C2,GENERAL]}
|
||||
},
|
||||
0x295E: // leftwards harpoon with barb down from bar
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0x21BD,GENERAL], rep:[0x2212,GENERAL], right:[0x22A3,BOLD,0,.1,.6]}
|
||||
},
|
||||
0x295F: // rightwards harpoon with barb down from bar
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0x22A2,BOLD,0,0.1,.6], rep:[0x2212,GENERAL], right:[0x21C1,GENERAL]}
|
||||
},
|
||||
0x2960: // up harpoon with barb left from bar
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]],
|
||||
stretch: {bot:[0x5F,GENERAL,.05,-.01,.8], ext:[0x23D0,GENERAL], top:[0x21BF,GENERAL]}
|
||||
},
|
||||
0x2961: // down harpoon with barb left from bar
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]],
|
||||
stretch: {top:[0x22A4,BOLD,0.04,0,.6], ext:[0x23D0,GENERAL], bot:[0x21C3,GENERAL]}
|
||||
},
|
||||
|
||||
0x02C7: // caron
|
||||
{
|
||||
dir: H, HW: [[.333,GENERAL],[.56,SIZE1],[.979,SIZE2],[1.458,SIZE3],[1.886,SIZE4],[2.328,SIZE5]]
|
||||
},
|
||||
0x02CD: // low macron
|
||||
{
|
||||
dir: H, HW: [[.334,GENERAL]], stretch: {rep:[0x2CD,GENERAL]}
|
||||
},
|
||||
0x02F7: // low tilde
|
||||
{
|
||||
dir: H, HW: [[.558,SIZE1],[.977,SIZE2],[1.458,SIZE3],[1.886,SIZE4],[2.328,SIZE5]]
|
||||
},
|
||||
0x219F: // upwards two headed arrow
|
||||
{
|
||||
dir: V, HW: [[.816,GENERAL]], stretch: {ext:[0x23D0,GENERAL], top:[0x219F,GENERAL]}
|
||||
},
|
||||
0x21A1: // downwards two headed arrow
|
||||
{
|
||||
dir: V, HW: [[.816,GENERAL]], stretch: {ext:[0x23D0,GENERAL], bot:[0x21A1,GENERAL]}
|
||||
},
|
||||
0x21A8: // up down arrow with base
|
||||
{
|
||||
dir: V, HW: [[.816,GENERAL]],
|
||||
stretch: {top:[0x2191,GENERAL], ext:[0x23D0,GENERAL], bot:[0x2913,GENERAL]}
|
||||
},
|
||||
0x21A9: // left hook arrow
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0x2190,GENERAL], rep:[0x2212,GENERAL], right:[0xE0B5,NONUNI]}
|
||||
},
|
||||
0x21AA: // right hook arrow
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0xE0B4,NONUNI], rep:[0x2212,GENERAL], right:[0x2192,GENERAL]}
|
||||
},
|
||||
0x21B2: // down arrow with tip left
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {bot:[0x21B2,GENERAL], ext:[0x23D0,GENERAL,.152]}
|
||||
},
|
||||
0x21B3: // down arrow with tip right
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {bot:[0x21B3,GENERAL], ext:[0x23D0,GENERAL,-.195]}
|
||||
},
|
||||
0x21B4: // right arrow with corner down
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]], stretch: {rep:[0x2212,GENERAL,0,.4], right:[0x21B4,GENERAL]}
|
||||
},
|
||||
0x21B5: // down arrow with corner left
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {bot:[0x21B5,GENERAL], ext:[0x23D0,GENERAL,.57]}
|
||||
},
|
||||
0x21CB: // left harpoon over right harpoon
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0x296A,GENERAL], rep:[0x3D,GENERAL], right:[0x296D,GENERAL]}
|
||||
},
|
||||
0x21CC: // right harpoon over left harpoon
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0x296B,GENERAL], rep:[0x3D,GENERAL], right:[0x296C,GENERAL]}
|
||||
},
|
||||
0x21E0: // left dashed arrow
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0x21E0,GENERAL], rep:[0xE121,NONUNI,0,0,0,0,.1], fullExtenders:true}
|
||||
},
|
||||
0x21E1: // up dashed arrow
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]],
|
||||
stretch: {ext:[0xE12D,NONUNI], top:[0x21E1,GENERAL], fullExtenders: true}
|
||||
},
|
||||
0x21E2: // right dashed arrow
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {right:[0x21E2,VARIANT], rep:[0xE12E,NONUNI,0,0,0,0,.1], fullExtenders:true}
|
||||
},
|
||||
0x21E3: // down dashed arrow
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]],
|
||||
stretch: {ext:[0xE12C,NONUNI], bot:[0x21E3,GENERAL], fullExtenders: true}
|
||||
},
|
||||
0x21E4: // left arrow to bar
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]], stretch: {left:[0x21E4,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x21E5: // right arrow to bar
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]], stretch: {right:[0x21E5,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x21FD: // left open-headed arrow
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]], stretch: {left:[0x21FD,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x21FE: // right open-headed arrow
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]], stretch: {right:[0x21FE,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x21FF: // left right open-headed arrow
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]],
|
||||
stretch: {left:[0x21FD,GENERAL], rep:[0x2212,GENERAL], right:[0x21FE,GENERAL]}
|
||||
},
|
||||
0x27E6: // left white square bracket
|
||||
{
|
||||
dir: V, HW: [[.93,GENERAL],[1.23,SIZE1],[1.845,SIZE2],[2.46,SIZE3],[3.075,SIZE4]],
|
||||
stretch: {top:[0x2553,GENERAL], ext:[0x2551,GENERAL], bot:[0x2559,GENERAL]}
|
||||
},
|
||||
0x27E7: // right white square bracket
|
||||
{
|
||||
dir: V, HW: [[.93,GENERAL],[1.23,SIZE1],[1.845,SIZE2],[2.46,SIZE3],[3.075,SIZE4]],
|
||||
stretch: {top:[0x2556,GENERAL], ext:[0x2551,GENERAL], bot:[0x255C,GENERAL]}
|
||||
},
|
||||
0x27EA: // left double angle bracket
|
||||
{
|
||||
dir: V, HW: [[.931,GENERAL],[1.23,SIZE1],[1.845,SIZE2],[2.461,SIZE3],[3.075,SIZE4]],
|
||||
},
|
||||
0x27EB: // right double angle bracket
|
||||
{
|
||||
dir: V, HW: [[.931,GENERAL],[1.23,SIZE1],[1.845,SIZE2],[2.461,SIZE3],[3.075,SIZE4]],
|
||||
},
|
||||
0x290A: // up triple arrow
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {top:[0x290A,GENERAL], ext:[0xE135,NONUNI]}
|
||||
},
|
||||
0x290B: // down triple arrow
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {bot:[0x290B,GENERAL], ext:[0xE135,NONUNI]}
|
||||
},
|
||||
0x2912: // up arrow to bar
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {top:[0x2912,GENERAL], ext:[0x23D0,GENERAL]}
|
||||
},
|
||||
0x2913: // down arrow to bar
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {bot:[0x2913,GENERAL], ext:[0x23D0,GENERAL]}
|
||||
},
|
||||
0x2952: // left harpoon with barb up to bar
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]], stretch: {left:[0x2952,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x2953: // right harpoon with barb up to bar
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]], stretch: {right:[0x2953,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x2954: // up harpoon with barb right to bar
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {top:[0x2954,GENERAL], ext:[0x23D0,GENERAL]}
|
||||
},
|
||||
0x2955: // down harpoon with barb right to bar
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {bot:[0x2955,GENERAL], ext:[0x23D0,GENERAL]}
|
||||
},
|
||||
0x2956: // left harpoon with barb down to bar
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]], stretch: {left:[0x2956,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x2957: // right harpoon with barb down to bar
|
||||
{
|
||||
dir: H, HW: [[.926,GENERAL]], stretch: {right:[0x2957,GENERAL], rep:[0x2212,GENERAL]}
|
||||
},
|
||||
0x2958: // up harpoon with barb left to bar
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {top:[0x2958,GENERAL], ext:[0x23D0,GENERAL]}
|
||||
},
|
||||
0x2959: // down harpoon with barb left to bar
|
||||
{
|
||||
dir: V, HW: [[.818,GENERAL]], stretch: {bot:[0x2959,GENERAL], ext:[0x23D0,GENERAL]}
|
||||
},
|
||||
0x2980: // triple vertical bar
|
||||
{
|
||||
dir: V, HW: [[.874,GENERAL]], stretch: {ext:[0x2980,GENERAL]}
|
||||
},
|
||||
0x2997: // left black tortoise shell
|
||||
{
|
||||
dir: V, HW: [[.932,GENERAL]],
|
||||
stretch: {top:[0xE10D,NONUNI,.1,.05], ext:[0x23D0,GENERAL,-.1], bot:[0xE10C,NONUNI,.1]}
|
||||
},
|
||||
0x2998: // right black tortoise shell
|
||||
{
|
||||
dir: V, HW: [[.932,GENERAL]],
|
||||
stretch: {top:[0xE10C,NONUNI,-.1,.05], ext:[0x23D0,GENERAL], bot:[0xE10D,NONUNI,-.1]}
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
for (var id in delim) {if (delim.hasOwnProperty(id)) {DELIMITERS[id] = delim[id]}};
|
||||
|
||||
MathJax.Ajax.loadComplete(HTMLCSS.fontDir + "/fontdata-extra.js");
|
||||
|
||||
})(MathJax.OutputJax["HTML-CSS"]);
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
(function (HTMLCSS) {
|
||||
var VERSION = "1.1";
|
||||
var VERSION = "1.1.1";
|
||||
|
||||
HTMLCSS.allowWebFonts = false;
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
|||
SIZE3 = "STIXSizeThreeSym",
|
||||
SIZE4 = "STIXSizeFourSym",
|
||||
SIZE5 = "STIXSizeFiveSym";
|
||||
var H = "H", V = "V";
|
||||
var H = "H", V = "V", EXTRAH = {load:"extra", dir:H}, EXTRAV = {load:"extra", dir:V};
|
||||
|
||||
HTMLCSS.Augment({
|
||||
FONTDATA: {
|
||||
|
@ -331,22 +331,117 @@
|
|||
0x005E: {alias: 0x02D6, dir:H}, // wide hat
|
||||
0x005F: {alias: 0x23AF, dir:H}, // low line
|
||||
0x007E: {alias: 0x02DC, dir:H}, // wide tilde
|
||||
0x00AF: {alias: 0x23AF, dir:H}, // over line
|
||||
0x00AF: {alias: 0x02C9, dir:H}, // macron
|
||||
0x0302: {alias: 0x02C6, dir:H}, // wide hat
|
||||
0x0303: {alias: 0x02DC, dir:H}, // wide tilde
|
||||
0x030C: {alias: 0x02C7, dir:H}, // wide caron
|
||||
0x0332: {alias: 0x23AF, dir:H}, // combining low line
|
||||
0x2015: {alias: 0x23AF, dir:H}, // horizontal line
|
||||
0x2017: {alias: 0x23AF, dir:H}, // horizontal line
|
||||
0x203E: {alias: 0x00AF, dir:H}, // overline
|
||||
0x2212: {alias: 0x23AF, dir:H}, // minus
|
||||
0x2215: {alias: 0x002F, dir:V}, // division slash
|
||||
0x2329: {alias: 0x27E8, dir:V}, // langle
|
||||
0x232A: {alias: 0x27E9, dir:V}, // rangle
|
||||
0x23AF: {alias: 0x2212, dir:H}, // horizontal line extension
|
||||
0x2500: {alias: 0x2212, dir:H}, // horizontal line
|
||||
0x2758: {alias: 0x2223, dir:V}, // vertical separator
|
||||
0x3008: {alias: 0x27E8, dir:V}, // langle
|
||||
0x3009: {alias: 0x27E9, dir:V}, // rangle
|
||||
0xFE37: {alias: 0x23DE, dir:H}, // horizontal brace down
|
||||
0xFE38: {alias: 0x23DF, dir:H} // horizontal brace up
|
||||
0xFE38: {alias: 0x23DF, dir:H}, // horizontal brace up
|
||||
|
||||
0x219E: EXTRAH, // left two-headed arrow
|
||||
0x21A0: EXTRAH, // right two-headed arrow
|
||||
0x21A4: EXTRAH, // left arrow from bar
|
||||
0x21A5: EXTRAV, // up arrow from bar
|
||||
0x21A6: EXTRAH, // right arrow from bar
|
||||
0x21A7: EXTRAV, // down arrow from bar
|
||||
0x21B0: EXTRAV, // up arrow with top leftwards
|
||||
0x21B1: EXTRAV, // up arrow with top right
|
||||
0x21BC: EXTRAH, // left harpoon with barb up
|
||||
0x21BD: EXTRAH, // left harpoon with barb down
|
||||
0x21BE: EXTRAV, // up harpoon with barb right
|
||||
0x21BF: EXTRAV, // up harpoon with barb left
|
||||
0x21C0: EXTRAH, // right harpoon with barb up
|
||||
0x21C1: EXTRAH, // right harpoon with barb down
|
||||
0x21C2: EXTRAV, // down harpoon with barb right
|
||||
0x21C3: EXTRAV, // down harpoon with barb left
|
||||
0x21DA: EXTRAH, // left triple arrow
|
||||
0x21DB: EXTRAH, // right triple arrow
|
||||
0x23B4: EXTRAH, // top square bracket
|
||||
0x23B5: EXTRAH, // bottom square bracket
|
||||
0x23DC: EXTRAH, // top paren
|
||||
0x23DD: EXTRAH, // bottom paren
|
||||
0x23E0: EXTRAH, // top tortoise shell
|
||||
0x23E1: EXTRAH, // bottom tortoise shell
|
||||
0x2906: EXTRAH, // leftwards double arrow from bar
|
||||
0x2907: EXTRAH, // rightwards double arrow from bar
|
||||
0x294E: EXTRAH, // left barb up right barb up harpoon
|
||||
0x294F: EXTRAV, // up barb right down barb right harpoon
|
||||
0x2950: EXTRAH, // left barb dow right barb down harpoon
|
||||
0x2951: EXTRAV, // up barb left down barb left harpoon
|
||||
0x295A: EXTRAH, // leftwards harpoon with barb up from bar
|
||||
0x295B: EXTRAH, // rightwards harpoon with barb up from bar
|
||||
0x295C: EXTRAV, // up harpoon with barb right from bar
|
||||
0x295D: EXTRAV, // down harpoon with barb right from bar
|
||||
0x295E: EXTRAH, // leftwards harpoon with barb down from bar
|
||||
0x295F: EXTRAH, // rightwards harpoon with barb down from bar
|
||||
0x2960: EXTRAV, // up harpoon with barb left from bar
|
||||
0x2961: EXTRAV, // down harpoon with barb left from bar
|
||||
0x27F5: {alias: 0x2190, dir:H}, // long left arrow
|
||||
0x27F6: {alias: 0x2192, dir:H}, // long right arrow
|
||||
0x27F7: {alias: 0x2194, dir:H}, // long left-right arrow
|
||||
0x27F8: {alias: 0x21D0, dir:H}, // long left double arrow
|
||||
0x27F9: {alias: 0x21D2, dir:H}, // long right double arrow
|
||||
0x27FA: {alias: 0x21D4, dir:H}, // long left-right double arrow
|
||||
0x27FB: {alias: 0x21A4, dir:H}, // long left arrow from bar
|
||||
0x27FC: {alias: 0x21A6, dir:H}, // long right arrow from bar
|
||||
0x27FD: {alias: 0x2906, dir:H}, // long left double arrow from bar
|
||||
0x27FE: {alias: 0x2907, dir:H}, // long right double arrow from bar
|
||||
|
||||
0x02C7: EXTRAH, // caron
|
||||
0x02CD: EXTRAH, // low macron
|
||||
0x02F7: EXTRAH, // low tilde
|
||||
0x219F: EXTRAV, // upwards two headed arrow
|
||||
0x21A1: EXTRAV, // downwards two headed arrow
|
||||
0x21A8: EXTRAV, // up down arrow with base
|
||||
0x21A9: EXTRAH, // left hook arrow
|
||||
0x21AA: EXTRAH, // right hook arrow
|
||||
0x21B2: EXTRAV, // down arrow with tip left
|
||||
0x21B3: EXTRAV, // down arrow with tip right
|
||||
0x21B4: EXTRAH, // right arrow with corner down
|
||||
0x21B5: EXTRAV, // down arrow with corner left
|
||||
0x21CB: EXTRAH, // left harpoon over right harpoon
|
||||
0x21CC: EXTRAH, // right harpoon over left harpoon
|
||||
0x21E0: EXTRAH, // left dashed arrow
|
||||
0x21E1: EXTRAV, // up dashed arrow
|
||||
0x21E2: EXTRAH, // right dashed arrow
|
||||
0x21E3: EXTRAV, // down dahsed arrow
|
||||
0x21E4: EXTRAH, // left arrow to bar
|
||||
0x21E5: EXTRAH, // right arrow to bar
|
||||
0x21FD: EXTRAH, // left open-headed arrow
|
||||
0x21FE: EXTRAH, // right open-headed arrow
|
||||
0x21FF: EXTRAH, // left right open-headed arrow
|
||||
0x27E6: EXTRAV, // left white square bracket
|
||||
0x27E7: EXTRAV, // right white square bracket
|
||||
0x27EA: EXTRAV, // left double angle bracket
|
||||
0x27EB: EXTRAV, // right double angle bracket
|
||||
0x290A: EXTRAV, // up triple arrow
|
||||
0x290B: EXTRAV, // down triple arrow
|
||||
0x2912: EXTRAV, // up arrow to bar
|
||||
0x2913: EXTRAV, // down arrow to bar
|
||||
0x2952: EXTRAH, // left harpoon with barb up to bar
|
||||
0x2953: EXTRAH, // right harpoon with barb up to bar
|
||||
0x2954: EXTRAV, // up harpoon with barb right to bar
|
||||
0x2955: EXTRAV, // down harpoon with barb right to bar
|
||||
0x2956: EXTRAH, // left harpoon with barb down to bar
|
||||
0x2957: EXTRAH, // right harpoon with barb down to bar
|
||||
0x2958: EXTRAV, // up harpoon with barb left to bar
|
||||
0x2959: EXTRAV, // down harpoon with barb left to bar
|
||||
0x2980: EXTRAV, // triple vertical bar
|
||||
0x2997: EXTRAV, // left balck tortoise shell
|
||||
0x2998: EXTRAV // right balck tortoise shell
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1383,6 +1478,8 @@
|
|||
|
||||
HTMLCSS.FONTDATA.FONTS['STIXGeneral'][0x22EE][0] += 400; // adjust height for \vdots
|
||||
HTMLCSS.FONTDATA.FONTS['STIXGeneral'][0x22F1][0] += 500; // adjust height for \ddots
|
||||
HTMLCSS.FONTDATA.FONTS['STIXGeneral'][0x2212][1] += 100; // adjust depth for minus (arrow extender)
|
||||
HTMLCSS.FONTDATA.FONTS['STIXGeneral'][0x003D][1] += 100; // adjust depth for = (double arrow extender)
|
||||
HTMLCSS.FONTDATA.FONTS['STIXNonUnicode'][0xE14A][0] += 200; // adjust height for brace extender
|
||||
HTMLCSS.FONTDATA.FONTS['STIXNonUnicode'][0xE14A][1] += 200; // adjust depth for brace extender
|
||||
HTMLCSS.FONTDATA.FONTS['STIXNonUnicode'][0xE14B][0] += 200; // adjust height for brace extender
|
||||
|
|
235
unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js
Normal file
235
unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js
Normal file
|
@ -0,0 +1,235 @@
|
|||
/*************************************************************
|
||||
*
|
||||
* MathJax/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js
|
||||
*
|
||||
* Adds extra stretchy characters to the TeX font data.
|
||||
*
|
||||
* ---------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2011 Design Science, Inc.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
(function (HTMLCSS) {
|
||||
|
||||
var DELIMITERS = HTMLCSS.FONTDATA.DELIMITERS;
|
||||
|
||||
var MAIN = "MathJax_Main",
|
||||
BOLD = "MathJax_Main-bold",
|
||||
AMS = "MathJax_AMS",
|
||||
SIZE1 = "MathJax_Size1",
|
||||
SIZE4 = "MathJax_Size4";
|
||||
var H = "H", V = "V";
|
||||
|
||||
var delim = {
|
||||
0x003D: // equal sign
|
||||
{
|
||||
dir: H, HW: [[.767,MAIN]], stretch: {rep:[0x003D,MAIN]}
|
||||
},
|
||||
0x219E: // left two-headed arrow
|
||||
{
|
||||
dir: H, HW: [[1,AMS]], stretch: {left:[0x219E,AMS], rep:[0x2212,MAIN]}
|
||||
},
|
||||
0x21A0: // right two-headed arrow
|
||||
{
|
||||
dir: H, HW: [[1,AMS]], stretch: {right:[0x221A0,AMS], rep:[0x2212,MAIN]}
|
||||
},
|
||||
0x21A4: // left arrow from bar
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x2190,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]}
|
||||
},
|
||||
0x21A5: // up arrow from bar
|
||||
{
|
||||
dir: V, HW: [],
|
||||
stretch: {bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x2191,SIZE1]}
|
||||
},
|
||||
0x21A6: // right arrow from bar
|
||||
{
|
||||
dir: H, HW: [[1,AMS]],
|
||||
stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:[0x2212,MAIN], right:[0x2192,MAIN]}
|
||||
},
|
||||
0x21A7: // down arrow from bar
|
||||
{
|
||||
dir: V, HW: [],
|
||||
stretch: {top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x2193,SIZE1]}
|
||||
},
|
||||
0x21B0: // up arrow with top leftwards
|
||||
{
|
||||
dir: V, HW: [[.722,AMS]],
|
||||
stretch: {top:[0x21B0,AMS], ext:[0x23D0,SIZE1,.097]}
|
||||
},
|
||||
0x21B1: // up arrow with top right
|
||||
{
|
||||
dir: V, HW: [[.722,AMS]],
|
||||
stretch: {top:[0x21B1,AMS,.27], ext:[0x23D0,SIZE1]}
|
||||
},
|
||||
0x21BC: // left harpoon with barb up
|
||||
{
|
||||
dir: H, HW: [[1,MAIN]],
|
||||
stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN]}
|
||||
},
|
||||
0x21BD: // left harpoon with barb down
|
||||
{
|
||||
dir: H, HW: [[1,MAIN]],
|
||||
stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN]}
|
||||
},
|
||||
0x21BE: // up harpoon with barb right
|
||||
{
|
||||
dir: V, HW: [[.888,AMS]],
|
||||
stretch: {top:[0x21BE,AMS,.12,0,1.1], ext:[0x23D0,SIZE1]}
|
||||
},
|
||||
0x21BF: // up harpoon with barb left
|
||||
{
|
||||
dir: V, HW: [[.888,AMS]],
|
||||
stretch: {top:[0x21BF,AMS,.12,0,1.1], ext:[0x23D0,SIZE1]}
|
||||
},
|
||||
0x21C0: // right harpoon with barb up
|
||||
{
|
||||
dir: H, HW: [[1,MAIN]],
|
||||
stretch: {right:[0x21C0,MAIN], rep:[0x2212,MAIN]}
|
||||
},
|
||||
0x21C1: // right harpoon with barb down
|
||||
{
|
||||
dir: H, HW: [[1,MAIN]],
|
||||
stretch: {right:[0x21C1,MAIN], rep:[0x2212,MAIN]}
|
||||
},
|
||||
0x21C2: // down harpoon with barb right
|
||||
{
|
||||
dir: V, HW: [[.888,AMS]],
|
||||
stretch: {bot:[0x21C2,AMS,.12,0,1.1], ext:[0x23D0,SIZE1]}
|
||||
},
|
||||
0x21C3: // down harpoon with barb left
|
||||
{
|
||||
dir: V, HW: [[.888,AMS]],
|
||||
stretch: {bot:[0x21C3,AMS,.12,0,1.1], ext:[0x23D0,SIZE1]}
|
||||
},
|
||||
0x21DA: // left triple arrow
|
||||
{
|
||||
dir: H, HW: [[1,AMS]],
|
||||
stretch: {left:[0x21DA,AMS], rep:[0x2261,MAIN]}
|
||||
},
|
||||
0x21DB: // right triple arrow
|
||||
{
|
||||
dir: H, HW: [[1,AMS]],
|
||||
stretch: {right:[0x21DB,AMS], rep:[0x2261,MAIN]}
|
||||
},
|
||||
0x23B4: // top square bracket
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x250C,AMS,0,-.1], rep:[0x2212,MAIN,0,.35], right:[0x2510,AMS,0,-.1]}
|
||||
},
|
||||
0x23B5: // bottom square bracket
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x2514,AMS,0,.26], rep:[0x2212,MAIN,0,0,0,.25], right:[0x2518,AMS,0,.26]}
|
||||
},
|
||||
0x23DC: // top paren
|
||||
{
|
||||
dir: H, HW: [[.778,AMS,0,0x2322],[1,MAIN,0,0x2322]],
|
||||
stretch: {left:[0xE150,SIZE4], rep:[0xE154,SIZE4], right:[0xE151,SIZE4]}
|
||||
},
|
||||
0x23DD: // bottom paren
|
||||
{
|
||||
dir: H, HW: [[.778,AMS,0,0x2323],[1,MAIN,0,0x2323]],
|
||||
stretch: {left:[0xE152,SIZE4], rep:[0xE154,SIZE4], right:[0xE153,SIZE4]}
|
||||
},
|
||||
0x23E0: // top tortoise shell
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x2CA,MAIN,-.1], rep:[0x2C9,MAIN,0,.13], right:[0x2CB,MAIN], fullExtenders:true}
|
||||
},
|
||||
0x23E1: // bottom tortoise shell
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x2CB,MAIN,-.1,.1], rep:[0x2C9,MAIN], right:[0x2CA,MAIN,-.1,.1], fullExtenders:true}
|
||||
},
|
||||
0x2906: // leftwards double arrow from bar
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x21D0,MAIN], rep:[0x3D,MAIN], right:[0x2223,SIZE1,0,-.1]}
|
||||
},
|
||||
0x2907: // rightwards double arrow from bar
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x22A8,AMS,0,-.12], rep:[0x3D,MAIN], right:[0x21D2,MAIN]}
|
||||
},
|
||||
0x294E: // left barb up right barb up harpoon
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x21C0,MAIN]}
|
||||
},
|
||||
0x294F: // up barb right down barb right harpoon
|
||||
{
|
||||
dir: V, HW: [],
|
||||
stretch: {top:[0x21BE,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]}
|
||||
},
|
||||
0x2950: // left barb dow right barb down harpoon
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x21C1,MAIN]}
|
||||
},
|
||||
0x2951: // up barb left down barb left harpoon
|
||||
{
|
||||
dir: V, HW: [],
|
||||
stretch: {top:[0x21BF,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]}
|
||||
},
|
||||
0x295A: // leftwards harpoon with barb up from bar
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]}
|
||||
},
|
||||
0x295B: // rightwards harpoon with barb up from bar
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:[0x2212,MAIN], right:[0x21C0,MAIN]}
|
||||
},
|
||||
0x295C: // up harpoon with barb right from bar
|
||||
{
|
||||
dir: V, HW: [],
|
||||
stretch: {bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BE,AMS,.12,0,1.1]}
|
||||
},
|
||||
0x295D: // down harpoon with barb right from bar
|
||||
{
|
||||
dir: V, HW: [],
|
||||
stretch: {top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]}
|
||||
},
|
||||
0x295E: // leftwards harpoon with barb down from bar
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]}
|
||||
},
|
||||
0x295F: // rightwards harpoon with barb down from bar
|
||||
{
|
||||
dir: H, HW: [],
|
||||
stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:[0x2212,MAIN], right:[0x21C1,MAIN]}
|
||||
},
|
||||
0x2960: // up harpoon with barb left from bar
|
||||
{
|
||||
dir: V, HW: [],
|
||||
stretch: {bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BF,AMS,.12,0,1.1]}
|
||||
},
|
||||
0x2961: // down harpoon with barb left from bar
|
||||
{
|
||||
dir: V, HW: [],
|
||||
stretch: {top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]}
|
||||
}
|
||||
};
|
||||
|
||||
for (var id in delim) {if (delim.hasOwnProperty(id)) {DELIMITERS[id] = delim[id]}};
|
||||
|
||||
MathJax.Ajax.loadComplete(HTMLCSS.fontDir + "/fontdata-extra.js");
|
||||
|
||||
})(MathJax.OutputJax["HTML-CSS"]);
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
SIZE2 = "MathJax_Size2",
|
||||
SIZE3 = "MathJax_Size3",
|
||||
SIZE4 = "MathJax_Size4";
|
||||
var H = "H", V = "V";
|
||||
var H = "H", V = "V", EXTRAH = {load:"extra", dir:H}, EXTRAV = {load:"extra", dir:V};
|
||||
|
||||
HTMLCSS.Augment({
|
||||
FONTDATA: {
|
||||
|
@ -244,6 +244,10 @@
|
|||
dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]],
|
||||
stretch: {top: [0x23AB,SIZE4], mid:[0x23AC,SIZE4], bot: [0x23AD,SIZE4], ext: [0x23AA,SIZE4]}
|
||||
},
|
||||
0x00AF: // macron
|
||||
{
|
||||
dir: H, HW: [[.59,MAIN]], stretch: {rep:[0xAF,MAIN]}
|
||||
},
|
||||
0x02C6: // wide hat
|
||||
{
|
||||
dir: H, HW: [[.267+.05,MAIN],[.567+.05,SIZE1],[1.005+.05,SIZE2],[1.447+.1,SIZE3],[1.909+.1,SIZE4]]
|
||||
|
@ -396,11 +400,15 @@
|
|||
0x005E: {alias: 0x02C6, dir:H}, // wide hat
|
||||
0x005F: {alias: 0x2212, dir:H}, // low line
|
||||
0x007E: {alias: 0x02DC, dir:H}, // wide tilde
|
||||
0x00AF: {alias: 0x2212, dir:H}, // over line
|
||||
0x02C9: {alias: 0x00AF, dir:H}, // macron
|
||||
0x0302: {alias: 0x02C6, dir:H}, // wide hat
|
||||
0x0303: {alias: 0x02DC, dir:H}, // wide tilde
|
||||
0x030C: {alias: 0x02C7, dir:H}, // wide caron
|
||||
0x0332: {alias: 0x2212, dir:H}, // combining low line
|
||||
0x2015: {alias: 0x2212, dir:H}, // horizontal line
|
||||
0x2017: {alias: 0x2212, dir:H}, // horizontal line
|
||||
0x203E: {alias: 0x2212, dir:H}, // over line
|
||||
0x203E: {alias: 0x00AF, dir:H}, // overline
|
||||
0x2215: {alias: 0x002F, dir:V}, // division slash
|
||||
0x2329: {alias: 0x27E8, dir:V}, // langle
|
||||
0x232A: {alias: 0x27E9, dir:V}, // rangle
|
||||
0x23AF: {alias: 0x2212, dir:H}, // horizontal line extension
|
||||
|
@ -409,7 +417,56 @@
|
|||
0x3008: {alias: 0x27E8, dir:V}, // langle
|
||||
0x3009: {alias: 0x27E9, dir:V}, // rangle
|
||||
0xFE37: {alias: 0x23DE, dir:H}, // horizontal brace down
|
||||
0xFE38: {alias: 0x23DF, dir:H} // horizontal brace up
|
||||
0xFE38: {alias: 0x23DF, dir:H}, // horizontal brace up
|
||||
|
||||
0x219E: EXTRAH, // left two-headed arrow
|
||||
0x21A0: EXTRAH, // right two-headed arrow
|
||||
0x21A4: EXTRAH, // left arrow from bar
|
||||
0x21A5: EXTRAV, // up arrow from bar
|
||||
0x21A6: EXTRAH, // right arrow from bar
|
||||
0x21A7: EXTRAV, // down arrow from bar
|
||||
0x21B0: EXTRAV, // up arrow with top leftwards
|
||||
0x21B1: EXTRAV, // up arrow with top right
|
||||
0x21BC: EXTRAH, // left harpoon with barb up
|
||||
0x21BD: EXTRAH, // left harpoon with barb down
|
||||
0x21BE: EXTRAV, // up harpoon with barb right
|
||||
0x21BF: EXTRAV, // up harpoon with barb left
|
||||
0x21C0: EXTRAH, // right harpoon with barb up
|
||||
0x21C1: EXTRAH, // right harpoon with barb down
|
||||
0x21C2: EXTRAV, // down harpoon with barb right
|
||||
0x21C3: EXTRAV, // down harpoon with barb left
|
||||
0x21DA: EXTRAH, // left triple arrow
|
||||
0x21DB: EXTRAH, // right triple arrow
|
||||
0x23B4: EXTRAH, // top square bracket
|
||||
0x23B5: EXTRAH, // bottom square bracket
|
||||
0x23DC: EXTRAH, // top paren
|
||||
0x23DD: EXTRAH, // bottom paren
|
||||
0x23E0: EXTRAH, // top tortoise shell
|
||||
0x23E1: EXTRAH, // bottom tortoise shell
|
||||
0x2906: EXTRAH, // leftwards double arrow from bar
|
||||
0x2907: EXTRAH, // rightwards double arrow from bar
|
||||
0x294E: EXTRAH, // left barb up right barb up harpoon
|
||||
0x294F: EXTRAV, // up barb right down barb right harpoon
|
||||
0x2950: EXTRAH, // left barb dow right barb down harpoon
|
||||
0x2951: EXTRAV, // up barb left down barb left harpoon
|
||||
0x295A: EXTRAH, // leftwards harpoon with barb up from bar
|
||||
0x295B: EXTRAH, // rightwards harpoon with barb up from bar
|
||||
0x295C: EXTRAV, // up harpoon with barb right from bar
|
||||
0x295D: EXTRAV, // down harpoon with barb right from bar
|
||||
0x295E: EXTRAH, // leftwards harpoon with barb down from bar
|
||||
0x295F: EXTRAH, // rightwards harpoon with barb down from bar
|
||||
0x2960: EXTRAV, // up harpoon with barb left from bar
|
||||
0x2961: EXTRAV, // down harpoon with barb left from bar
|
||||
0x27F5: {alias: 0x2190, dir:H}, // long left arrow
|
||||
0x27F6: {alias: 0x2192, dir:H}, // long right arrow
|
||||
0x27F7: {alias: 0x2194, dir:H}, // long left-right arrow
|
||||
0x27F8: {alias: 0x21D0, dir:H}, // long left double arrow
|
||||
0x27F9: {alias: 0x21D2, dir:H}, // long right double arrow
|
||||
0x27FA: {alias: 0x21D4, dir:H}, // long left-right double arrow
|
||||
0x27FB: {alias: 0x21A4, dir:H}, // long left arrow from bar
|
||||
0x27FC: {alias: 0x21A6, dir:H}, // long right arrow from bar
|
||||
0x27FD: {alias: 0x2906, dir:H}, // long left double arrow from bar
|
||||
0x27FE: {alias: 0x2907, dir:H} // long right double arrow from bar
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1406,6 +1463,8 @@
|
|||
HTMLCSS.FONTDATA.FONTS['MathJax_Main'][0x22F1][0] += 700; // adjust height for \ddots
|
||||
HTMLCSS.FONTDATA.FONTS['MathJax_Size4'][0xE154][0] += 200; // adjust height for brace extender
|
||||
HTMLCSS.FONTDATA.FONTS['MathJax_Size4'][0xE154][1] += 200; // adjust depth for brace extender
|
||||
HTMLCSS.FONTDATA.FONTS['MathJax_Main'][0x2212][1] += 100; // adjust depth of minus (used as arrow extender)
|
||||
HTMLCSS.FONTDATA.FONTS['MathJax_Main'][0x003D][1] += 100; // adjust depth of = (used as arrow extender)
|
||||
|
||||
if (!HTMLCSS.imgFonts) {
|
||||
MathJax.Hub.Browser.Select({
|
||||
|
|
|
@ -245,7 +245,12 @@
|
|||
},
|
||||
|
||||
".MathJax .MathJax_HitBox": {
|
||||
cursor: "text"
|
||||
cursor: "text",
|
||||
background: "white",
|
||||
opacity:0, filter:"alpha(opacity=0)"
|
||||
},
|
||||
".MathJax .MathJax_HitBox *": {
|
||||
filter: "none", opacity:1, background:"transparent" // for IE
|
||||
},
|
||||
|
||||
"#MathJax_Tooltip": {
|
||||
|
@ -254,7 +259,7 @@
|
|||
display: "none"
|
||||
},
|
||||
"#MathJax_Tooltip *": {
|
||||
filter: "none", background:"transparent" // for IE
|
||||
filter: "none", opacity:1, background:"transparent" // for IE
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -373,10 +378,25 @@
|
|||
[["span",{style: {display:"inline-block", width:"5em"}}]]);
|
||||
this.marginMove = HTMLCSS.addElement(this.marginCheck,"span",
|
||||
{style: {display:"inline-block", width:"5em", marginLeft:"-5em"}});
|
||||
|
||||
// Used in getLinebreakWidth
|
||||
this.linebreakSpan = HTMLCSS.Element("span",null,
|
||||
[["hr",{style: {width:"100%", size:1, padding:0, border:0, margin:0}}]]);
|
||||
|
||||
// Set up styles and preload web fonts
|
||||
return AJAX.Styles(this.config.styles,["PreloadWebFonts",this]);
|
||||
},
|
||||
|
||||
removeSTIXfonts: function (fonts) {
|
||||
//
|
||||
// Opera doesn't display large chunks of the STIX fonts, and
|
||||
// Safari/Windows doesn't display Plane1,
|
||||
// so disable STIX for these browsers.
|
||||
//
|
||||
for (var i = 0, m = fonts.length; i < m; i++)
|
||||
{if (fonts[i] === "STIX") {fonts.splice(i,1); m--; i--;}}
|
||||
if (this.config.preferredFont === "STIX") {this.config.preferredFont = fonts[0]}
|
||||
},
|
||||
|
||||
PreloadWebFonts: function () {
|
||||
if (!HTMLCSS.allowWebFonts || !HTMLCSS.config.preloadWebFonts) return;
|
||||
|
@ -417,6 +437,7 @@
|
|||
try {this.getScales(span); isHidden = (this.em === 0 || String(this.em) === "NaN")} catch (err) {isHidden = true}
|
||||
if (isHidden) {this.hiddenDiv.appendChild(frame); this.getScales(span)}
|
||||
jax.em = this.em; jax.outerEm = this.outerEm; jax.scale = this.scale;
|
||||
this.getLinebreakWidth(frame);
|
||||
this.initImg(span);
|
||||
this.initHTML(math,span);
|
||||
math.setTeXclass();
|
||||
|
@ -488,6 +509,21 @@
|
|||
span = span.previousSibling; if (!span) return;
|
||||
if (span.className.match(/^MathJax/)) {span.parentNode.removeChild(span)}
|
||||
},
|
||||
|
||||
getLinebreakWidth: function (div) {
|
||||
if (this.config.linebreaks.automatic) {
|
||||
var width = this.config.linebreaks.width, maxwidth;
|
||||
if (width.match(/^\s*(\d+(\.\d*)?%\s*)?container\s*$/)) {
|
||||
div.parentNode.insertBefore(this.linebreakSpan,div);
|
||||
maxwidth = this.linebreakSpan.firstChild.offsetWidth / this.em;
|
||||
this.linebreakSpan.parentNode.removeChild(this.linebreakSpan);
|
||||
width = width.replace(/\s*container\s*/,"");
|
||||
} else {maxwidth = document.body.offsetWidth / this.em}
|
||||
this.linebreakWidth = (width === "" ? maxwidth : this.length2em(width,maxwidth));
|
||||
} else {
|
||||
this.linebreakWidth = 100000; // a big width, so no implicit line breaks
|
||||
}
|
||||
},
|
||||
|
||||
getScales: function (span) {
|
||||
span.parentNode.insertBefore(this.HDMspan,span);
|
||||
|
@ -601,6 +637,36 @@
|
|||
if (length === MML.LINETHICKNESS.THICK) {return 1.67*thick}
|
||||
return this.length2em(length,mu,thick);
|
||||
},
|
||||
|
||||
getPadding: function (span) {
|
||||
var padding = {top:0, right:0, bottom:0, left:0}, has = false;
|
||||
for (var id in padding) {if (padding.hasOwnProperty(id)) {
|
||||
var pad = span.style["padding"+id.charAt(0).toUpperCase()+id.substr(1)];
|
||||
if (pad) {padding[id] = this.length2em(pad); has = true;}
|
||||
}}
|
||||
return (has ? padding : false);
|
||||
},
|
||||
getBorders: function (span) {
|
||||
var border = {top:0, right:0, bottom:0, left:0}, css = {}, has = false;
|
||||
for (var id in border) {if (border.hasOwnProperty(id)) {
|
||||
var ID = "border"+id.charAt(0).toUpperCase()+id.substr(1);
|
||||
var style = span.style[ID+"Style"];
|
||||
if (style) {
|
||||
has = true;
|
||||
border[id] = this.length2em(span.style[ID+"Width"]);
|
||||
css[ID] = [span.style[ID+"Width"],span.style[ID+"Style"],span.style[ID+"Color"]].join(" ");
|
||||
}
|
||||
}}
|
||||
border.css = css;
|
||||
return (has ? border : false);
|
||||
},
|
||||
setBorders: function (span,borders) {
|
||||
if (borders) {
|
||||
for (var id in borders.css) {if (borders.css.hasOwnProperty(id)) {
|
||||
span.style[id] = borders.css[id];
|
||||
}}
|
||||
}
|
||||
},
|
||||
|
||||
createStrut: function (span,h,before) {
|
||||
var strut = this.Element("span",{
|
||||
|
@ -802,6 +868,7 @@
|
|||
code = delim.alias; delim = this.FONTDATA.DELIMITERS[code];
|
||||
if (!delim) {delim = {HW: [0,this.FONTDATA.VARIANT[MML.VARIANT.NORMAL]]}}
|
||||
}
|
||||
if (delim.load) {HUB.RestartAfter(AJAX.Require(this.fontDir+"/fontdata-"+delim.load+".js"))}
|
||||
for (var i = 0, m = delim.HW.length; i < m; i++) {
|
||||
if (delim.HW[i][0]*scale >= HW-.01 || (i == m-1 && !delim.stretch)) {
|
||||
if (delim.HW[i][2]) {scale *= delim.HW[i][2]}
|
||||
|
@ -879,7 +946,8 @@
|
|||
}
|
||||
if (W > w) {
|
||||
var rW = rep.bbox.rw-rep.bbox.lw, rw = rW - .05, n, N, k = (delim.mid ? 2 : 1);
|
||||
N = n = Math.ceil((W-w)/(k*rw)); rw = (W-w)/(k*n);
|
||||
N = n = Math.ceil((W-w)/(k*rw));
|
||||
if (!delim.fillExtenders) {rw = (W-w)/(k*n)}
|
||||
dx = (n/(n+1))*(rW - rw); rw = rW - dx; x -= rep.bbox.lw + dx;
|
||||
while (k-- > 0) {
|
||||
while (n-- > 0) {
|
||||
|
@ -912,14 +980,19 @@
|
|||
if (data[0] instanceof Array) {
|
||||
for (var i = 0, m = data[0].length; i < m; i++) {text += String.fromCharCode(data[0][i])}
|
||||
} else {text = String.fromCharCode(data[0])}
|
||||
if (scale !== 1) {
|
||||
SPAN = this.addElement(span,"span",{
|
||||
style:{fontSize: this.Percent(scale)}, scale:scale, isMathJax: true
|
||||
});
|
||||
if (data[4]) {scale *= data[4]}
|
||||
if (scale !== 1 || data[3]) {
|
||||
SPAN = this.addElement(span,"span",{style:{fontSize: this.Percent(scale)}, scale:scale, isMathJax:true});
|
||||
this.handleVariant(SPAN,variant,text);
|
||||
span.bbox = SPAN.bbox;
|
||||
} else {this.handleVariant(span,variant,text)}
|
||||
if (data[2]) {span.style.marginLeft = this.Em(data[2])}
|
||||
if (data[2]) {span.style.marginLeft = this.Em(data[2])} // x offset
|
||||
if (data[3]) { // y offset
|
||||
span.firstChild.style.verticalAlign = this.Em(data[3]);
|
||||
span.bbox.h += data[3]; if (span.bbox.h < 0) {span.bbox.h = 0}
|
||||
}
|
||||
if (data[5]) {span.bbox.h += data[5]} // extra height
|
||||
if (data[6]) {span.bbox.d += data[6]} // extra depth
|
||||
if (this.AccentBug && span.bbox.w === 0) {
|
||||
// Handle combining characters by adding a non-breaking space and removing that width
|
||||
SPAN.firstChild.nodeValue += this.NBSP;
|
||||
|
@ -1205,8 +1278,6 @@
|
|||
|
||||
MML.mbase.Augment({
|
||||
toHTML: function (span) {
|
||||
var split = this.HTMLlineBreaks();
|
||||
if (split.length > 2) {return this.toHTMLmultiline(span,split)}
|
||||
span = this.HTMLcreateSpan(span); if (this.type != "mrow") {span = this.HTMLhandleSize(span)}
|
||||
for (var i = 0, m = this.data.length; i < m; i++)
|
||||
{if (this.data[i]) {this.data[i].toHTML(span)}}
|
||||
|
@ -1214,26 +1285,13 @@
|
|||
var h = span.bbox.h, d = span.bbox.d;
|
||||
for (i = 0, m = stretchy.length; i < m; i++) {stretchy[i].HTMLstretchV(span,h,d)}
|
||||
if (stretchy.length) {this.HTMLcomputeBBox(span,true)}
|
||||
if (this.HTMLlineBreaks(span)) {span = this.HTMLmultiline(span)}
|
||||
this.HTMLhandleSpace(span);
|
||||
this.HTMLhandleColor(span);
|
||||
return span;
|
||||
},
|
||||
HTMLlineBreaks: function () {
|
||||
var split = [[0,this]];
|
||||
for (var i = 0, m = this.data.length; i < m; i++) {
|
||||
if (this.data[i]) {
|
||||
var lb = this.data[i].lineBreak();
|
||||
if (lb !== "none") {
|
||||
var j = (lb === "after" ? i+1 : i);
|
||||
if (split.length === 0 || split[split.length-1] !== j)
|
||||
{split.push([j,this.data[i]])} else {split[split.length-1] = [j,this.data[i]]}
|
||||
}
|
||||
}
|
||||
}
|
||||
split.push([this.data.length,split[split.length-1][1]]);
|
||||
return split;
|
||||
},
|
||||
toHTMLmultiline: function (span) {MML.mbase.HTMLautoloadFile("multiline")},
|
||||
HTMLlineBreaks: function () {return false},
|
||||
HTMLmultiline: function () {MML.mbase.HTMLautoloadFile("multiline")},
|
||||
HTMLcomputeBBox: function (span,full,i,m) {
|
||||
if (i == null) {i = 0}; if (m == null) {m = this.data.length}
|
||||
var BBOX = span.bbox = {}, stretchy = [];
|
||||
|
@ -1248,7 +1306,8 @@
|
|||
},
|
||||
HTMLcombineBBoxes: function (core,BBOX) {
|
||||
if (BBOX.w == null) {this.HTMLemptyBBox(BBOX)}
|
||||
var child = core.HTMLspanElement(); if (!child || !child.bbox) return;
|
||||
var child = (core.bbox ? core : core.HTMLspanElement());
|
||||
if (!child || !child.bbox) return;
|
||||
var bbox = child.bbox;
|
||||
if (bbox.d > BBOX.d) {BBOX.d = bbox.d}
|
||||
if (bbox.h > BBOX.h) {BBOX.h = bbox.h}
|
||||
|
@ -1307,13 +1366,16 @@
|
|||
span = HTMLCSS.addElement(span,"span",{className: this.type, isMathJax:true});
|
||||
if (HTMLCSS.imgHeightBug) {span.style.display = "inline-block"}
|
||||
if (this["class"] != null) {span.className += " "+this["class"]}
|
||||
if (!this.spanID) {this.spanID = HTMLCSS.GetID()}
|
||||
span.id = (this.id || "MathJax-Span-"+this.spanID) + HTMLCSS.idPostfix;
|
||||
span.bbox = {w:0, h:0, d:0, lw:0, lr:0}; this.styles = {};
|
||||
if (this.style) {
|
||||
span.style.cssText = this.style;
|
||||
if (span.style.fontSize) {this.mathsize = span.style.fontSize; span.style.fontSize = ""}
|
||||
this.styles = {border:HTMLCSS.getBorders(span), padding:HTMLCSS.getPadding(span)}
|
||||
if (this.styles.border) {span.style.border = ""} // IE needs "0px none"?
|
||||
if (this.styles.padding) {span.style.padding = ""}
|
||||
}
|
||||
if (!this.spanID) {this.spanID = HTMLCSS.GetID()}
|
||||
span.id = (this.id || "MathJax-Span-"+this.spanID) + HTMLCSS.idPostfix;
|
||||
span.bbox = {w:0, h:0, d:0, lw:0, lr:0};
|
||||
if (this.href) {span.parentNode.bbox = span.bbox}
|
||||
return span;
|
||||
},
|
||||
|
@ -1336,39 +1398,61 @@
|
|||
var values = this.getValues("mathcolor","color");
|
||||
if (this.mathbackground) {values.mathbackground = this.mathbackground}
|
||||
if (this.background) {values.background = this.background}
|
||||
// @@@ FIXME: handle border as well?
|
||||
if (this.style && span.style.backgroundColor) {
|
||||
values.mathbackground = span.style.backgroundColor;
|
||||
span.style.backgroundColor = "transparent";
|
||||
}
|
||||
if (this.style && span.style.backgroundColor) {
|
||||
values.mathbackground = span.style.backgroundColor;
|
||||
span.style.backgroundColor = "transparent";
|
||||
}
|
||||
var borders = (this.styles||{}).border, padding = (this.styles||{}).padding;
|
||||
if (values.color && !this.mathcolor) {values.mathcolor = values.color}
|
||||
if (values.background && !this.mathbackground) {values.mathbackground = values.background}
|
||||
if (values.mathcolor) {span.style.color = values.mathcolor}
|
||||
if (values.mathbackground && values.mathbackground !== MML.COLOR.TRANSPARENT) {
|
||||
var dd = (span.bbox.exact ? 0 : 1/HTMLCSS.em), lW = 0, rW = 0;
|
||||
if ((values.mathbackground && values.mathbackground !== MML.COLOR.TRANSPARENT) ||
|
||||
borders || padding) {
|
||||
var dd = (span.bbox.exact ? 0 : 1/HTMLCSS.em), lW = 0, rW = 0,
|
||||
lpad = span.style.paddingLeft, rpad = span.style.paddingRight;
|
||||
if (this.isToken) {lW = span.bbox.lw; rW = span.bbox.rw - span.bbox.w}
|
||||
if (span.style.paddingLeft !== "") {lW += parseFloat(span.style.paddingLeft)*(span.scale||1)}
|
||||
if (span.style.paddingRight !== "") {rW -= parseFloat(span.style.paddingRight)*(span.scale||1)}
|
||||
if (lpad !== "") {lW += parseFloat(lpad)*(span.scale||1)}
|
||||
if (rpad !== "") {rW -= parseFloat(rpad)*(span.scale||1)}
|
||||
var W = Math.max(0,HTMLCSS.getW(span) + (HTMLCSS.PaddingWidthBug ? 0 : rW - lW));
|
||||
if (HTMLCSS.msieCharPaddingWidthBug && span.style.paddingLeft !== "")
|
||||
{W += parseFloat(span.style.paddingLeft)*(span.scale||1)}
|
||||
var H = span.bbox.h + span.bbox.d, D = -span.bbox.d;
|
||||
var H = span.bbox.h + span.bbox.d, D = -span.bbox.d, lp = 0, rp = 0;
|
||||
if (W > 0) {W += 2*dd; lW -= dd}; if (H > 0) {H += 2*dd; D -= dd}; rW = -W-lW;
|
||||
if (borders) {
|
||||
rW -= borders.right; D -= borders.bottom; lp += borders.left; rp += borders.right;
|
||||
span.bbox.h += borders.top; span.bbox.d += borders.bottom;
|
||||
span.bbox.w += borders.left + borders.right;
|
||||
span.bbox.lw -= borders.left; span.bbox.rw += borders.right;
|
||||
}
|
||||
if (padding) {
|
||||
H += padding.top + padding.bottom; W += padding.left + padding.right;
|
||||
rW -= padding.right; D -= padding.bottom; lp += padding.left; rp += padding.right;
|
||||
span.bbox.h += padding.top; span.bbox.d += padding.bottom;
|
||||
span.bbox.w += padding.left + padding.right;
|
||||
span.bbox.lw -= padding.left; span.bbox.rw += padding.right;
|
||||
}
|
||||
if (rp) {span.style.paddingRight = HTMLCSS.Em(rp)}
|
||||
var frame = HTMLCSS.Element("span",{id:"MathJax-Color-"+this.spanID+HTMLCSS.idPostfix,
|
||||
isMathJax: true,
|
||||
style:{display:"inline-block", backgroundColor:values.mathbackground,
|
||||
width: HTMLCSS.Em(W), height:HTMLCSS.Em(H), verticalAlign: HTMLCSS.Em(D),
|
||||
marginLeft: HTMLCSS.Em(lW), marginRight: HTMLCSS.Em(rW)}
|
||||
});
|
||||
HTMLCSS.setBorders(frame,borders);
|
||||
if (span.bbox.width) {frame.style.width = span.bbox.width; frame.style.marginRight = "-"+span.bbox.width}
|
||||
if (HTMLCSS.msieInlineBlockAlignBug) {
|
||||
// FIXME: handle variable width background
|
||||
frame.style.position = "relative"; frame.style.width = frame.style.height = 0;
|
||||
frame.style.verticalAlign = frame.style.marginLeft = frame.style.marginRight = "";
|
||||
frame.style.border = frame.style.padding = "";
|
||||
if (borders && HTMLCSS.msieBorderWidthBug)
|
||||
{H += borders.top + borders.bottom; W += borders.left + borders.right}
|
||||
frame.style.width = HTMLCSS.Em(lp+dd);
|
||||
HTMLCSS.placeBox(HTMLCSS.addElement(frame,"span",{
|
||||
noAdjust: true, isMathJax: true,
|
||||
style: {display:"inline-block", position:"absolute", overflow:"hidden",
|
||||
width: HTMLCSS.Em(W), height: HTMLCSS.Em(H),
|
||||
background: values.mathbackground}
|
||||
background:(values.mathbackground||"transparent"),
|
||||
width: HTMLCSS.Em(W), height: HTMLCSS.Em(H)}
|
||||
}),lW,span.bbox.h+dd);
|
||||
HTMLCSS.setBorders(frame.firstChild,borders);
|
||||
}
|
||||
span.parentNode.insertBefore(frame,span);
|
||||
if (HTMLCSS.msieColorPositionBug) {span.style.position = "relative"}
|
||||
|
@ -1724,6 +1808,11 @@
|
|||
});
|
||||
|
||||
MML.mrow.Augment({
|
||||
HTMLlineBreaks: function (span) {
|
||||
if (!this.parent.linebreakContainer) {return false}
|
||||
return (HTMLCSS.config.linebreaks.automatic &&
|
||||
span.bbox.w > HTMLCSS.linebreakWidth) || this.hasNewline();
|
||||
},
|
||||
HTMLstretchH: function (box,w) {
|
||||
this.HTMLremoveColor();
|
||||
var span = this.HTMLspanElement();
|
||||
|
@ -1743,24 +1832,20 @@
|
|||
});
|
||||
|
||||
MML.mstyle.Augment({
|
||||
toHTML: function (span) {
|
||||
toHTML: function (span,HW,D) {
|
||||
span = this.HTMLcreateSpan(span);
|
||||
if (this.data[0] != null) {
|
||||
span = this.data[0].toHTML(span);
|
||||
this.spanID = this.data[0].spanID;
|
||||
this.HTMLhandleSpace(span);
|
||||
this.HTMLhandleColor(span);
|
||||
var SPAN = this.data[0].toHTML(span);
|
||||
if (D != null) {this.data[0].HTMLstretchV(span,HW,D)}
|
||||
else if (HW != null) {this.data[0].HTMLstretchH(span,HW)}
|
||||
span.bbox = SPAN.bbox;
|
||||
}
|
||||
this.HTMLhandleSpace(span);
|
||||
this.HTMLhandleColor(span);
|
||||
return span;
|
||||
},
|
||||
HTMLspanElement: function () {
|
||||
return (this.data[0] != null ? this.data[0].HTMLspanElement() : null);
|
||||
},
|
||||
HTMLstretchH: function (box,w) {
|
||||
return (this.data[0] != null ? this.data[0].HTMLstretchH(box,w) : box);
|
||||
},
|
||||
HTMLstretchV: function (box,h,d) {
|
||||
return (this.data[0] != null ? this.data[0].HTMLstretchV(box,h,d) : box);
|
||||
}
|
||||
HTMLstretchH: MML.mbase.HTMLstretchH,
|
||||
HTMLstretchV: MML.mbase.HTMLstretchV
|
||||
});
|
||||
|
||||
MML.mfrac.Augment({
|
||||
|
@ -2097,7 +2182,8 @@
|
|||
|
||||
MML.math.Augment({
|
||||
toHTML: function (span,node) {
|
||||
var alttext = this.Get("alttext"); if (alttext) {node.setAttribute("aria-label",alttext)}
|
||||
var alttext = this.Get("alttext");
|
||||
if (alttext && alttext !== "") {node.setAttribute("aria-label",alttext)}
|
||||
var nobr = HTMLCSS.addElement(span,"nobr",{isMathJax: true});
|
||||
span = this.HTMLcreateSpan(nobr);
|
||||
var stack = HTMLCSS.createStack(span), box = HTMLCSS.createBox(stack), math;
|
||||
|
@ -2211,7 +2297,6 @@
|
|||
msieRelativeWidthBug: quirks,
|
||||
msieMarginWidthBug: true,
|
||||
msiePaddingWidthBug: true,
|
||||
msieCharPaddingWidthBug: (isIE8 && !quirks),
|
||||
msieBorderWidthBug: quirks,
|
||||
msieInlineBlockAlignBug: (!isIE8 || quirks),
|
||||
msieVerticalAlignBug: (isIE8 && !quirks),
|
||||
|
@ -2271,6 +2356,11 @@
|
|||
safariWebFontSerif: ["serif"],
|
||||
allowWebFonts: (v3p1 && !forceImages ? "otf" : false)
|
||||
});
|
||||
if (browser.isPC) {
|
||||
HTMLCSS.Augment({
|
||||
adjustAvailableFonts: HTMLCSS.removeSTIXfonts
|
||||
});
|
||||
}
|
||||
if (forceImages) {
|
||||
// Force image mode for iOS prior to 4.2 and Droid prior to 2.2
|
||||
// (iPhone should do SVG web fonts, but crashes with MathJax)
|
||||
|
@ -2305,15 +2395,7 @@
|
|||
FontFaceBug: true,
|
||||
PaddingWidthBug: true,
|
||||
allowWebFonts: (browser.versionAtLeast("10.0") && !browser.isMini ? "otf" : false),
|
||||
//
|
||||
// Opera doesn't display many STIX characters, so remove it
|
||||
// from the availableFonts array, if it is there.
|
||||
//
|
||||
adjustAvailableFonts: function (fonts) {
|
||||
for (var i = 0, m = fonts.length; i < m; i++)
|
||||
{if (fonts[i] === "STIX") {fonts.splice(i,1); m--; i--;}}
|
||||
if (this.config.preferredFont === "STIX") {this.config.preferredFont = fonts[0]}
|
||||
}
|
||||
adjustAvailableFonts: HTMLCSS.removeSTIXfonts
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
MathJax.OutputJax.NativeMML = MathJax.OutputJax({
|
||||
id: "NativeMML",
|
||||
version: "1.1.9",
|
||||
version: "1.1.10",
|
||||
directory: MathJax.OutputJax.directory + "/NativeMML",
|
||||
extensionDir: MathJax.OutputJax.extensionDir + "/NativeMML",
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user