Skip to content

Commit 189239a

Browse files
committed
Fix conflicts with develop.
2 parents f067ecc + dd32c56 commit 189239a

File tree

22 files changed

+289
-221
lines changed

22 files changed

+289
-221
lines changed

unpacked/MathJax.js

+2
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,8 @@ MathJax.cdnFileVersions = {}; // can be used to specify revisions for individua
659659

660660
var PATH = {};
661661
PATH[BASENAME] = ""; // empty path gets the root URL
662+
PATH.Contrib = (String(location.protocol).match(/^https?:/) ? "" : "http:") +
663+
"//cdn.mathjax.org/mathjax/contrib"; // the third-party extensions
662664

663665
BASE.Ajax = {
664666
loaded: {}, // files already loaded

unpacked/extensions/AssistiveMML.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@
115115
while (state.i < m) {
116116
jax = state.jax[state.i];
117117
frame = document.getElementById(jax.inputID+"-Frame");
118-
if (jax.outputJax !== "NativeMML" && frame && !frame.getAttribute("data-mathml")) {
118+
if (jax.outputJax !== "NativeMML" && jax.outputJax !== "PlainSource" &&
119+
frame && !frame.getAttribute("data-mathml")) {
119120
try {
120121
mml = jax.root.toMathML("").replace(/\n */g,"").replace(/<!--.*?-->/g,"");
121122
} catch (err) {

unpacked/extensions/HTML-CSS/handle-floats.js

+3-36
Original file line numberDiff line numberDiff line change
@@ -41,42 +41,9 @@ MathJax.Extension["HTML-CSS/handle-floats"] = {
4141
};
4242

4343
//
44-
// Make the display DIV be a table-cell
45-
// Use padding to get the separation, since table cells don't do margin
46-
// Make the width large (it will shrink to fit the remaining room)
44+
// This file is now obsolete, since the HTML-CSS output already handles
45+
// floating elements properly.
4746
//
48-
MathJax.Hub.Config({
49-
"HTML-CSS": {
50-
styles: {
51-
".MathJax_Display": {
52-
display: "table-cell",
53-
padding: "1em 0 ! important",
54-
width: (MathJax.Hub.Browser.isMSIE && (document.documentMode||0) < 8 ? "100%" : "1000em")
55-
}
56-
}
57-
}
58-
});
59-
60-
//
61-
// Two consecutive equations would end up side-by-side, so force a separator
62-
// (Needed by IE8, IE9, and Firefox, at least).
63-
//
64-
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
65-
var HTMLCSS = MathJax.OutputJax["HTML-CSS"],
66-
TRANSLATE = HTMLCSS.Translate;
67-
HTMLCSS.Augment({
68-
Translate: function (script,state) {
69-
TRANSLATE.apply(this,arguments);
70-
if (script.MathJax.elementJax.HTMLCSS.display) {
71-
var next = script.nextSibling;
72-
if (!next || next.className !== "MathJax_MSIE_Separator") {
73-
var span = HTMLCSS.Element("span",{className:"MathJax_MSIE_Separator"});
74-
script.parentNode.insertBefore(span,next);
75-
}
76-
}
77-
}
78-
});
79-
MathJax.Hub.Startup.signal.Post("HTML-CSS handle-floats Ready");
80-
});
8147

48+
MathJax.Hub.Startup.signal.Post("HTML-CSS handle-floats Ready");
8249
MathJax.Ajax.loadComplete("[MathJax]/extensions/HTML-CSS/handle-floats.js");
+122-99
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,129 @@
1+
/*************************************************************
2+
*
3+
* MathJax/extensions/TeX/mediawiki-texvc.js
4+
*
5+
* Implements macros used by mediawiki with their texvc preprocessor.
6+
*
7+
* ---------------------------------------------------------------------
8+
*
9+
* Copyright (c) 2015-2016 The MathJax Consortium
10+
*
11+
* Licensed under the Apache License, Version 2.0 (the "License");
12+
* you may not use this file except in compliance with the License.
13+
* You may obtain a copy of the License at
14+
*
15+
* http://www.apache.org/licenses/LICENSE-2.0
16+
*
17+
* Unless required by applicable law or agreed to in writing, software
18+
* distributed under the License is distributed on an "AS IS" BASIS,
19+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20+
* See the License for the specific language governing permissions and
21+
* limitations under the License.
22+
*/
23+
124
MathJax.Extension["TeX/mediawiki-texvc"] = {
2-
version: "2.6.0-beta.2"
25+
version: "2.6.1"
326
};
427

528
MathJax.Hub.Register.StartupHook("TeX Jax Ready", function () {
6-
MathJax.InputJax.TeX.Definitions.Add({
7-
macros: {
8-
AA: ["Macro", "\u00c5"],
9-
alef: ["Macro", "\\aleph"],
10-
alefsym: ["Macro", "\\aleph"],
11-
Alpha: ["Macro", "\\mathrm{A}"],
12-
and: ["Macro", "\\land"],
13-
ang: ["Macro", "\\angle"],
14-
Bbb: ["Macro", "\\mathbb"],
15-
Beta: ["Macro", "\\mathrm{B}"],
16-
bold: ["Macro", "\\mathbf"],
17-
bull: ["Macro", "\\bullet"],
18-
C: ["Macro", "\\mathbb{C}"],
19-
Chi: ["Macro", "\\mathrm{X}"],
20-
clubs: ["Macro", "\\clubsuit"],
21-
cnums: ["Macro", "\\mathbb{C}"],
22-
Complex: ["Macro", "\\mathbb{C}"],
23-
coppa: ["Macro", "\u03D9"],
24-
Coppa: ["Macro", "\u03D8"],
25-
Dagger: ["Macro", "\\ddagger"],
26-
Digamma: ["Macro", "\u03DC"],
27-
darr: ["Macro", "\\downarrow"],
28-
dArr: ["Macro", "\\Downarrow"],
29-
Darr: ["Macro", "\\Downarrow"],
30-
diamonds: ["Macro", "\\diamondsuit"],
31-
empty: ["Macro", "\\emptyset"],
32-
Epsilon: ["Macro", "\\mathrm{E}"],
33-
Eta: ["Macro", "\\mathrm{H}"],
34-
euro: ["Macro", "\u20AC"],
35-
exist: ["Macro", "\\exists"],
36-
geneuro: ["Macro", "\u20AC"],
37-
geneuronarrow: ["Macro", "\u20AC"],
38-
geneurowide: ["Macro", "\u20AC"],
39-
H: ["Macro", "\\mathbb{H}"],
40-
hAar: ["Macro", "\\Leftrightarrow"],
41-
harr: ["Macro", "\\leftrightarrow"],
42-
Harr: ["Macro", "\\Leftrightarrow"],
43-
hearts: ["Macro", "\\heartsuit"],
44-
image: ["Macro", "\\Im"],
45-
infin: ["Macro", "\\infty"],
46-
Iota: ["Macro", "\\mathrm{I}"],
47-
isin: ["Macro", "\\in"],
48-
Kappa: ["Macro", "\\mathrm{K}"],
49-
koppa: ["Macro", "\u03DF"],
50-
Koppa: ["Macro", "\u03DE"],
51-
lang: ["Macro", "\\langle"],
52-
larr: ["Macro", "\\leftarrow"],
53-
Larr: ["Macro", "\\Leftarrow"],
54-
lArr: ["Macro", "\\Leftarrow"],
55-
lrarr: ["Macro", "\\leftrightarrow"],
56-
Lrarr: ["Macro", "\\Leftrightarrow"],
57-
lrArr: ["Macro", "\\Leftrightarrow"],
58-
Mu: ["Macro", "\\mathrm{M}"],
59-
N: ["Macro", "\\mathbb{N}"],
60-
natnums: ["Macro", "\\mathbb{N}"],
61-
Nu: ["Macro", "\\mathrm{N}"],
62-
O: ["Macro", "\\emptyset"],
63-
officialeuro: ["Macro", "\u20AC"],
64-
Omicron: ["Macro", "\\mathrm{O}"],
65-
or: ["Macro", "\\lor"],
66-
P: ["Macro", "\u00B6"],
67-
pagecolor: ['Macro','',1], // ignore \pagecolor{}
68-
part: ["Macro", "\\partial"],
69-
plusmn: ["Macro", "\\pm"],
70-
Q: ["Macro", "\\mathbb{Q}"],
71-
R: ["Macro", "\\mathbb{R}"],
72-
rang: ["Macro", "\\rangle"],
73-
rarr: ["Macro", "\\rightarrow"],
74-
Rarr: ["Macro", "\\Rightarrow"],
75-
rArr: ["Macro", "\\Rightarrow"],
76-
real: ["Macro", "\\Re"],
77-
reals: ["Macro", "\\mathbb{R}"],
78-
Reals: ["Macro", "\\mathbb{R}"],
79-
Rho: ["Macro", "\\mathrm{P}"],
80-
sdot: ["Macro", "\\cdot"],
81-
sampi: ["Macro", "\u03E1"],
82-
Sampi: ["Macro", "\u03E0"],
83-
sect: ["Macro", "\\S"],
84-
spades: ["Macro", "\\spadesuit"],
85-
stigma: ["Macro", "\u03DB"],
86-
Stigma: ["Macro", "\u03DA"],
87-
sub: ["Macro", "\\subset"],
88-
sube: ["Macro", "\\subseteq"],
89-
supe: ["Macro", "\\supseteq"],
90-
Tau: ["Macro", "\\mathrm{T}"],
91-
textvisiblespace: ["Macro", "\u2423"],
92-
thetasym: ["Macro", "\\vartheta"],
93-
uarr: ["Macro", "\\uparrow"],
94-
uArr: ["Macro", "\\Uparrow"],
95-
Uarr: ["Macro", "\\Uparrow"],
96-
varcoppa: ["Macro", "\u03D9"],
97-
varstigma: ["Macro", "\u03DB"],
98-
vline: ['Macro','\\smash{\\large\\lvert}',0],
99-
weierp: ["Macro", "\\wp"],
100-
Z: ["Macro", "\\mathbb{Z}"],
101-
Zeta: ["Macro", "\\mathrm{Z}"]
102-
}
103-
});
29+
MathJax.InputJax.TeX.Definitions.Add({
30+
macros: {
31+
AA: ["Macro", "\u00c5"],
32+
alef: ["Macro", "\\aleph"],
33+
alefsym: ["Macro", "\\aleph"],
34+
Alpha: ["Macro", "\\mathrm{A}"],
35+
and: ["Macro", "\\land"],
36+
ang: ["Macro", "\\angle"],
37+
Bbb: ["Macro", "\\mathbb"],
38+
Beta: ["Macro", "\\mathrm{B}"],
39+
bold: ["Macro", "\\mathbf"],
40+
bull: ["Macro", "\\bullet"],
41+
C: ["Macro", "\\mathbb{C}"],
42+
Chi: ["Macro", "\\mathrm{X}"],
43+
clubs: ["Macro", "\\clubsuit"],
44+
cnums: ["Macro", "\\mathbb{C}"],
45+
Complex: ["Macro", "\\mathbb{C}"],
46+
coppa: ["Macro", "\u03D9"],
47+
Coppa: ["Macro", "\u03D8"],
48+
Dagger: ["Macro", "\\ddagger"],
49+
Digamma: ["Macro", "\u03DC"],
50+
darr: ["Macro", "\\downarrow"],
51+
dArr: ["Macro", "\\Downarrow"],
52+
Darr: ["Macro", "\\Downarrow"],
53+
diamonds: ["Macro", "\\diamondsuit"],
54+
empty: ["Macro", "\\emptyset"],
55+
Epsilon: ["Macro", "\\mathrm{E}"],
56+
Eta: ["Macro", "\\mathrm{H}"],
57+
euro: ["Macro", "\u20AC"],
58+
exist: ["Macro", "\\exists"],
59+
geneuro: ["Macro", "\u20AC"],
60+
geneuronarrow: ["Macro", "\u20AC"],
61+
geneurowide: ["Macro", "\u20AC"],
62+
H: ["Macro", "\\mathbb{H}"],
63+
hAar: ["Macro", "\\Leftrightarrow"],
64+
harr: ["Macro", "\\leftrightarrow"],
65+
Harr: ["Macro", "\\Leftrightarrow"],
66+
hearts: ["Macro", "\\heartsuit"],
67+
image: ["Macro", "\\Im"],
68+
infin: ["Macro", "\\infty"],
69+
Iota: ["Macro", "\\mathrm{I}"],
70+
isin: ["Macro", "\\in"],
71+
Kappa: ["Macro", "\\mathrm{K}"],
72+
koppa: ["Macro", "\u03DF"],
73+
Koppa: ["Macro", "\u03DE"],
74+
lang: ["Macro", "\\langle"],
75+
larr: ["Macro", "\\leftarrow"],
76+
Larr: ["Macro", "\\Leftarrow"],
77+
lArr: ["Macro", "\\Leftarrow"],
78+
lrarr: ["Macro", "\\leftrightarrow"],
79+
Lrarr: ["Macro", "\\Leftrightarrow"],
80+
lrArr: ["Macro", "\\Leftrightarrow"],
81+
Mu: ["Macro", "\\mathrm{M}"],
82+
N: ["Macro", "\\mathbb{N}"],
83+
natnums: ["Macro", "\\mathbb{N}"],
84+
Nu: ["Macro", "\\mathrm{N}"],
85+
O: ["Macro", "\\emptyset"],
86+
officialeuro: ["Macro", "\u20AC"],
87+
Omicron: ["Macro", "\\mathrm{O}"],
88+
or: ["Macro", "\\lor"],
89+
P: ["Macro", "\u00B6"],
90+
pagecolor: ['Macro','',1], // ignore \pagecolor{}
91+
part: ["Macro", "\\partial"],
92+
plusmn: ["Macro", "\\pm"],
93+
Q: ["Macro", "\\mathbb{Q}"],
94+
R: ["Macro", "\\mathbb{R}"],
95+
rang: ["Macro", "\\rangle"],
96+
rarr: ["Macro", "\\rightarrow"],
97+
Rarr: ["Macro", "\\Rightarrow"],
98+
rArr: ["Macro", "\\Rightarrow"],
99+
real: ["Macro", "\\Re"],
100+
reals: ["Macro", "\\mathbb{R}"],
101+
Reals: ["Macro", "\\mathbb{R}"],
102+
Rho: ["Macro", "\\mathrm{P}"],
103+
sdot: ["Macro", "\\cdot"],
104+
sampi: ["Macro", "\u03E1"],
105+
Sampi: ["Macro", "\u03E0"],
106+
sect: ["Macro", "\\S"],
107+
spades: ["Macro", "\\spadesuit"],
108+
stigma: ["Macro", "\u03DB"],
109+
Stigma: ["Macro", "\u03DA"],
110+
sub: ["Macro", "\\subset"],
111+
sube: ["Macro", "\\subseteq"],
112+
supe: ["Macro", "\\supseteq"],
113+
Tau: ["Macro", "\\mathrm{T}"],
114+
textvisiblespace: ["Macro", "\u2423"],
115+
thetasym: ["Macro", "\\vartheta"],
116+
uarr: ["Macro", "\\uparrow"],
117+
uArr: ["Macro", "\\Uparrow"],
118+
Uarr: ["Macro", "\\Uparrow"],
119+
varcoppa: ["Macro", "\u03D9"],
120+
varstigma: ["Macro", "\u03DB"],
121+
vline: ['Macro','\\smash{\\large\\lvert}',0],
122+
weierp: ["Macro", "\\wp"],
123+
Z: ["Macro", "\\mathbb{Z}"],
124+
Zeta: ["Macro", "\\mathrm{Z}"]
125+
}
126+
});
104127
});
105128

106129
MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mediawiki-texvc.js");

unpacked/extensions/asciimath2jax.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,13 @@ MathJax.Extension.asciimath2jax = {
207207
},
208208

209209
createPreview: function (mode,asciimath) {
210+
var previewClass = MathJax.Hub.config.preRemoveClass;
210211
var preview = this.config.preview;
211212
if (preview === "none") return;
213+
if ((this.search.close.previousSibling||{}).className === previewClass) return;
212214
if (preview === "AsciiMath") {preview = [this.filterPreview(asciimath)]}
213215
if (preview) {
214-
preview = MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},preview);
216+
preview = MathJax.HTML.Element("span",{className:previewClass},preview);
215217
this.insertNode(preview);
216218
}
217219
},

unpacked/extensions/jsMath2jax.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,13 @@ MathJax.Extension.jsMath2jax = {
7373
},
7474

7575
createPreview: function (node) {
76+
var previewClass = MathJax.Hub.config.preRemoveClass;
7677
var preview = this.config.preview;
78+
if (preview === "none") return;
79+
if ((node.previousSibling||{}).className === previewClass) return;
7780
if (preview === "TeX") {preview = [this.filterPreview(node.innerHTML)]}
7881
if (preview) {
79-
preview = MathJax.HTML.Element("span",{className: MathJax.Hub.config.preRemoveClass},preview);
82+
preview = MathJax.HTML.Element("span",{className:previewClass},preview);
8083
node.parentNode.insertBefore(preview,node);
8184
}
8285
},

unpacked/extensions/mml2jax.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ MathJax.Extension.mml2jax = {
203203
var preview = this.config.preview;
204204
if (preview === "none") return;
205205
var isNodePreview = false;
206+
var previewClass = MathJax.Hub.config.preRemoveClass;
207+
if ((script.previousSibling||{}).className === previewClass) return;
206208
if (preview === "mathml") {
207209
isNodePreview = true;
208210
// mathml preview does not work with IE < 9, so fallback to alttext.
@@ -225,10 +227,10 @@ MathJax.Extension.mml2jax = {
225227
if (preview) {
226228
var span;
227229
if (isNodePreview) {
228-
span = MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass});
230+
span = MathJax.HTML.Element("span",{className:previewClass});
229231
span.appendChild(preview);
230232
} else {
231-
span = MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},preview);
233+
span = MathJax.HTML.Element("span",{className:previewClass},preview);
232234
}
233235
script.parentNode.insertBefore(span,script);
234236
}

unpacked/extensions/tex2jax.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,13 @@ MathJax.Extension.tex2jax = {
277277
},
278278

279279
createPreview: function (mode,tex) {
280+
var previewClass = MathJax.Hub.config.preRemoveClass;
280281
var preview = this.config.preview;
281282
if (preview === "none") return;
283+
if ((this.search.close.previousSibling||{}).className === previewClass) return;
282284
if (preview === "TeX") {preview = [this.filterPreview(tex)]}
283285
if (preview) {
284-
preview = MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},preview);
286+
preview = MathJax.HTML.Element("span",{className:previewClass},preview);
285287
this.insertNode(preview);
286288
}
287289
},

unpacked/jax/input/MathML/jax.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,14 @@
142142
value = this.filterAttribute(name,value);
143143
var defaults = (mml.type === "mstyle" ? MML.math.prototype.defaults : mml.defaults);
144144
if (value != null) {
145-
if (value.toLowerCase() === "true") {value = true}
146-
else if (value.toLowerCase() === "false") {value = false}
145+
var val = value.toLowerCase();
146+
if (val === "true" || val === "false") {
147+
if (typeof (defaults[name]) === "boolean" || defaults[name] === MML.INHERIT ||
148+
(defaults[name] === MML.AUTO &&
149+
(mml.defaultDef == null || typeof(mml.defaultDef[name]) === "boolean"))) {
150+
value = (val === "true");
151+
}
152+
}
147153
if (defaults[name] != null || MML.copyAttributes[name])
148154
{mml[name] = value} else {mml.attr[name] = value}
149155
mml.attrNames.push(name);

0 commit comments

Comments
 (0)