jax.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756
  1. /* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
  2. /* vim: set ts=2 et sw=2 tw=80: */
  3. /*************************************************************
  4. *
  5. * MathJax/jax/input/MathML/jax.js
  6. *
  7. * Implements the MathML InputJax that reads mathematics in
  8. * MathML format and converts it to the MML ElementJax
  9. * internal format.
  10. *
  11. * ---------------------------------------------------------------------
  12. *
  13. * Copyright (c) 2010-2013 The MathJax Consortium
  14. *
  15. * Licensed under the Apache License, Version 2.0 (the "License");
  16. * you may not use this file except in compliance with the License.
  17. * You may obtain a copy of the License at
  18. *
  19. * http://www.apache.org/licenses/LICENSE-2.0
  20. *
  21. * Unless required by applicable law or agreed to in writing, software
  22. * distributed under the License is distributed on an "AS IS" BASIS,
  23. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24. * See the License for the specific language governing permissions and
  25. * limitations under the License.
  26. */
  27. (function (MATHML,BROWSER) {
  28. var MML;
  29. var _ = function (id) {
  30. return MathJax.Localization._.apply(MathJax.Localization,
  31. [["MathML",id]].concat([].slice.call(arguments,1)))
  32. };
  33. MATHML.Parse = MathJax.Object.Subclass({
  34. Init: function (string) {this.Parse(string)},
  35. //
  36. // Parse the MathML and check for errors
  37. //
  38. Parse: function (math) {
  39. var doc;
  40. if (typeof math !== "string") {doc = math.parentNode} else {
  41. doc = MATHML.ParseXML(this.preProcessMath.call(this,math));
  42. if (doc == null) {MATHML.Error(["ErrorParsingMathML","Error parsing MathML"])}
  43. }
  44. var err = doc.getElementsByTagName("parsererror")[0];
  45. if (err) MATHML.Error(["ParsingError","Error parsing MathML: %1",
  46. err.textContent.replace(/This page.*?errors:|XML Parsing Error: |Below is a rendering of the page.*/g,"")]);
  47. if (doc.childNodes.length !== 1)
  48. {MATHML.Error(["MathMLSingleElement","MathML must be formed by a single element"])}
  49. if (doc.firstChild.nodeName.toLowerCase() === "html") {
  50. var h1 = doc.getElementsByTagName("h1")[0];
  51. if (h1 && h1.textContent === "XML parsing error" && h1.nextSibling)
  52. MATHML.Error(["ParsingError","Error parsing MathML: %1",
  53. String(h1.nextSibling.nodeValue).replace(/fatal parsing error: /,"")]);
  54. }
  55. if (doc.firstChild.nodeName.toLowerCase().replace(/^[a-z]+:/,"") !== "math") {
  56. MATHML.Error(["MathMLRootElement",
  57. "MathML must be formed by a <math> element, not %1",
  58. "<"+doc.firstChild.nodeName+">"]);
  59. }
  60. this.mml = this.MakeMML(doc.firstChild);
  61. },
  62. //
  63. // Convert the MathML structure to the MathJax Element jax structure
  64. //
  65. MakeMML: function (node) {
  66. var CLASS = String(node.getAttribute("class")||""); // make sure CLASS is a string
  67. var mml, type = node.nodeName.toLowerCase().replace(/^[a-z]+:/,"");
  68. var match = (CLASS.match(/(^| )MJX-TeXAtom-([^ ]*)/));
  69. if (match) {
  70. mml = this.TeXAtom(match[2]);
  71. } else if (!(MML[type] && MML[type].isa && MML[type].isa(MML.mbase))) {
  72. MathJax.Hub.signal.Post(["MathML Jax - unknown node type",type]);
  73. return MML.merror(_("UnknownNodeType","Unknown node type: %1",type));
  74. } else {
  75. mml = MML[type]();
  76. }
  77. this.AddAttributes(mml,node); this.CheckClass(mml,mml["class"]);
  78. this.AddChildren(mml,node);
  79. if (MATHML.config.useMathMLspacing) {mml.useMMLspacing = 0x08}
  80. return mml;
  81. },
  82. TeXAtom: function (mclass) {
  83. var mml = MML.TeXAtom().With({texClass:MML.TEXCLASS[mclass]});
  84. if (mml.texClass === MML.TEXCLASS.OP) {mml.movesupsub = mml.movablelimits = true}
  85. return mml;
  86. },
  87. CheckClass: function (mml,CLASS) {
  88. CLASS = (CLASS||"").split(/ /); var NCLASS = [];
  89. for (var i = 0, m = CLASS.length; i < m; i++) {
  90. if (CLASS[i].substr(0,4) === "MJX-") {
  91. if (CLASS[i] === "MJX-arrow") {
  92. mml.arrow = true;
  93. } else if (CLASS[i] === "MJX-variant") {
  94. mml.variantForm = true;
  95. //
  96. // Variant forms come from AMSsymbols, and it sets up the
  97. // character mappings, so load that if needed.
  98. //
  99. if (!MathJax.Extension["TeX/AMSsymbols"])
  100. {MathJax.Hub.RestartAfter(MathJax.Ajax.Require("[MathJax]/extensions/TeX/AMSsymbols.js"))}
  101. } else if (CLASS[i].substr(0,11) !== "MJX-TeXAtom") {
  102. mml.mathvariant = CLASS[i].substr(3);
  103. //
  104. // Caligraphic and oldstyle bold are set up in the boldsymbol
  105. // extension, so load it if it isn't already loaded.
  106. //
  107. if (mml.mathvariant === "-tex-caligraphic-bold" ||
  108. mml.mathvariant === "-tex-oldstyle-bold") {
  109. if (!MathJax.Extension["TeX/boldsymbol"])
  110. {MathJax.Hub.RestartAfter(MathJax.Ajax.Require("[MathJax]/extensions/TeX/boldsymbol.js"))}
  111. }
  112. }
  113. } else {NCLASS.push(CLASS[i])}
  114. }
  115. if (NCLASS.length) {mml["class"] = NCLASS.join(" ")} else {delete mml["class"]}
  116. },
  117. //
  118. // Add the attributes to the mml node
  119. //
  120. AddAttributes: function (mml,node) {
  121. mml.attr = {}; mml.attrNames = [];
  122. for (var i = 0, m = node.attributes.length; i < m; i++) {
  123. var name = node.attributes[i].name;
  124. if (name == "xlink:href") {name = "href"}
  125. if (name.match(/:/)) continue;
  126. if (name.match(/^_moz-math-((column|row)(align|line)|font-style)$/)) continue;
  127. var value = node.attributes[i].value;
  128. value = this.filterAttribute(name,value);
  129. if (value != null) {
  130. if (value.toLowerCase() === "true") {value = true}
  131. else if (value.toLowerCase() === "false") {value = false}
  132. if (mml.defaults[name] != null || MML.copyAttributes[name])
  133. {mml[name] = value} else {mml.attr[name] = value}
  134. mml.attrNames.push(name);
  135. }
  136. }
  137. },
  138. filterAttribute: function (name,value) {return value}, // safe mode overrides this
  139. //
  140. // Create the children for the mml node
  141. //
  142. AddChildren: function (mml,node) {
  143. for (var i = 0, m = node.childNodes.length; i < m; i++) {
  144. var child = node.childNodes[i];
  145. if (child.nodeName === "#comment") continue;
  146. if (child.nodeName === "#text") {
  147. if (mml.isToken && !mml.mmlSelfClosing) {
  148. var text = child.nodeValue.replace(/&([a-z][a-z0-9]*);/ig,this.replaceEntity);
  149. mml.Append(MML.chars(this.trimSpace(text)));
  150. } else if (child.nodeValue.match(/\S/)) {
  151. MATHML.Error(["UnexpectedTextNode",
  152. "Unexpected text node: %1","'"+child.nodeValue+"'"]);
  153. }
  154. } else if (mml.type === "annotation-xml") {
  155. mml.Append(MML.xml(child));
  156. } else {
  157. var cmml = this.MakeMML(child); mml.Append(cmml);
  158. if (cmml.mmlSelfClosing && cmml.data.length)
  159. {mml.Append.apply(mml,cmml.data); cmml.data = []}
  160. }
  161. }
  162. if (mml.type === "mrow" && mml.data.length >= 2) {
  163. var first = mml.data[0], last = mml.data[mml.data.length-1];
  164. if (first.type === "mo" && first.Get("fence") &&
  165. last.type === "mo" && last.Get("fence")) {
  166. if (first.data[0]) {mml.open = first.data.join("")}
  167. if (last.data[0]) {mml.close = last.data.join("")}
  168. }
  169. }
  170. },
  171. //
  172. // Clean Up the <math> source to prepare for XML parsing
  173. //
  174. preProcessMath: function (math) {
  175. if (math.match(/^<[a-z]+:/i) && !math.match(/^<[^<>]* xmlns:/)) {
  176. math = math.replace(/^<([a-z]+)(:math)/i,'<$1$2 xmlns:$1="http://www.w3.org/1998/Math/MathML"')
  177. }
  178. // HTML5 removes xmlns: namespaces, so put them back for XML
  179. var match = math.match(/^(<math( ('.*?'|".*?"|[^>])+)>)/i);
  180. if (match && match[2].match(/ (?!xmlns=)[a-z]+=\"http:/i)) {
  181. math = match[1].replace(/ (?!xmlns=)([a-z]+=(['"])http:.*?\2)/ig," xmlns:$1 $1") +
  182. math.substr(match[0].length);
  183. }
  184. if (math.match(/^<math/i) && !math.match(/^<[^<>]* xmlns=/)) {
  185. // append the MathML namespace
  186. math = math.replace(/^<(math)/i,'<math xmlns="http://www.w3.org/1998/Math/MathML"')
  187. }
  188. math = math.replace(/^\s*(?:\/\/)?<!(--)?\[CDATA\[((.|\n)*)(\/\/)?\]\]\1>\s*$/,"$2");
  189. return math.replace(/&([a-z][a-z0-9]*);/ig,this.replaceEntity);
  190. },
  191. //
  192. // Remove attribute whitespace
  193. //
  194. trimSpace: function (string) {
  195. return string.replace(/[\t\n\r]/g," ") // whitespace to spaces
  196. .replace(/^ +/,"") // initial whitespace
  197. .replace(/ +$/,"") // trailing whitespace
  198. .replace(/ +/g," "); // internal multiple whitespace
  199. },
  200. //
  201. // Replace a named entity by its value
  202. // (look up from external files if necessary)
  203. //
  204. replaceEntity: function (match,entity) {
  205. if (entity.match(/^(lt|amp|quot)$/)) {return match} // these mess up attribute parsing
  206. if (MATHML.Parse.Entity[entity]) {return MATHML.Parse.Entity[entity]}
  207. var file = entity.charAt(0).toLowerCase();
  208. var font = entity.match(/^[a-zA-Z](fr|scr|opf)$/);
  209. if (font) {file = font[1]}
  210. if (!MATHML.Parse.loaded[file]) {
  211. MATHML.Parse.loaded[file] = true;
  212. MathJax.Hub.RestartAfter(MathJax.Ajax.Require(MATHML.entityDir+"/"+file+".js"));
  213. }
  214. return match;
  215. }
  216. }, {
  217. loaded: [] // the entity files that are loaded
  218. });
  219. /************************************************************************/
  220. MATHML.Augment({
  221. sourceMenuTitle: /*_(MathMenu)*/ ["OriginalMathML","Original MathML"],
  222. prefilterHooks: MathJax.Callback.Hooks(true), // hooks to run before processing MathML
  223. postfilterHooks: MathJax.Callback.Hooks(true), // hooks to run after processing MathML
  224. Translate: function (script) {
  225. if (!this.ParseXML) {this.ParseXML = this.createParser()}
  226. var mml, math, data = {script:script};
  227. if (script.firstChild &&
  228. script.firstChild.nodeName.toLowerCase().replace(/^[a-z]+:/,"") === "math") {
  229. data.math = script.firstChild;
  230. this.prefilterHooks.Execute(data); math = data.math;
  231. } else {
  232. math = MathJax.HTML.getScript(script);
  233. if (BROWSER.isMSIE) {math = math.replace(/(&nbsp;)+$/,"")}
  234. data.math = math; this.prefilterHooks.Execute(data); math = data.math;
  235. }
  236. try {
  237. mml = MATHML.Parse(math).mml;
  238. } catch(err) {
  239. if (!err.mathmlError) {throw err}
  240. mml = this.formatError(err,math,script);
  241. }
  242. data.math = MML(mml); this.postfilterHooks.Execute(data);
  243. return data.math;
  244. },
  245. prefilterMath: function (math,script) {return math},
  246. prefilterMathML: function (math,script) {return math},
  247. formatError: function (err,math,script) {
  248. var message = err.message.replace(/\n.*/,"");
  249. MathJax.Hub.signal.Post(["MathML Jax - parse error",message,math,script]);
  250. return MML.merror(message);
  251. },
  252. Error: function (message) {
  253. //
  254. // Translate message if it is ["id","message",args]
  255. //
  256. if (message instanceof Array) {message = _.apply(_,message)}
  257. throw MathJax.Hub.Insert(Error(message),{mathmlError: true});
  258. },
  259. //
  260. // Parsers for various forms (DOMParser, Windows ActiveX object, other)
  261. //
  262. parseDOM: function (string) {return this.parser.parseFromString(string,"text/xml")},
  263. parseMS: function (string) {return (this.parser.loadXML(string) ? this.parser : null)},
  264. parseDIV: function (string) {
  265. this.div.innerHTML = string.replace(/<([a-z]+)([^>]*)\/>/g,"<$1$2></$1>");
  266. return this.div;
  267. },
  268. parseError: function (string) {return null},
  269. createMSParser: function() {
  270. var parser = null;
  271. var xml = ["MSXML2.DOMDocument.6.0","MSXML2.DOMDocument.5.0",
  272. "MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0",
  273. "MSXML2.DOMDocument.2.0","Microsoft.XMLDOM"];
  274. for (var i = 0, m = xml.length; i < m && !parser; i++) {
  275. try {
  276. parser = new ActiveXObject(xml[i])
  277. } catch (err) {}
  278. }
  279. return parser;
  280. },
  281. //
  282. // Create the parser using a DOMParser, or other fallback method
  283. //
  284. createParser: function () {
  285. if (window.DOMParser) {
  286. this.parser = new DOMParser();
  287. return(this.parseDOM);
  288. } else if (window.ActiveXObject) {
  289. this.parser = this.createMSParser();
  290. if (!this.parser) {
  291. MathJax.Localization.Try(this.parserCreationError);
  292. return(this.parseError);
  293. }
  294. this.parser.async = false;
  295. return(this.parseMS);
  296. }
  297. this.div = MathJax.Hub.Insert(document.createElement("div"),{
  298. style:{visibility:"hidden", overflow:"hidden", height:"1px",
  299. position:"absolute", top:0}
  300. });
  301. if (!document.body.firstChild) {document.body.appendChild(this.div)}
  302. else {document.body.insertBefore(this.div,document.body.firstChild)}
  303. return(this.parseDIV);
  304. },
  305. parserCreationError: function () {
  306. alert(_("CantCreateXMLParser",
  307. "MathJax can't create an XML parser for MathML. Check that\n"+
  308. "the 'Script ActiveX controls marked safe for scripting' security\n"+
  309. "setting is enabled (use the Internet Options item in the Tools\n"+
  310. "menu, and select the Security panel, then press the Custom Level\n"+
  311. "button to check this).\n\n"+
  312. "MathML equations will not be able to be processed by MathJax."));
  313. },
  314. //
  315. // Initialize the parser object (whichever type is used)
  316. //
  317. Startup: function () {
  318. MML = MathJax.ElementJax.mml;
  319. MML.mspace.Augment({mmlSelfClosing: true});
  320. MML.none.Augment({mmlSelfClosing: true});
  321. MML.mprescripts.Augment({mmlSelfClosing:true});
  322. }
  323. });
  324. //
  325. // Add the default pre-filter (for backward compatibility)
  326. //
  327. MATHML.prefilterHooks.Add(function (data) {
  328. data.math = (typeof(data.math) === "string" ?
  329. MATHML.prefilterMath(data.math,data.script) :
  330. MATHML.prefilterMathML(data.math,data.script));
  331. });
  332. MATHML.Parse.Entity = {
  333. ApplyFunction: '\u2061',
  334. Backslash: '\u2216',
  335. Because: '\u2235',
  336. Breve: '\u02D8',
  337. Cap: '\u22D2',
  338. CenterDot: '\u00B7',
  339. CircleDot: '\u2299',
  340. CircleMinus: '\u2296',
  341. CirclePlus: '\u2295',
  342. CircleTimes: '\u2297',
  343. Congruent: '\u2261',
  344. ContourIntegral: '\u222E',
  345. Coproduct: '\u2210',
  346. Cross: '\u2A2F',
  347. Cup: '\u22D3',
  348. CupCap: '\u224D',
  349. Dagger: '\u2021',
  350. Del: '\u2207',
  351. Delta: '\u0394',
  352. Diamond: '\u22C4',
  353. DifferentialD: '\u2146',
  354. DotEqual: '\u2250',
  355. DoubleDot: '\u00A8',
  356. DoubleRightTee: '\u22A8',
  357. DoubleVerticalBar: '\u2225',
  358. DownArrow: '\u2193',
  359. DownLeftVector: '\u21BD',
  360. DownRightVector: '\u21C1',
  361. DownTee: '\u22A4',
  362. Downarrow: '\u21D3',
  363. Element: '\u2208',
  364. EqualTilde: '\u2242',
  365. Equilibrium: '\u21CC',
  366. Exists: '\u2203',
  367. ExponentialE: '\u2147',
  368. FilledVerySmallSquare: '\u25AA',
  369. ForAll: '\u2200',
  370. Gamma: '\u0393',
  371. Gg: '\u22D9',
  372. GreaterEqual: '\u2265',
  373. GreaterEqualLess: '\u22DB',
  374. GreaterFullEqual: '\u2267',
  375. GreaterLess: '\u2277',
  376. GreaterSlantEqual: '\u2A7E',
  377. GreaterTilde: '\u2273',
  378. Hacek: '\u02C7',
  379. Hat: '\u005E',
  380. HumpDownHump: '\u224E',
  381. HumpEqual: '\u224F',
  382. Im: '\u2111',
  383. ImaginaryI: '\u2148',
  384. Integral: '\u222B',
  385. Intersection: '\u22C2',
  386. InvisibleComma: '\u2063',
  387. InvisibleTimes: '\u2062',
  388. Lambda: '\u039B',
  389. Larr: '\u219E',
  390. LeftAngleBracket: '\u27E8',
  391. LeftArrow: '\u2190',
  392. LeftArrowRightArrow: '\u21C6',
  393. LeftCeiling: '\u2308',
  394. LeftDownVector: '\u21C3',
  395. LeftFloor: '\u230A',
  396. LeftRightArrow: '\u2194',
  397. LeftTee: '\u22A3',
  398. LeftTriangle: '\u22B2',
  399. LeftTriangleEqual: '\u22B4',
  400. LeftUpVector: '\u21BF',
  401. LeftVector: '\u21BC',
  402. Leftarrow: '\u21D0',
  403. Leftrightarrow: '\u21D4',
  404. LessEqualGreater: '\u22DA',
  405. LessFullEqual: '\u2266',
  406. LessGreater: '\u2276',
  407. LessSlantEqual: '\u2A7D',
  408. LessTilde: '\u2272',
  409. Ll: '\u22D8',
  410. Lleftarrow: '\u21DA',
  411. LongLeftArrow: '\u27F5',
  412. LongLeftRightArrow: '\u27F7',
  413. LongRightArrow: '\u27F6',
  414. Longleftarrow: '\u27F8',
  415. Longleftrightarrow: '\u27FA',
  416. Longrightarrow: '\u27F9',
  417. Lsh: '\u21B0',
  418. MinusPlus: '\u2213',
  419. NestedGreaterGreater: '\u226B',
  420. NestedLessLess: '\u226A',
  421. NotDoubleVerticalBar: '\u2226',
  422. NotElement: '\u2209',
  423. NotEqual: '\u2260',
  424. NotExists: '\u2204',
  425. NotGreater: '\u226F',
  426. NotGreaterEqual: '\u2271',
  427. NotLeftTriangle: '\u22EA',
  428. NotLeftTriangleEqual: '\u22EC',
  429. NotLess: '\u226E',
  430. NotLessEqual: '\u2270',
  431. NotPrecedes: '\u2280',
  432. NotPrecedesSlantEqual: '\u22E0',
  433. NotRightTriangle: '\u22EB',
  434. NotRightTriangleEqual: '\u22ED',
  435. NotSubsetEqual: '\u2288',
  436. NotSucceeds: '\u2281',
  437. NotSucceedsSlantEqual: '\u22E1',
  438. NotSupersetEqual: '\u2289',
  439. NotTilde: '\u2241',
  440. NotVerticalBar: '\u2224',
  441. Omega: '\u03A9',
  442. OverBar: '\u203E',
  443. OverBrace: '\u23DE',
  444. PartialD: '\u2202',
  445. Phi: '\u03A6',
  446. Pi: '\u03A0',
  447. PlusMinus: '\u00B1',
  448. Precedes: '\u227A',
  449. PrecedesEqual: '\u2AAF',
  450. PrecedesSlantEqual: '\u227C',
  451. PrecedesTilde: '\u227E',
  452. Product: '\u220F',
  453. Proportional: '\u221D',
  454. Psi: '\u03A8',
  455. Rarr: '\u21A0',
  456. Re: '\u211C',
  457. ReverseEquilibrium: '\u21CB',
  458. RightAngleBracket: '\u27E9',
  459. RightArrow: '\u2192',
  460. RightArrowLeftArrow: '\u21C4',
  461. RightCeiling: '\u2309',
  462. RightDownVector: '\u21C2',
  463. RightFloor: '\u230B',
  464. RightTee: '\u22A2',
  465. RightTeeArrow: '\u21A6',
  466. RightTriangle: '\u22B3',
  467. RightTriangleEqual: '\u22B5',
  468. RightUpVector: '\u21BE',
  469. RightVector: '\u21C0',
  470. Rightarrow: '\u21D2',
  471. Rrightarrow: '\u21DB',
  472. Rsh: '\u21B1',
  473. Sigma: '\u03A3',
  474. SmallCircle: '\u2218',
  475. Sqrt: '\u221A',
  476. Square: '\u25A1',
  477. SquareIntersection: '\u2293',
  478. SquareSubset: '\u228F',
  479. SquareSubsetEqual: '\u2291',
  480. SquareSuperset: '\u2290',
  481. SquareSupersetEqual: '\u2292',
  482. SquareUnion: '\u2294',
  483. Star: '\u22C6',
  484. Subset: '\u22D0',
  485. SubsetEqual: '\u2286',
  486. Succeeds: '\u227B',
  487. SucceedsEqual: '\u2AB0',
  488. SucceedsSlantEqual: '\u227D',
  489. SucceedsTilde: '\u227F',
  490. SuchThat: '\u220B',
  491. Sum: '\u2211',
  492. Superset: '\u2283',
  493. SupersetEqual: '\u2287',
  494. Supset: '\u22D1',
  495. Therefore: '\u2234',
  496. Theta: '\u0398',
  497. Tilde: '\u223C',
  498. TildeEqual: '\u2243',
  499. TildeFullEqual: '\u2245',
  500. TildeTilde: '\u2248',
  501. UnderBar: '\u005F',
  502. UnderBrace: '\u23DF',
  503. Union: '\u22C3',
  504. UnionPlus: '\u228E',
  505. UpArrow: '\u2191',
  506. UpDownArrow: '\u2195',
  507. UpTee: '\u22A5',
  508. Uparrow: '\u21D1',
  509. Updownarrow: '\u21D5',
  510. Upsilon: '\u03A5',
  511. Vdash: '\u22A9',
  512. Vee: '\u22C1',
  513. VerticalBar: '\u2223',
  514. VerticalTilde: '\u2240',
  515. Vvdash: '\u22AA',
  516. Wedge: '\u22C0',
  517. Xi: '\u039E',
  518. acute: '\u00B4',
  519. aleph: '\u2135',
  520. alpha: '\u03B1',
  521. amalg: '\u2A3F',
  522. and: '\u2227',
  523. ang: '\u2220',
  524. angmsd: '\u2221',
  525. angsph: '\u2222',
  526. ape: '\u224A',
  527. backprime: '\u2035',
  528. backsim: '\u223D',
  529. backsimeq: '\u22CD',
  530. beta: '\u03B2',
  531. beth: '\u2136',
  532. between: '\u226C',
  533. bigcirc: '\u25EF',
  534. bigodot: '\u2A00',
  535. bigoplus: '\u2A01',
  536. bigotimes: '\u2A02',
  537. bigsqcup: '\u2A06',
  538. bigstar: '\u2605',
  539. bigtriangledown: '\u25BD',
  540. bigtriangleup: '\u25B3',
  541. biguplus: '\u2A04',
  542. blacklozenge: '\u29EB',
  543. blacktriangle: '\u25B4',
  544. blacktriangledown: '\u25BE',
  545. blacktriangleleft: '\u25C2',
  546. bowtie: '\u22C8',
  547. boxdl: '\u2510',
  548. boxdr: '\u250C',
  549. boxminus: '\u229F',
  550. boxplus: '\u229E',
  551. boxtimes: '\u22A0',
  552. boxul: '\u2518',
  553. boxur: '\u2514',
  554. bsol: '\u005C',
  555. bull: '\u2022',
  556. cap: '\u2229',
  557. check: '\u2713',
  558. chi: '\u03C7',
  559. circ: '\u02C6',
  560. circeq: '\u2257',
  561. circlearrowleft: '\u21BA',
  562. circlearrowright: '\u21BB',
  563. circledR: '\u00AE',
  564. circledS: '\u24C8',
  565. circledast: '\u229B',
  566. circledcirc: '\u229A',
  567. circleddash: '\u229D',
  568. clubs: '\u2663',
  569. colon: '\u003A',
  570. comp: '\u2201',
  571. ctdot: '\u22EF',
  572. cuepr: '\u22DE',
  573. cuesc: '\u22DF',
  574. cularr: '\u21B6',
  575. cup: '\u222A',
  576. curarr: '\u21B7',
  577. curlyvee: '\u22CE',
  578. curlywedge: '\u22CF',
  579. dagger: '\u2020',
  580. daleth: '\u2138',
  581. ddarr: '\u21CA',
  582. deg: '\u00B0',
  583. delta: '\u03B4',
  584. digamma: '\u03DD',
  585. div: '\u00F7',
  586. divideontimes: '\u22C7',
  587. dot: '\u02D9',
  588. doteqdot: '\u2251',
  589. dotplus: '\u2214',
  590. dotsquare: '\u22A1',
  591. dtdot: '\u22F1',
  592. ecir: '\u2256',
  593. efDot: '\u2252',
  594. egs: '\u2A96',
  595. ell: '\u2113',
  596. els: '\u2A95',
  597. empty: '\u2205',
  598. epsi: '\u03B5',
  599. epsiv: '\u03F5',
  600. erDot: '\u2253',
  601. eta: '\u03B7',
  602. eth: '\u00F0',
  603. flat: '\u266D',
  604. fork: '\u22D4',
  605. frown: '\u2322',
  606. gEl: '\u2A8C',
  607. gamma: '\u03B3',
  608. gap: '\u2A86',
  609. gimel: '\u2137',
  610. gnE: '\u2269',
  611. gnap: '\u2A8A',
  612. gne: '\u2A88',
  613. gnsim: '\u22E7',
  614. gt: '\u003E',
  615. gtdot: '\u22D7',
  616. harrw: '\u21AD',
  617. hbar: '\u210F',
  618. hellip: '\u2026',
  619. hookleftarrow: '\u21A9',
  620. hookrightarrow: '\u21AA',
  621. imath: '\u0131',
  622. infin: '\u221E',
  623. intcal: '\u22BA',
  624. iota: '\u03B9',
  625. jmath: '\u0237',
  626. kappa: '\u03BA',
  627. kappav: '\u03F0',
  628. lEg: '\u2A8B',
  629. lambda: '\u03BB',
  630. lap: '\u2A85',
  631. larrlp: '\u21AB',
  632. larrtl: '\u21A2',
  633. lbrace: '\u007B',
  634. lbrack: '\u005B',
  635. le: '\u2264',
  636. leftleftarrows: '\u21C7',
  637. leftthreetimes: '\u22CB',
  638. lessdot: '\u22D6',
  639. lmoust: '\u23B0',
  640. lnE: '\u2268',
  641. lnap: '\u2A89',
  642. lne: '\u2A87',
  643. lnsim: '\u22E6',
  644. longmapsto: '\u27FC',
  645. looparrowright: '\u21AC',
  646. lowast: '\u2217',
  647. loz: '\u25CA',
  648. lt: '\u003C',
  649. ltimes: '\u22C9',
  650. ltri: '\u25C3',
  651. macr: '\u00AF',
  652. malt: '\u2720',
  653. mho: '\u2127',
  654. mu: '\u03BC',
  655. multimap: '\u22B8',
  656. nLeftarrow: '\u21CD',
  657. nLeftrightarrow: '\u21CE',
  658. nRightarrow: '\u21CF',
  659. nVDash: '\u22AF',
  660. nVdash: '\u22AE',
  661. natur: '\u266E',
  662. nearr: '\u2197',
  663. nharr: '\u21AE',
  664. nlarr: '\u219A',
  665. not: '\u00AC',
  666. nrarr: '\u219B',
  667. nu: '\u03BD',
  668. nvDash: '\u22AD',
  669. nvdash: '\u22AC',
  670. nwarr: '\u2196',
  671. omega: '\u03C9',
  672. omicron: '\u03BF',
  673. or: '\u2228',
  674. osol: '\u2298',
  675. period: '\u002E',
  676. phi: '\u03C6',
  677. phiv: '\u03D5',
  678. pi: '\u03C0',
  679. piv: '\u03D6',
  680. prap: '\u2AB7',
  681. precnapprox: '\u2AB9',
  682. precneqq: '\u2AB5',
  683. precnsim: '\u22E8',
  684. prime: '\u2032',
  685. psi: '\u03C8',
  686. rarrtl: '\u21A3',
  687. rbrace: '\u007D',
  688. rbrack: '\u005D',
  689. rho: '\u03C1',
  690. rhov: '\u03F1',
  691. rightrightarrows: '\u21C9',
  692. rightthreetimes: '\u22CC',
  693. ring: '\u02DA',
  694. rmoust: '\u23B1',
  695. rtimes: '\u22CA',
  696. rtri: '\u25B9',
  697. scap: '\u2AB8',
  698. scnE: '\u2AB6',
  699. scnap: '\u2ABA',
  700. scnsim: '\u22E9',
  701. sdot: '\u22C5',
  702. searr: '\u2198',
  703. sect: '\u00A7',
  704. sharp: '\u266F',
  705. sigma: '\u03C3',
  706. sigmav: '\u03C2',
  707. simne: '\u2246',
  708. smile: '\u2323',
  709. spades: '\u2660',
  710. sub: '\u2282',
  711. subE: '\u2AC5',
  712. subnE: '\u2ACB',
  713. subne: '\u228A',
  714. supE: '\u2AC6',
  715. supnE: '\u2ACC',
  716. supne: '\u228B',
  717. swarr: '\u2199',
  718. tau: '\u03C4',
  719. theta: '\u03B8',
  720. thetav: '\u03D1',
  721. tilde: '\u02DC',
  722. times: '\u00D7',
  723. triangle: '\u25B5',
  724. triangleq: '\u225C',
  725. upsi: '\u03C5',
  726. upuparrows: '\u21C8',
  727. veebar: '\u22BB',
  728. vellip: '\u22EE',
  729. weierp: '\u2118',
  730. xi: '\u03BE',
  731. yen: '\u00A5',
  732. zeta: '\u03B6',
  733. zigrarr: '\u21DD'
  734. };
  735. MATHML.loadComplete("jax.js");
  736. })(MathJax.InputJax.MathML,MathJax.Hub.Browser);