Merge branch 'v2.0-candidate' into doc-update

This commit is contained in:
Davide P. Cervone 2012-02-17 14:17:53 -05:00
commit 77e84ff894
28 changed files with 43 additions and 40 deletions

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

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

View File

@ -826,7 +826,7 @@ MathJax.Hub.Config({
// that exists on the system (even if it doesn't contain the needed // that exists on the system (even if it doesn't contain the needed
// character), so order these carefully. // character), so order these carefully.
// //
MISSINGFONT: "STIXGeneral,'Arial Unicode MS',serif", undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif",
// //
// This setting controls whether <mtext> elements will be typeset // This setting controls whether <mtext> elements will be typeset

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

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.OutputJax.SVG=MathJax.OutputJax({id:"SVG",version:"2.0",directory:MathJax.OutputJax.directory+"/SVG",extensionDir:MathJax.OutputJax.extensionDir+"/SVG",autoloadDir:MathJax.OutputJax.directory+"/SVG/autoload",fontDir:MathJax.OutputJax.directory+"/SVG/fonts",config:{scale:100,minScaleAdjust:50,font:"TeX",blacker:10,mtextFontInherit:false,MISSINGFONT:"STIXGeneral,'Arial Unicode MS',serif",addMMLclasses:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_SVG_Display":{"text-align":"center",margin:"1em 0em"},"#MathJax_SVG_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",padding:"3px 4px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.SVG.Register("jax/mml")}MathJax.OutputJax.SVG.loadComplete("config.js"); MathJax.OutputJax.SVG=MathJax.OutputJax({id:"SVG",version:"2.0",directory:MathJax.OutputJax.directory+"/SVG",extensionDir:MathJax.OutputJax.extensionDir+"/SVG",autoloadDir:MathJax.OutputJax.directory+"/SVG/autoload",fontDir:MathJax.OutputJax.directory+"/SVG/fonts",config:{scale:100,minScaleAdjust:50,font:"TeX",blacker:10,mtextFontInherit:false,undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",addMMLclasses:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_SVG_Display":{"text-align":"center",margin:"1em 0em"},"#MathJax_SVG_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",padding:"3px 4px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.SVG.Register("jax/mml")}MathJax.OutputJax.SVG.loadComplete("config.js");

File diff suppressed because one or more lines are too long

View File

@ -826,7 +826,7 @@ MathJax.Hub.Config({
// that exists on the system (even if it doesn't contain the needed // that exists on the system (even if it doesn't contain the needed
// character), so order these carefully. // character), so order these carefully.
// //
MISSINGFONT: "STIXGeneral,'Arial Unicode MS',serif", undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif",
// //
// This setting controls whether <mtext> elements will be typeset // This setting controls whether <mtext> elements will be typeset

View File

@ -144,9 +144,8 @@
if (child.nodeName === "#comment") continue; if (child.nodeName === "#comment") continue;
if (child.nodeName === "#text") { if (child.nodeName === "#text") {
if (mml.isToken && !mml.mmlSelfClosing) { if (mml.isToken && !mml.mmlSelfClosing) {
var text = this.trimSpace(child.nodeValue); var text = child.nodeValue.replace(/&([a-z][a-z0-9]*);/ig,this.replaceEntity);
text = text.replace(/&([a-z][a-z0-9]*);/ig,this.replaceEntity); mml.Append(MML.chars(this.trimSpace(text)));
mml.Append(MML.chars(text));
} else if (child.nodeValue.match(/\S/)) { } else if (child.nodeValue.match(/\S/)) {
MATHML.Error("Unexpected text node: '"+child.nodeValue+"'"); MATHML.Error("Unexpected text node: '"+child.nodeValue+"'");
} }

View File

@ -325,7 +325,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
HTMLcreateSliceSpan: function (span) { HTMLcreateSliceSpan: function (span) {
var SPAN = this.HTMLspanElement(), n = 0; var SPAN = this.HTMLspanElement(), n = 0;
var LAST = SPAN; while (LAST.nextMathJaxSpan) {LAST = LAST.nextMathJaxSpan; n++} var LAST = SPAN; while (LAST.nextMathJaxSpan) {LAST = LAST.nextMathJaxSpan; n++}
var SLICE = SPAN.cloneNode(false); LAST.nextMathJaxSpan = SLICE; var SLICE = SPAN.cloneNode(false); LAST.nextMathJaxSpan = SLICE; SLICE.nextMathJaxSpan = null;
SLICE.id += "-MathJax-Continue-"+n; SLICE.id += "-MathJax-Continue-"+n;
SLICE.bbox = this.HTMLemptyBBox({}); SLICE.bbox = this.HTMLemptyBBox({});
return span.appendChild(SLICE); return span.appendChild(SLICE);

View File

@ -332,11 +332,11 @@
}, },
0x27EA: // left double angle bracket 0x27EA: // left double angle bracket
{ {
dir: V, HW: [[.931,GENERAL],[1.23,SIZE1],[1.845,SIZE2],[2.461,SIZE3],[3.075,SIZE4]], dir: V, HW: [[.931,GENERAL],[1.23,SIZE1],[1.845,SIZE2],[2.461,SIZE3],[3.075,SIZE4]]
}, },
0x27EB: // right double angle bracket 0x27EB: // right double angle bracket
{ {
dir: V, HW: [[.931,GENERAL],[1.23,SIZE1],[1.845,SIZE2],[2.461,SIZE3],[3.075,SIZE4]], dir: V, HW: [[.931,GENERAL],[1.23,SIZE1],[1.845,SIZE2],[2.461,SIZE3],[3.075,SIZE4]]
}, },
0x290A: // up triple arrow 0x290A: // up triple arrow
{ {
@ -399,7 +399,7 @@
{ {
dir: V, HW: [[.932,GENERAL]], dir: V, HW: [[.932,GENERAL]],
stretch: {top:[0xE10C,NONUNI,-.1,.05], ext:[0x23D0,GENERAL], bot:[0xE10D,NONUNI,-.1]} stretch: {top:[0xE10C,NONUNI,-.1,.05], ext:[0x23D0,GENERAL], bot:[0xE10D,NONUNI,-.1]}
}, }
}; };

View File

@ -894,7 +894,8 @@
return space; return space;
}, },
createSpace: function (span,h,d,w,color) { createSpace: function (span,h,d,w,color) {
var H = this.Em(Math.max(0,h+d)), D = this.Em(-d); if (h < -d) {d = -h} // make sure h is above d
var H = this.Em(h+d), D = this.Em(-d);
if (this.msieInlineBlockAlignBug) {D = this.Em(HTMLCSS.getHD(span.parentNode).d-d)} if (this.msieInlineBlockAlignBug) {D = this.Em(HTMLCSS.getHD(span.parentNode).d-d)}
if (span.isBox || span.className == "mspace") { if (span.isBox || span.className == "mspace") {
var scale = (span.scale == null ? 1 : span.scale); var scale = (span.scale == null ? 1 : span.scale);
@ -925,6 +926,7 @@
return span; return span;
}, },
createRule: function (span,h,d,w,color) { createRule: function (span,h,d,w,color) {
if (h < -d) {d = -h} // make sure h is above d
var min = HTMLCSS.TeX.min_rule_thickness, f = 1; var min = HTMLCSS.TeX.min_rule_thickness, f = 1;
// If rule is very thin, make it at least min_rule_thickness so it doesn't disappear // If rule is very thin, make it at least min_rule_thickness so it doesn't disappear
if (w > 0 && w*this.em < min) {w = min/this.em} if (w > 0 && w*this.em < min) {w = min/this.em}
@ -942,6 +944,7 @@
return rule; return rule;
}, },
createFrame: function (span,h,d,w,t,style) { createFrame: function (span,h,d,w,t,style) {
if (h < -d) {d = -h} // make sure h is above d
var T = (this.msieBorderWidthBug ? 0 : 2*t); var T = (this.msieBorderWidthBug ? 0 : 2*t);
var H = this.Em(h+d-T), D = this.Em(-d-t), W = this.Em(w-T); var H = this.Em(h+d-T), D = this.Em(-d-t), W = this.Em(w-T);
var B = this.Em(t)+" "+style; var B = this.Em(t)+" "+style;

View File

@ -414,7 +414,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
// use it to modify the default penalty // use it to modify the default penalty
// //
var linebreak = PENALTY[values.linebreak||MML.LINEBREAK.AUTO]; var linebreak = PENALTY[values.linebreak||MML.LINEBREAK.AUTO];
if (values.linebreak === MML.LINEBREAK.AUTO && w >= PENALTY.spacelimit) if (values.linebreak === MML.LINEBREAK.AUTO && w >= PENALTY.spacelimit*1000)
{linebreak = [(w+PENALTY.spaceoffset)*PENALTY.spacefactor]} {linebreak = [(w+PENALTY.spaceoffset)*PENALTY.spacefactor]}
if (!(linebreak instanceof Array)) { if (!(linebreak instanceof Array)) {
// for breaks past the width, don't modify penalty // for breaks past the width, don't modify penalty

View File

@ -35,7 +35,7 @@ MathJax.OutputJax.SVG = MathJax.OutputJax({
font: "TeX", // currently the only font available font: "TeX", // currently the only font available
blacker: 10, // stroke-width to make fonts blacker blacker: 10, // stroke-width to make fonts blacker
mtextFontInherit: false, // to make <mtext> be in page font rather than MathJax font mtextFontInherit: false, // to make <mtext> be in page font rather than MathJax font
MISSINGFONT: "STIXGeneral,'Arial Unicode MS',serif", // fonts to use for missing characters undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif", // fonts to use for missing characters
addMMLclasses: false, // keep MathML structure and use CSS classes to mark elements addMMLclasses: false, // keep MathML structure and use CSS classes to mark elements

View File

@ -542,7 +542,7 @@
+ String.fromCharCode((N&0x3FF)+0xDC00); + String.fromCharCode((N&0x3FF)+0xDC00);
} }
text = BBOX.TEXT(scale,c,{ text = BBOX.TEXT(scale,c,{
"font-family":variant.defaultFamily||SVG.config.MISSINGFONT, "font-family":variant.defaultFamily||SVG.config.undefinedFamily,
"font-style":(variant.italic?"italic":""), "font-style":(variant.italic?"italic":""),
"font-weight":(variant.bold?"bold":"") "font-weight":(variant.bold?"bold":"")
}) })
@ -1093,7 +1093,7 @@
var g = SVG.Element("g"); g.appendChild(svg.element); var g = SVG.Element("g"); g.appendChild(svg.element);
svg.element = g; svg.removable = true; svg.element = g; svg.removable = true;
} }
svg.Add(BBOX.RECT(svg.h,svg.d,svg.w,{fill:values.background}),0,0,false,true); svg.Add(BBOX.RECT(svg.h,svg.d,svg.w,{fill:values.background,stroke:"none"}),0,0,false,true)
} }
// //
// Add borders // Add borders
@ -1411,6 +1411,7 @@
svg.d = SVG.length2em(values.depth,mu) / svg.scale; svg.d = SVG.length2em(values.depth,mu) / svg.scale;
svg.w = svg.r = SVG.length2em(values.width,mu) / svg.scale; svg.w = svg.r = SVG.length2em(values.width,mu) / svg.scale;
if (svg.w < 0) {svg.x = svg.w; svg.w = svg.r = 0} if (svg.w < 0) {svg.x = svg.w; svg.w = svg.r = 0}
if (svg.h < -svg.d) {svg.d = -svg.h}
svg.l = 0; svg.Clean(); svg.l = 0; svg.Clean();
this.SVGhandleColor(svg); this.SVGhandleColor(svg);
this.SVGsaveData(svg); this.SVGsaveData(svg);