Merge pull request #1166 from mathjax/hotfix-2.5.2

Merge v2.5.2 for release
This commit is contained in:
Peter Krautzberger 2015-04-29 16:26:46 +02:00
commit 9995bf3fda
31 changed files with 201 additions and 182 deletions

View File

@ -1,20 +1,19 @@
# Contributing to MathJax
So you're interested in giving us a hand? That's awesome! We've put
together some brief guidelines that should help you get started
quickly and easily.
You are interested in giving us a hand? That's awesome! We've put together some brief guidelines that should help you get started quickly and easily.
There are lots and lots of ways to get involved, this document covers:
* [raising issues](#raising-issues)
* [reporting an issue](#reporting-an-issue)
* [bug reports](#bug-reports)
* [feature requests](#feature-requests)
* [change requests](#change-requests)
* [working on MathJax core](#working-on-MathJax-core)
* [working on MathJax core](#working-on-mathjax-core)
* [key branches and tags](#key-branches--tags)
* [submitting pull requests](#submitting-pull-requests)
* [testing and quality assurance](#testing-and-quality-assurance)
* [writing documentation](#writing-documentation)
* [translation](#translation)
* [testing and quality assurance](#testing-and-quality-assurance)
* [writing documentation](#writing-documentation)
* [translation](#translation)
* [Conduct](#conduct)
@ -33,7 +32,7 @@ requests](#submitting-pull-requests), but please respect the following restricti
problem or requested your idea.
* Please **do not** use the issue tracker for personal support
requests (use [the MathJax User Group](https://groups.google.com/forum/#!forum/mathjax-users).
requests (use [the MathJax User Group](https://groups.google.com/forum/#!forum/mathjax-users)).
* Please **be civil**. Keep the discussion on topic and respect the
opinions of others. See also our [Conduct Guidelines](#conduct)
@ -48,21 +47,19 @@ Guidelines for bug reports:
1. **Use the GitHub issue search** — check if the issue has already been
reported.
2. **Check if the issue has been fixed** — try to reproduce it
using the latest `develop` or look for [closed issues in the
current milestone](https://github.com/MathJax/MathJax/issues?&page=1&state=closed).
2. **Check if the issue has been fixed** — look for [closed issues in the
current milestone](https://github.com/MathJax/MathJax/issues?&page=1&state=closed) or try to reproduce it
using the latest `develop` branch. Please note that we only pack MathJax for releases, so on the `develop` branch you have to use `/unpacked/MathJax.js` etc. to test.
3. **Isolate the problem** — ideally create a [reduced test
case](http://css-tricks.com/6263-reduced-test-cases/) and a live example.
3. **Share a live sample of the problem** — without a live page it is usually impossible to debug problems; see also the Bug Report Template below.
4. **Include a screencast if relevant** - Is your issue about a design
or front end feature or bug? The most helpful thing in the world is
if we can *see* what you're talking about. Use
[LICEcap](http://www.cockos.com/licecap/) to quickly and easily
record a short screencast (24fps) and save it as an animated gif!
Embed it directly into your GitHub issue. Kapow.
4. **Isolate the problem** — a live sample is a starting point but if you want to speed things up create a [reduced test
case](http://css-tricks.com/6263-reduced-test-cases/). Be specific about your setup (browser, OS versions etc). Use services like [jsbin](http://jsbin.com), [CodePen](http://codepen.io), [JSfiddle](http://jsfiddle.com) to make collaboration on minimal test cases easier for everyone. Use the unpacked copy of MathJax (`[...]/unpacked/MathJax.js` etc.) for better debugging.
5. Use the Bug Report template below or [click this
5. **Include a screenshot/cast as a last resort** — Is your issue about a layout
or design feature / bug but hard to reproduce or isolate? Then please provide a screenshot or screencast. Tools like [LICEcap](http://www.cockos.com/licecap/) or [SauceLabs](http://www.saucelabs.com) allow you to quickly and easily record a screencasts. Make it an animated gif, embed it directly into your GitHub issue -- kapow!
6. Use the Bug Report template below or [click this
link](https://github.com/MathJax/MathJax/issues/new?title=Bug%3A&body=%23%23%23%20Issue%20Summary%0A%0A%23%23%23%20Steps%20to%20Reproduce%0A%0A1.%20This%20is%20the%20first%20step%0A%0AThis%20is%20a%20bug%20because...%0A%0A%23%23%23%20Technical%20details%0A%0A*%20MathJax%20Version%3A%20master%20-%20latest%20commit%3A%20%20INSERT%20COMMIT%20REF%0A*%20Client%20OS%3A%20%0A*%20Browser%3A%20%0A*%20)
to start creating a bug report with the template automatically.
@ -132,12 +129,27 @@ a refactor, or an improvement to a feature, etc - please be sure to:
are suggesting better than what's already there? Does it fit with
the Roadmap?
## Working on MathJax core
You want to contribute code? Fantastic! Let's get you started.
### Key Branches & Tags
To get it out of the way:
- **[develop](https://github.com/MathJax/MathJax/tree/develop)** is
the development branch. All work on the next release happens here so
you should generally branch off `develop`. Do **NOT** use this branch
for a production site.
- **[master](https://github.com/MathJax/MathJax)** contains the latest
release of MathJax. This branch may be used in production. Do
**NOT** use this branch to work on MathJax's source.
### Submitting Pull Requests
Pull requests are awesome. If you're looking to raise a PR for
something which doesn't have an open issue, please think carefully
about [raising an issue](#raising-issues) which your PR can close,
about [raising an issue](#reporting-an-issue) which your PR can close,
especially if you're fixing a bug. This makes it more likely that
there will be enough information available for your PR to be properly
tested and merged.
@ -165,7 +177,7 @@ Documentation [in our testing
framework](https://github.com/MathJax/MathJax-testing).
Essentially though, [check out the latest develop
branch](#contribute-to-core), take it for a spin, and if you find
branch](#working-on-mathJax-core), take it for a spin, and if you find
anything odd, please follow the [bug report guidelines](#bug-reports)
and let us know!
@ -178,18 +190,16 @@ requests in the same way as branches:
<https://gist.github.com/piscisaureus/3342247>.
### Documentation
### Writing documentation
MathJax's main documentation can be found at [docs.mathjax.org](http://docs.mathjax.org).
The source of the docs is hosted in the
[mathjax/mathjax-docs](http://github.com/mathjax/mathjax-docs) repo here on GitHub.
The documentation is generated using
[Sphinx-doc](http://sphinx-doc.org/) and hosted on [Read the
docs](http://readthedocs.org). The source of the docs is hosted in the
[MathJax-Docs GitHub
repository](http://github.com/mathjax/mathjax-docs).
The documentation is generated using [Sphinx-doc](http://sphinx-doc.org/) and hosted on
[Read the docs](http://readthedocs.org).
You can clone the repo and submit pull requests following the
[pull-request](#pull-requests) guidelines.
[pull-request](#submitting-pull-requests) guidelines.
### Translation
@ -197,26 +207,14 @@ You can clone the repo and submit pull requests following the
If you wish to add or update translations of MathJax, please do it on
[TranslateWiki.net](https://translatewiki.net/w/i.php?title=Special:Translate&group=out-mathjax-0-all)
(and while you're there you can help other open source projects,
too!).
too, because you're awesome!).
For bug reports and other questions that don't fit on
TranslateWiki.net, head over to the
[mathjax/mathjax-i18n](https://github.com/mathjax/MathJax-i18n)
repository.
## Working on MathJax Core {core}
### Key Branches & Tags
- **[develop](https://github.com/MathJax/MathJax/tree/develop)** is
the development branch. All work on the next release is here. Do
**NOT** use this branch for a production site.
- **[master](https://github.com/MathJax/MathJax)** contains the latest
release of MathJax. This branch may be used in production.
# Conduct
## Conduct
We are committed to providing a friendly, safe and welcoming environment for
all, regardless of gender, sexual orientation, disability, ethnicity, religion,
@ -252,9 +250,9 @@ behaviour is not welcome.
We also suggest to read [discourse's
rules](http://blog.discourse.org/2013/03/the-universal-rules-of-civilized-discourse/)
### References
## References
* We heavily borrowed from -- thanks to Mozilla and Ghost!
* We heavily borrowed from Mozilla and Ghost -- thank you!
* https://github.com/TryGhost/Ghost/blob/master/CONTRIBUTING.md
* https://github.com/mozilla/rust/wiki/Note-development-policy
* https://github.com/jden/CONTRIBUTING.md/blob/master/CONTRIBUTING.md

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

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

@ -16,4 +16,4 @@
* limitations under the License.
*/
(function(a,d){var b=a.config.menuSettings;var c=MathJax.Extension["CHTML-preview"]={version:"2.5.0",config:a.CombineConfig("CHTML-preview",{Chunks:{EqnChunk:10000,EqnChunkFactor:1,EqnChunkDelay:0},color:"inherit!important",updateTime:30,updateDelay:6,messageStyle:"none",disabled:false}),Config:function(){a.Config({"HTML-CSS":this.config.Chunks,SVG:this.config.Chunks});MathJax.Ajax.Styles({".MathJax_Preview .MJXc-math":{color:this.config.color}});var j,g,h,e,i;var f=this.config;if(!f.disabled&&b.CHTMLpreview==null){a.Config({menuSettings:{CHTMLpreview:true}})}a.Register.MessageHook("Begin Math Output",function(){if(!e&&b.CHTMLpreview&&b.renderer!=="CommonHTML"){j=a.processUpdateTime;g=a.processUpdateDelay;h=a.config.messageStyle;a.processUpdateTime=f.updateTime;a.processUpdateDelay=f.updateDelay;a.Config({messageStyle:f.messageStyle});MathJax.Message.Clear(0,0);i=true}});a.Register.MessageHook("End Math Output",function(){if(!e&&i){a.processUpdateTime=j;a.processUpdateDelay=g;a.Config({messageStyle:h});e=true}})},Preview:function(e){if(!b.CHTMLpreview||b.renderer==="CommonHTML"){return}var f=e.script.MathJax.preview||e.script.previousSibling;if(!f||f.className!==MathJax.Hub.config.preRemoveClass){f=d.Element("span",{className:MathJax.Hub.config.preRemoveClass});e.script.parentNode.insertBefore(f,e.script);e.script.MathJax.preview=f}f.innerHTML="";f.style.color="inherit";return this.postFilter(f,e)},postFilter:function(g,f){if(!f.math.root.toCommonHTML){var e=MathJax.Callback.Queue();e.Push(["Require",MathJax.Ajax,"[MathJax]/jax/output/CommonHTML/config.js"],["Require",MathJax.Ajax,"[MathJax]/jax/output/CommonHTML/jax.js"]);a.RestartAfter(e.Push({}))}f.math.root.toCommonHTML(g)},Register:function(e){a.Register.StartupHook(e+" Jax Require",function(){var f=MathJax.InputJax[e];f.postfilterHooks.Add(["Preview",MathJax.Extension["CHTML-preview"]],50)})}};c.Register("TeX");c.Register("MathML");c.Register("AsciiMath");a.Register.StartupHook("End Config",["Config",c]);a.Startup.signal.Post("CHTML-preview Ready")})(MathJax.Hub,MathJax.HTML);MathJax.Ajax.loadComplete("[MathJax]/extensions/CHTML-preview.js");
(function(a,e,d){var b=a.config.menuSettings;var c=MathJax.Extension["CHTML-preview"]={version:"2.5.2",config:a.CombineConfig("CHTML-preview",{Chunks:{EqnChunk:10000,EqnChunkFactor:1,EqnChunkDelay:0},color:"inherit!important",updateTime:30,updateDelay:6,messageStyle:"none",disabled:d.isMSIE&&!d.versionAtLeast("8.0")}),Config:function(){a.Config({"HTML-CSS":this.config.Chunks,SVG:this.config.Chunks});MathJax.Ajax.Styles({".MathJax_Preview .MJXc-math":{color:this.config.color}});var k,h,i,f,j;var g=this.config;if(!g.disabled&&b.CHTMLpreview==null){a.Config({menuSettings:{CHTMLpreview:true}})}a.Register.MessageHook("Begin Math Output",function(){if(!f&&b.CHTMLpreview&&b.renderer!=="CommonHTML"){k=a.processUpdateTime;h=a.processUpdateDelay;i=a.config.messageStyle;a.processUpdateTime=g.updateTime;a.processUpdateDelay=g.updateDelay;a.Config({messageStyle:g.messageStyle});MathJax.Message.Clear(0,0);j=true}});a.Register.MessageHook("End Math Output",function(){if(!f&&j){a.processUpdateTime=k;a.processUpdateDelay=h;a.Config({messageStyle:i});f=true}})},Preview:function(f){if(!b.CHTMLpreview||b.renderer==="CommonHTML"){return}var g=f.script.MathJax.preview||f.script.previousSibling;if(!g||g.className!==MathJax.Hub.config.preRemoveClass){g=e.Element("span",{className:MathJax.Hub.config.preRemoveClass});f.script.parentNode.insertBefore(g,f.script);f.script.MathJax.preview=g}g.innerHTML="";g.style.color="inherit";return this.postFilter(g,f)},postFilter:function(h,g){if(!g.math.root.toCommonHTML){var f=MathJax.Callback.Queue();f.Push(["Require",MathJax.Ajax,"[MathJax]/jax/output/CommonHTML/config.js"],["Require",MathJax.Ajax,"[MathJax]/jax/output/CommonHTML/jax.js"]);a.RestartAfter(f.Push({}))}g.math.root.toCommonHTML(h)},Register:function(f){a.Register.StartupHook(f+" Jax Require",function(){var g=MathJax.InputJax[f];g.postfilterHooks.Add(["Preview",MathJax.Extension["CHTML-preview"]],50)})}};c.Register("TeX");c.Register("MathML");c.Register("AsciiMath");a.Register.StartupHook("End Config",["Config",c]);a.Startup.signal.Post("CHTML-preview Ready")})(MathJax.Hub,MathJax.HTML,MathJax.Hub.Browser);MathJax.Ajax.loadComplete("[MathJax]/extensions/CHTML-preview.js");

View File

@ -16,4 +16,4 @@
* limitations under the License.
*/
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c="2.5.0";var a=MathJax.ElementJax.mml;var d=MathJax.InputJax.TeX;var b=d.Definitions;b.Add({macros:{mathchoice:"MathChoice"}},null,true);d.Parse.Augment({MathChoice:function(f){var i=this.ParseArg(f),e=this.ParseArg(f),g=this.ParseArg(f),h=this.ParseArg(f);this.Push(a.TeXmathchoice(i,e,g,h))}});a.TeXmathchoice=a.mbase.Subclass({type:"TeXmathchoice",notParent:true,choice:function(g){var f=0,e=this.getValues("displaystyle","scriptlevel");if(e.scriptlevel>0){f=Math.min(3,e.scriptlevel+1)}else{f=(e.displaystyle?0:1)}return f},selected:function(){return this.data[this.choice()]},setTeXclass:function(e){return this.selected().setTeXclass(e)},isSpacelike:function(){return this.selected().isSpacelike()},isEmbellished:function(){return this.selected().isEmbellished()},Core:function(){return this.selected()},CoreMO:function(){return this.selected().CoreMO()},toHTML:function(e){e=this.HTMLcreateSpan(e);e.bbox=this.Core().toHTML(e).bbox;if(e.firstChild&&e.firstChild.style.marginLeft){e.style.marginLeft=e.firstChild.style.marginLeft;e.firstChild.style.marginLeft=""}return e},toSVG:function(){var e=this.Core().toSVG();this.SVGsaveData(e);return e},toCommonHTML:function(e){e=this.CHTMLcreateSpan(e);this.CHTMLhandleStyle(e);this.CHTMLhandleColor(e);this.CHTMLaddChild(e,this.choice(),{});return e}});MathJax.Hub.Startup.signal.Post("TeX mathchoice Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mathchoice.js");
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c="2.5.2";var a=MathJax.ElementJax.mml;var d=MathJax.InputJax.TeX;var b=d.Definitions;b.Add({macros:{mathchoice:"MathChoice"}},null,true);d.Parse.Augment({MathChoice:function(f){var i=this.ParseArg(f),e=this.ParseArg(f),g=this.ParseArg(f),h=this.ParseArg(f);this.Push(a.TeXmathchoice(i,e,g,h))}});a.TeXmathchoice=a.mbase.Subclass({type:"TeXmathchoice",notParent:true,choice:function(){if(this.selection!=null){return this.selection}if(this.choosing){return 2}this.choosing=true;var f=0,e=this.getValues("displaystyle","scriptlevel");if(e.scriptlevel>0){f=Math.min(3,e.scriptlevel+1)}else{f=(e.displaystyle?0:1)}var g=this.inherit;while(g&&g.type!=="math"){g=g.inherit}if(g){this.selection=f}this.choosing=false;return f},selected:function(){return this.data[this.choice()]},setTeXclass:function(e){return this.selected().setTeXclass(e)},isSpacelike:function(){return this.selected().isSpacelike()},isEmbellished:function(){return this.selected().isEmbellished()},Core:function(){return this.selected()},CoreMO:function(){return this.selected().CoreMO()},toHTML:function(e){e=this.HTMLcreateSpan(e);e.bbox=this.Core().toHTML(e).bbox;if(e.firstChild&&e.firstChild.style.marginLeft){e.style.marginLeft=e.firstChild.style.marginLeft;e.firstChild.style.marginLeft=""}return e},toSVG:function(){var e=this.Core().toSVG();this.SVGsaveData(e);return e},toCommonHTML:function(e){e=this.CHTMLcreateSpan(e);this.CHTMLhandleStyle(e);this.CHTMLhandleColor(e);this.CHTMLaddChild(e,this.choice(),{});return e}});MathJax.Hub.Startup.signal.Post("TeX mathchoice Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mathchoice.js");

View File

@ -16,4 +16,4 @@
* limitations under the License.
*/
MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.5.0",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-"+String(a).replace(/[:"'<>&]/g,"")},formatURL:function(a){return"#"+escape(a)},useLabelIds:true}}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js");
MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.5.2",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-"+String(a).replace(/[:"'<>&]/g,"")},formatURL:function(a){return"#"+escape(a)},useLabelIds:true}}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js");

File diff suppressed because one or more lines are too long

View File

@ -16,4 +16,4 @@
* limitations under the License.
*/
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var c="2.5.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a["annotation-xml"].Augment({toHTML:function(f){f=this.HTMLhandleSize(this.HTMLcreateSpan(f));var g=this.Get("encoding");for(var e=0,d=this.data.length;e<d;e++){this.data[e].toHTML(f,g)}this.HTMLhandleSpace(f);this.HTMLhandleColor(f);return f},HTMLgetScale:function(){return this.SUPER(arguments).HTMLgetScale.call(this)/b.scale}});a.xml.Augment({toHTML:function(f,g){for(var e=0,d=this.data.length;e<d;e++){f.appendChild(this.data[e].cloneNode(true))}f.bbox.w=b.getW(f);f.bbox.rw=f.bbox.w;var h=b.getHD(f);f.bbox.h=h.h;f.bbox.d=h.d}});MathJax.Hub.Startup.signal.Post("HTML-CSS annotation-xml Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/annotation-xml.js")});
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var c="2.5.2";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a["annotation-xml"].Augment({toHTML:function(f){f=this.HTMLhandleSize(this.HTMLcreateSpan(f));var g=this.Get("encoding");for(var e=0,d=this.data.length;e<d;e++){this.data[e].toHTML(f,g)}this.HTMLhandleSpace(f);this.HTMLhandleColor(f);return f},HTMLgetScale:function(){return this.SUPER(arguments).HTMLgetScale.call(this)/b.scale}});a.xml.Augment({toHTML:function(f,g){for(var e=0,d=this.data.length;e<d;e++){f.appendChild(this.data[e].cloneNode(true))}var j=f.bbox;f.bbox=null;j.rw=j.w=b.getW(f);var h=b.getHD(f);j.h=h.h;j.d=h.d;f.bbox=j}});MathJax.Hub.Startup.signal.Post("HTML-CSS annotation-xml Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/annotation-xml.js")});

View File

@ -16,4 +16,4 @@
* limitations under the License.
*/
MathJax.OutputJax["HTML-CSS"]=MathJax.OutputJax({id:"HTML-CSS",version:"2.5.1",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:{noReflows:true,matchFontHeight:true,scale:100,minScaleAdjust:50,availableFonts:["STIX","TeX"],preferredFont:"TeX",webFont:"TeX",imageFont:"TeX",undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",mtextFontInherit:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,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-style":"normal","font-size":"90%"},".MathJax .MJX-monospace":{"font-family":"monospace"},".MathJax .MJX-sans-serif":{"font-family":"sans-serif"},"#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","z-index":401}}}});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(["MathJaxNotSupported","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:"2.5.2",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:{noReflows:true,matchFontHeight:true,scale:100,minScaleAdjust:50,availableFonts:["STIX","TeX"],preferredFont:"TeX",webFont:"TeX",imageFont:"TeX",undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",mtextFontInherit:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,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-style":"normal","font-size":"90%"},".MathJax .MJX-monospace":{"font-family":"monospace"},".MathJax .MJX-sans-serif":{"font-family":"sans-serif"},"#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","z-index":401}}}});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(["MathJaxNotSupported","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");

File diff suppressed because one or more lines are too long

View File

@ -45,9 +45,9 @@ if (window.MathJax) {window.MathJax = {AuthorConfig: window.MathJax}}
// MathJax.isPacked = true; // This line is uncommented by the packer.
MathJax.version = "2.5.1";
MathJax.fileversion = "2.5.1";
MathJax.cdnVersion = "2.5.1"; // specifies a revision to break caching
MathJax.version = "2.5.2";
MathJax.fileversion = "2.5.2";
MathJax.cdnVersion = "2.5.2"; // specifies a revision to break caching
MathJax.cdnFileVersions = {}; // can be used to specify revisions for individual files
/**********************************************************/

View File

@ -26,12 +26,12 @@
* limitations under the License.
*/
(function (HUB,HTML) {
(function (HUB,HTML,BROWSER) {
var SETTINGS = HUB.config.menuSettings;
var CHTMLpreview = MathJax.Extension["CHTML-preview"] = {
version: "2.5.0",
version: "2.5.2",
//
// Configuration for the chunking of the main output
@ -42,7 +42,7 @@
color: "inherit!important",
updateTime: 30, updateDelay: 6,
messageStyle: "none",
disabled: false
disabled: BROWSER.isMSIE && !BROWSER.versionAtLeast("8.0")
}),
//
@ -133,7 +133,7 @@
HUB.Startup.signal.Post("CHTML-preview Ready");
})(MathJax.Hub,MathJax.HTML);
})(MathJax.Hub,MathJax.HTML,MathJax.Hub.Browser);
MathJax.Ajax.loadComplete("[MathJax]/extensions/CHTML-preview.js");

View File

@ -25,7 +25,7 @@
*/
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var VERSION = "2.5.0";
var VERSION = "2.5.2";
var MML = MathJax.ElementJax.mml;
var TEX = MathJax.InputJax.TeX;
@ -45,10 +45,17 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
MML.TeXmathchoice = MML.mbase.Subclass({
type: "TeXmathchoice", notParent: true,
choice: function (nocache) {
choice: function () {
if (this.selection != null) return this.selection;
if (this.choosing) return 2; // prevent infinite loops: see issue #1151
this.choosing = true;
var selection = 0, values = this.getValues("displaystyle","scriptlevel");
if (values.scriptlevel > 0) {selection = Math.min(3,values.scriptlevel+1)}
else {selection = (values.displaystyle ? 0 : 1)}
// only cache the result if we are actually in place in a <math> tag.
var node = this.inherit; while (node && node.type !== "math") node = node.inherit;
if (node) this.selection = selection;
this.choosing = false;
return selection;
},
selected: function () {return this.data[this.choice()]},

View File

@ -27,7 +27,7 @@
MathJax.InputJax.TeX = MathJax.InputJax({
id: "TeX",
version: "2.5.0",
version: "2.5.2",
directory: MathJax.InputJax.directory + "/TeX",
extensionDir: MathJax.InputJax.extensionDir + "/TeX",

View File

@ -1679,7 +1679,7 @@
}
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.Push.apply(this,this.InternalMath(text,0));
this.i = i;
}
}
@ -2014,49 +2014,51 @@
/*
* Break up a string into text and math blocks
* @@@ FIXME: skip over braced groups? @@@
* @@@ FIXME: pass environment to TEX.Parse? @@@
*/
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(/\\?[${}\\]|\\\(|\\(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)));
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 === '\\') {
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)));
var def = (this.stack.env.font ? {mathvariant: this.stack.env.font} : {});
var mml = [], i = 0, k = 0, c, match = '';
if (text.match(/\\?[${}\\]|\\\(|\\(eq)?ref\s*\{/)) {
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)));
match = ''; k = i;
} else if (c.match(/[${}\\]/) && match === '') {
i--; text = text.substr(0,i-1) + text.substr(i); // remove \ from \$, \{, \}, or \\
} 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 === '\\') {
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;
} else if (c.match(/[${}\\]/) && match === '') {
i--; text = text.substr(0,i-1) + text.substr(i); // remove \ from \$, \{, \}, or \\
}
}
}
}
if (match !== '') TEX.Error(["MathNotTerminated","Math not terminated in text box"]);
}
if (k < text.length) mml.push(this.InternalText(text.slice(k),def));
if (level != null) {
mml = [MML.mstyle.apply(MML,mml).With({displaystyle:false,scriptlevel:level})];
} else if (mml.length > 1) {
mml = [MML.mrow.apply(MML,mml)];
}
if (match !== '')
{TEX.Error(["MathNotTerminated","Math not terminated in text box"])}
if (k < text.length) {mml.push(this.InternalText(text.slice(k),def))}
return mml;
},
InternalText: function (text,def) {

View File

@ -25,7 +25,7 @@
*/
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
var VERSION = "2.5.0";
var VERSION = "2.5.2";
var MML = MathJax.ElementJax.mml,
HTMLCSS = MathJax.OutputJax["HTML-CSS"];
@ -48,9 +48,11 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
toHTML: function (span,encoding) {
for (var i = 0, m = this.data.length; i < m; i++)
{span.appendChild(this.data[i].cloneNode(true))}
span.bbox.w = HTMLCSS.getW(span); span.bbox.rw = span.bbox.w;
var bbox = span.bbox; span.bbox = null;
bbox.rw = bbox.w = HTMLCSS.getW(span);
var HD = HTMLCSS.getHD(span);
span.bbox.h = HD.h; span.bbox.d = HD.d;
bbox.h = HD.h; bbox.d = HD.d;
span.bbox = bbox;
}
});

View File

@ -27,7 +27,7 @@
MathJax.OutputJax["HTML-CSS"] = MathJax.OutputJax({
id: "HTML-CSS",
version: "2.5.1",
version: "2.5.2",
directory: MathJax.OutputJax.directory + "/HTML-CSS",
extensionDir: MathJax.OutputJax.extensionDir + "/HTML-CSS",
autoloadDir: MathJax.OutputJax.directory + "/HTML-CSS/autoload",

View File

@ -726,7 +726,18 @@
postTranslate: function (state,partial) {
var scripts = state.jax[this.id], script, jax, i, m;
//
// Merasure the math in this chunk (toHTML phase II)
// Remove the processed markers so that measuring can occur,
// and remove the preview, if any, since the math will now be visible.
//
for (i = state.HTMLCSSlast, m = state.HTMLCSSeqn; i < m; i++) {
script = scripts[i];
if (script && script.MathJax.elementJax) {
script.previousSibling.className = script.previousSibling.className.split(/ /)[0];
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
}
}
//
// Measure the math in this chunk (toHTML phase II)
//
for (i = state.HTMLCSSlast, m = state.HTMLCSSeqn; i < m; i++) {
script = scripts[i];
@ -752,14 +763,6 @@
//
script.MathJax.state = jax.STATE.PROCESSED;
HUB.signal.Post(["New Math",script.MathJax.elementJax.inputID]); // FIXME: wait for this? (i.e., restart if returns uncalled callback)
//
// Remove the processed marker
//
script.previousSibling.className = script.previousSibling.className.split(/ /)[0];
//
// Remove the preview, if any
//
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
}
}
if (this.forceReflow) {
@ -876,8 +879,8 @@
delete jax.HTMLCSS;
},
getHD: function (span) {
if (span.bbox && this.config.noReflows) {return {h:span.bbox.h, d:span.bbox.d}}
getHD: function (span,force) {
if (span.bbox && this.config.noReflows && !force) {return {h:span.bbox.h, d:span.bbox.d}}
var position = span.style.position;
span.style.position = "absolute";
this.HDimg.style.height = "0px";
@ -1093,7 +1096,7 @@
createSpace: function (span,h,d,w,color,isSpace) {
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,true).d-d)}
if (span.isBox || isSpace) {
var scale = (span.scale == null ? 1 : span.scale);
span.bbox = {exactW: true, h: h*scale, d: d*scale, w: w*scale, rw: w*scale, lw: 0};
@ -1804,7 +1807,7 @@
if (bbox.width) {BBOX.width = bbox.width; BBOX.minWidth = bbox.minWidth}
if (bbox.tw) {BBOX.tw = bbox.tw}
if (bbox.ic) {BBOX.ic = bbox.ic} else {delete BBOX.ic}
if (BBOX.exactW && !bbox.exactW) {delete BBOX.exactW}
if (BBOX.exactW && !bbox.exactW) {BBOX.exactW = bbox.exactW}
},
HTMLemptyBBox: function (BBOX) {
BBOX.h = BBOX.d = BBOX.H = BBOX.D = BBOX.rw = -HTMLCSS.BIGDIMEN;
@ -2857,15 +2860,11 @@
// problem in strict HTML mode
stack.style.fontSize = nobr.parentNode.style.fontSize; nobr.parentNode.style.fontSize = "";
if (this.data[0] != null) {
if (HTMLCSS.msieColorBug) {
if (this.background) {this.data[0].background = this.background; delete this.background}
if (this.mathbackground) {this.data[0].mathbackground = this.mathbackground; delete this.mathbackground}
}
MML.mbase.prototype.displayAlign = HUB.config.displayAlign;
MML.mbase.prototype.displayIndent = HUB.config.displayIndent;
if (String(HUB.config.displayIndent).match(/^0($|[a-z%])/i))
MML.mbase.prototype.displayIndent = "0";
html = this.data[0].toHTML(box); html.bbox.exactW = true; // force remeasure just to be sure
html = this.data[0].toHTML(box); html.bbox.exactW = false; // force remeasure just to be sure
}
} else {
span = span.firstChild.firstChild;
@ -2939,12 +2938,23 @@
//
// Move the background color, of any
//
if (color) {
color.style.marginLeft = HTMLCSS.Em(parseFloat(color.style.marginLeft)+shift);
color.style.marginRight =
HTMLCSS.Em(parseFloat(color.style.marginRight)-shift
+ (values.indentalign === "right" ? Math.min(0,span.bbox.w+shift) - span.bbox.w : 0));
}
if (color) {
var L = parseFloat(color.style.marginLeft||"0")+shift,
R = parseFloat(color.style.marginRight||"0")-shift;
color.style.marginLeft = HTMLCSS.Em(L);
color.style.marginRight =
HTMLCSS.Em(R + (values.indentalign === "right" ?
Math.min(0,span.bbox.w+shift) - span.bbox.w : 0));
if (HTMLCSS.msieColorBug && values.indentalign === "right") {
if (parseFloat(color.style.marginLeft) > 0) {
var padding = MathJax.HTML.addElement(color.parentNode,"span");
padding.style.marginLeft = HTMLCSS.Em(R+Math.min(0,span.bbox.w+shift));
color.nextSibling.style.marginRight = "0em";
}
color.nextSibling.style.marginLeft = "0em";
color.style.marginRight = color.style.marginLeft = "0em";
}
}
}
}
}
@ -3017,7 +3027,7 @@
HTMLCSS.Augment({
PaddingWidthBug: true,
msieAccentBug: true,
msieColorBug: true,
msieColorBug: (mode < 8), // negative margin-right doesn't work to position color
msieColorPositionBug: true, // needs position:relative to put color behind text
msieRelativeWidthBug: quirks,
msieDisappearingBug: (mode >= 8), // inline math disappears