summaryrefslogtreecommitdiff
path: root/backend/epub/MathJax/jax/output/SVG/autoload
diff options
context:
space:
mode:
authormonsta <[email protected]>2015-09-10 14:08:14 +0300
committermonsta <[email protected]>2015-09-10 14:08:14 +0300
commitd2f1cf64a6c026e79955966b85f9141e69a3404a (patch)
treed752108fd6b6c9a018b7dfef56777a65f4d5d5eb /backend/epub/MathJax/jax/output/SVG/autoload
parentfeb98c4c3e21e34b1aeffc287531ff97a9d0616c (diff)
downloadatril-d2f1cf64a6c026e79955966b85f9141e69a3404a.tar.bz2
atril-d2f1cf64a6c026e79955966b85f9141e69a3404a.tar.xz
epub: drop embedded MathJax in favor of using distro-packaged one
closes https://github.com/mate-desktop/atril/issues/158
Diffstat (limited to 'backend/epub/MathJax/jax/output/SVG/autoload')
-rw-r--r--backend/epub/MathJax/jax/output/SVG/autoload/Makefile.am14
-rw-r--r--backend/epub/MathJax/jax/output/SVG/autoload/annotation-xml.js19
-rw-r--r--backend/epub/MathJax/jax/output/SVG/autoload/maction.js19
-rw-r--r--backend/epub/MathJax/jax/output/SVG/autoload/menclose.js19
-rw-r--r--backend/epub/MathJax/jax/output/SVG/autoload/mglyph.js19
-rw-r--r--backend/epub/MathJax/jax/output/SVG/autoload/mmultiscripts.js19
-rw-r--r--backend/epub/MathJax/jax/output/SVG/autoload/ms.js19
-rw-r--r--backend/epub/MathJax/jax/output/SVG/autoload/mtable.js19
-rw-r--r--backend/epub/MathJax/jax/output/SVG/autoload/multiline.js19
9 files changed, 0 insertions, 166 deletions
diff --git a/backend/epub/MathJax/jax/output/SVG/autoload/Makefile.am b/backend/epub/MathJax/jax/output/SVG/autoload/Makefile.am
deleted file mode 100644
index ec0794af..00000000
--- a/backend/epub/MathJax/jax/output/SVG/autoload/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-MathJaxSVGautoOutputJaxdir= $(backenddir)/epub/MathJax/jax/output/SVG/autoload
-
-MathJaxSVGautoOutputJax_DATA= annotation-xml.js \
- maction.js \
- menclose.js \
- mglyph.js \
- mmultiscripts.js \
- ms.js \
- mtable.js \
- multiline.js
-
-EXTRA_DIST = $(MathJaxSVGautoOutputJax_DATA)
-
--include $(top_srcdir)/git.mk
diff --git a/backend/epub/MathJax/jax/output/SVG/autoload/annotation-xml.js b/backend/epub/MathJax/jax/output/SVG/autoload/annotation-xml.js
deleted file mode 100644
index 78c787df..00000000
--- a/backend/epub/MathJax/jax/output/SVG/autoload/annotation-xml.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * /MathJax/jax/output/SVG/autoload/annotation-xml.js
- *
- * Copyright (c) 2009-2014 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var c="2.4.0";var a=MathJax.ElementJax.mml,d=MathJax.OutputJax.SVG;var b=d.BBOX;b.FOREIGN=b.Subclass({type:"foreignObject",removeable:false});a["annotation-xml"].Augment({toSVG:function(){var f=this.SVG();this.SVGhandleSpace(f);var h=this.Get("encoding");for(var g=0,e=this.data.length;g<e;g++){f.Add(this.data[g].toSVG(h),f.w,0)}f.Clean();this.SVGhandleColor(f);this.SVGsaveData(f);return f}});a.xml.Augment({toSVG:function(e){var p=d.textSVG.parentNode;d.mathDiv.style.width="auto";p.insertBefore(this.div,d.textSVG);var q=this.div.offsetWidth,k=this.div.offsetHeight;var o=MathJax.HTML.addElement(this.div,"span",{style:{display:"inline-block",overflow:"hidden",height:k+"px",width:"1px",marginRight:"-1px"}});var n=this.div.offsetHeight-k;k-=n;this.div.removeChild(o);p.removeChild(this.div);d.mathDiv.style.width="";var g=1000/d.em;var l=b.FOREIGN({y:(-k)+"px",width:q+"px",height:(k+n)+"px",transform:"scale("+g+") matrix(1 0 0 -1 0 0)"});for(var j=0,f=this.data.length;j<f;j++){l.element.appendChild(this.data[j].cloneNode(true))}l.w=q*g;l.h=k*g;l.d=n*g;l.r=l.w;l.l=0;l.Clean();this.SVGsaveData(l);return l}});MathJax.Hub.Startup.signal.Post("SVG annotation-xml Ready");MathJax.Ajax.loadComplete(d.autoloadDir+"/annotation-xml.js")});
diff --git a/backend/epub/MathJax/jax/output/SVG/autoload/maction.js b/backend/epub/MathJax/jax/output/SVG/autoload/maction.js
deleted file mode 100644
index c0633257..00000000
--- a/backend/epub/MathJax/jax/output/SVG/autoload/maction.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * /MathJax/jax/output/SVG/autoload/maction.js
- *
- * Copyright (c) 2009-2014 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var f="2.4.0";var c=MathJax.ElementJax.mml,g=MathJax.OutputJax.SVG;var d,e,b;var a=g.config.tooltip=MathJax.Hub.Insert({delayPost:600,delayClear:600,offsetX:10,offsetY:5},g.config.tooltip||{});c.maction.Augment({SVGtooltip:MathJax.HTML.addElement(document.body,"div",{id:"MathJax_SVG_Tooltip"}),toSVG:function(h,k){this.SVGgetStyles();var i=this.SVG();var j=this.selected();if(j.type=="null"){this.SVGsaveData(i);return i}i.Add(this.SVGdataStretched(this.Get("selection")-1,h,k));this.SVGhandleHitBox(i);this.SVGhandleSpace(i);this.SVGhandleColor(i);this.SVGsaveData(i);return i},SVGhandleHitBox:function(h){var j=g.addElement(h.element,"rect",{width:h.w,height:h.h+h.d,y:-h.d,fill:"none","pointer-events":"all"});var i=this.Get("actiontype");if(this.SVGaction[i]){this.SVGaction[i].call(this,h,j,this.Get("selection"))}},SVGstretchH:c.mbase.prototype.SVGstretchH,SVGstretchV:c.mbase.prototype.SVGstretchV,SVGaction:{toggle:function(h,j,i){this.selection=i;g.Element(j,{cursor:"pointer"});j.onclick=MathJax.Callback(["SVGclick",this])},statusline:function(h,j,i){j.onmouseover=MathJax.Callback(["SVGsetStatus",this]),j.onmouseout=MathJax.Callback(["SVGclearStatus",this]);j.onmouseover.autoReset=j.onmouseout.autoReset=true},tooltip:function(h,j,i){j.onmouseover=MathJax.Callback(["SVGtooltipOver",this]),j.onmouseout=MathJax.Callback(["SVGtooltipOut",this]);j.onmouseover.autoReset=j.onmouseout.autoReset=true}},SVGclick:function(j){this.selection++;if(this.selection>this.data.length){this.selection=1}var i=this;while(i.type!=="math"){i=i.inherit}var h=MathJax.Hub.getJaxFor(i.inputID);h.Update();return MathJax.Extension.MathEvents.Event.False(j)},SVGsetStatus:function(h){this.messageID=MathJax.Message.Set((this.data[1]&&this.data[1].isToken)?this.data[1].data.join(""):this.data[1].toString())},SVGclearStatus:function(h){if(this.messageID){MathJax.Message.Clear(this.messageID,0)}delete this.messageID},SVGtooltipOver:function(i){if(!i){i=window.event}if(b){clearTimeout(b);b=null}if(e){clearTimeout(e)}var h=i.pageX;var k=i.pageY;if(h==null){h=i.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;k=i.clientY+document.body.scrollTop+document.documentElement.scrollTop}var j=MathJax.Callback(["SVGtooltipPost",this,h+a.offsetX,k+a.offsetY]);e=setTimeout(j,a.delayPost)},SVGtooltipOut:function(h){if(e){clearTimeout(e);e=null}if(b){clearTimeout(b)}var i=MathJax.Callback(["SVGtooltipClear",this,80]);b=setTimeout(i,a.delayClear)},SVGtooltipPost:function(h,o){e=null;if(b){clearTimeout(b);b=null}var n=this.SVGtooltip;n.style.display="block";n.style.opacity="";if(this===d){return}n.style.left=h+"px";n.style.top=o+"px";n.innerHTML="";var k=MathJax.HTML.addElement(n,"span");var m=this;while(m.type!=="math"){m=m.inherit}var i=MathJax.Hub.getJaxFor(m.inputID);this.em=c.mbase.prototype.em=i.SVG.em;this.ex=i.SVG.ex;this.linebreakWidth=i.SVG.lineWidth*1000;this.cwidth=i.SVG.cwidth;var j=this.data[1];m=c.math(j);try{m.toSVG(k,n)}catch(l){this.SetData(1,j);n.style.display="none";if(!l.restart){throw l}MathJax.Callback.After(["SVGtooltipPost",this,h,o],l.restart);return}this.SetData(1,j);d=this},SVGtooltipClear:function(i){var h=this.SVGtooltip;if(i<=0){h.style.display="none";h.style.opacity="";b=null}else{h.style.opacity=i/100;b=setTimeout(MathJax.Callback(["SVGtooltipClear",this,i-20]),50)}}});MathJax.Hub.Startup.signal.Post("SVG maction Ready");MathJax.Ajax.loadComplete(g.autoloadDir+"/maction.js")});
diff --git a/backend/epub/MathJax/jax/output/SVG/autoload/menclose.js b/backend/epub/MathJax/jax/output/SVG/autoload/menclose.js
deleted file mode 100644
index 5e8d819f..00000000
--- a/backend/epub/MathJax/jax/output/SVG/autoload/menclose.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * /MathJax/jax/output/SVG/autoload/menclose.js
- *
- * Copyright (c) 2009-2014 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var c="2.4.0";var a=MathJax.ElementJax.mml,d=MathJax.OutputJax.SVG,b=d.BBOX;b.ELLIPSE=b.Subclass({type:"ellipse",removeable:false,Init:function(i,k,e,g,f,j){if(j==null){j={}}j.fill="none";if(f){j.stroke=f}j["stroke-width"]=g.toFixed(2).replace(/\.?0+$/,"");j.cx=Math.floor(e/2);j.cy=Math.floor((i+k)/2-k);j.rx=Math.floor((e-g)/2);j.ry=Math.floor((i+k-g)/2);this.SUPER(arguments).Init.call(this,j);this.w=this.r=e;this.h=this.H=i;this.d=this.D=k;this.l=0}});b.DLINE=b.Subclass({type:"line",removeable:false,Init:function(i,l,e,g,f,j,k){if(k==null){k={}}k.fill="none";if(f){k.stroke=f}k["stroke-width"]=g.toFixed(2).replace(/\.?0+$/,"");if(j=="up"){k.x1=Math.floor(g/2);k.y1=Math.floor(g/2-l);k.x2=Math.floor(e-g/2);k.y2=Math.floor(i-g/2)}else{k.x1=Math.floor(g/2);k.y1=Math.floor(i-g/2);k.x2=Math.floor(e-g/2);k.y2=Math.floor(g/2-l)}this.SUPER(arguments).Init.call(this,k);this.w=this.r=e;this.h=this.H=i;this.d=this.D=l;this.l=0}});b.FPOLY=b.Subclass({type:"polygon",removeable:false,Init:function(p,g,e){if(e==null){e={}}if(g){e.fill=g}var j=[],o=100000000,n=o,r=-o,q=r;for(var h=0,f=p.length;h<f;h++){var l=p[h][0],k=p[h][1];if(l>r){r=l}if(l<o){o=l}if(k>q){q=k}if(k<n){n=k}j.push(Math.floor(l)+","+Math.floor(k))}e.points=j.join(" ");this.SUPER(arguments).Init.call(this,e);this.w=this.r=r;this.h=this.H=q;this.d=this.D=-n;this.l=-o}});b.PPATH=b.Subclass({type:"path",removeable:false,Init:function(i,l,e,k,g,f,j){if(j==null){j={}}j.fill="none";if(f){j.stroke=f}j["stroke-width"]=g.toFixed(2).replace(/\.?0+$/,"");j.d=k;this.SUPER(arguments).Init.call(this,j);this.w=this.r=e;this.h=this.H=i+l;this.d=this.D=this.l=0;this.y=-l}});a.menclose.Augment({toSVG:function(G,K){this.SVGgetStyles();var B=this.SVG(),P=this.SVGgetScale(B);this.SVGhandleSpace(B);var r=this.SVGdataStretched(0,G,K);var g=this.getValues("notation","thickness","padding","mathcolor","color");if(g.color&&!this.mathcolor){g.mathcolor=g.color}if(g.thickness==null){g.thickness=".075em"}if(g.padding==null){g.padding=".2em"}var C=this.SVGgetMu(B);var E=d.length2em(g.padding,C,1/d.em)*P;var z=d.length2em(g.thickness,C,1/d.em);z=Math.max(1/d.em,z);var u=r.h+E+z,A=r.d+E+z,k=r.w+2*(E+z);var y=0,v,M,L,I,q=[false,false,false,false];if(!g.mathcolor){g.mathcolor="black"}var j=MathJax.Hub.SplitList(g.notation),o={};for(L=0,I=j.length;L<I;L++){o[j[L]]=true}if(o[a.NOTATION.UPDIAGONALARROW]){o[a.NOTATION.UPDIAGONALSTRIKE]=false}for(var F in o){if(!o.hasOwnProperty(F)||!o[F]){continue}switch(F){case a.NOTATION.BOX:q=[true,true,true,true];break;case a.NOTATION.ROUNDEDBOX:B.Add(b.FRAME(u,A,k,z,"solid",g.mathcolor,{rx:Math.floor(Math.min(u+A-z,k-z)/4)}));break;case a.NOTATION.CIRCLE:B.Add(b.ELLIPSE(u,A,k,z,g.mathcolor));break;case a.NOTATION.ACTUARIAL:q[0]=true;case a.NOTATION.RIGHT:q[1]=true;break;case a.NOTATION.LEFT:q[3]=true;break;case a.NOTATION.TOP:q[0]=true;break;case a.NOTATION.BOTTOM:q[2]=true;break;case a.NOTATION.VERTICALSTRIKE:B.Add(b.VLINE(u+A,z,"solid",g.mathcolor),(k-z)/2,-A);break;case a.NOTATION.HORIZONTALSTRIKE:B.Add(b.HLINE(k,z,"solid",g.mathcolor),0,(u+A-z)/2-A);break;case a.NOTATION.UPDIAGONALSTRIKE:B.Add(b.DLINE(u,A,k,z,g.mathcolor,"up"));break;case a.NOTATION.UPDIAGONALARROW:var J=Math.sqrt(k*k+(u+A)*(u+A)),N=1/J*10/d.em*z/0.075;v=k*N;M=(u+A)*N;var s=0.4*M;B.Add(b.DLINE(u-0.5*M,A,k-0.5*v,z,g.mathcolor,"up"));B.Add(b.FPOLY([[s+v,M],[s-0.4*M,0.4*v],[s+0.3*v,0.3*M],[s+0.4*M,-0.4*v],[s+v,M]],g.mathcolor),k-v-s,u-M);break;case a.NOTATION.DOWNDIAGONALSTRIKE:B.Add(b.DLINE(u,A,k,z,g.mathcolor,"down"));break;case a.NOTATION.PHASORANGLE:q[2]=true;k-=2*E;E=(u+A)/2;k+=E;B.Add(b.DLINE(u,A,E,z,g.mathcolor,"up"));break;case a.NOTATION.MADRUWB:q[1]=q[2]=true;break;case a.NOTATION.RADICAL:B.Add(b.PPATH(u,A,k,"M "+this.SVGxy(z/2,0.4*(u+A))+" L "+this.SVGxy(E,z/2)+" L "+this.SVGxy(2*E,u+A-z/2)+" L "+this.SVGxy(k,u+A-z/2),z,g.mathcolor),0,z);y=E;break;case a.NOTATION.LONGDIV:B.Add(b.PPATH(u,A,k,"M "+this.SVGxy(z/2,z/2)+" a "+this.SVGxy(E,(u+A)/2-2*z)+" 0 0,1 "+this.SVGxy(z/2,u+A-z)+" L "+this.SVGxy(k,u+A-z/2),z,g.mathcolor),0,z/2);y=E;break}}var O=[["H",k,0,u-z],["V",u+A,k-z,-A],["H",k,0,-A],["V",u+A,0,-A]];for(L=0;L<4;L++){if(q[L]){var e=O[L];B.Add(b[e[0]+"LINE"](e[1],z,"solid",g.mathcolor),e[2],e[3])}}B.Add(r,y+E+z,0,false,true);B.Clean();this.SVGhandleSpace(B);this.SVGhandleColor(B);this.SVGsaveData(B);return B},SVGxy:function(e,f){return Math.floor(e)+","+Math.floor(f)}});MathJax.Hub.Startup.signal.Post("SVG menclose Ready");MathJax.Ajax.loadComplete(d.autoloadDir+"/menclose.js")});
diff --git a/backend/epub/MathJax/jax/output/SVG/autoload/mglyph.js b/backend/epub/MathJax/jax/output/SVG/autoload/mglyph.js
deleted file mode 100644
index 7012677c..00000000
--- a/backend/epub/MathJax/jax/output/SVG/autoload/mglyph.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * /MathJax/jax/output/SVG/autoload/mglyph.js
- *
- * Copyright (c) 2009-2014 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var d="2.4.0";var a=MathJax.ElementJax.mml,f=MathJax.OutputJax.SVG,b=f.BBOX,e=MathJax.Localization;var c="http://www.w3.org/1999/xlink";b.MGLYPH=b.Subclass({type:"image",removeable:false,Init:function(j,o,k,l,r,g){if(g==null){g={}}var i=j.width*1000/f.em,p=j.height*1000/f.em;var q=i,n=p,m=0;if(o!==""){i=f.length2em(o,r,q);p=(q?i/q*n:0)}if(k!==""){p=f.length2em(k,r,n);if(o===""){i=(n?p/n*q:0)}}if(l!==""&&l.match(/\d/)){m=f.length2em(l,r);g.y=-m}g.height=Math.floor(p);g.width=Math.floor(i);g.transform="translate(0,"+p+") matrix(1 0 0 -1 0 0)";g.preserveAspectRatio="none";this.SUPER(arguments).Init.call(this,g);this.element.setAttributeNS(c,"href",j.src);this.w=this.r=i;this.h=this.H=p+m;this.d=this.D=-m;this.l=0}});a.mglyph.Augment({toSVG:function(k,n){this.SVGgetStyles();var j=this.SVG(),i,l;this.SVGhandleSpace(j);var h=this.getValues("src","width","height","valign","alt");if(h.src===""){h=this.getValues("index","fontfamily");if(h.index){if(!n){n=this.SVGgetScale()}var m={};if(h.fontfamily){m["font-family"]=h.fontfamily}j.Add(b.TEXT(n,String.fromCharCode(h.index),m))}}else{if(!this.img){this.img=a.mglyph.GLYPH[h.src]}if(!this.img){this.img=a.mglyph.GLYPH[h.src]={img:new Image(),status:"pending"};i=this.img.img;i.onload=MathJax.Callback(["SVGimgLoaded",this]);i.onerror=MathJax.Callback(["SVGimgError",this]);i.src=h.src;MathJax.Hub.RestartAfter(i.onload)}if(this.img.status!=="OK"){l=a.Error(e._(["MathML","BadMglyph"],"Bad mglyph: %1",h.src),{mathsize:"75%"});this.Append(l);j=l.toSVG();this.data.pop()}else{var g=this.SVGgetMu(j);j.Add(b.MGLYPH(this.img.img,h.width,h.height,h.valign,g,{src:h.src,alt:h.alt,title:h.alt}))}}j.Clean();this.SVGhandleColor(j);this.SVGsaveData(j);return j},SVGimgLoaded:function(h,g){if(typeof(h)==="string"){g=h}this.img.status=(g||"OK")},SVGimgError:function(){this.img.img.onload("error")}},{GLYPH:{}});MathJax.Hub.Startup.signal.Post("SVG mglyph Ready");MathJax.Ajax.loadComplete(f.autoloadDir+"/mglyph.js")});
diff --git a/backend/epub/MathJax/jax/output/SVG/autoload/mmultiscripts.js b/backend/epub/MathJax/jax/output/SVG/autoload/mmultiscripts.js
deleted file mode 100644
index 84876562..00000000
--- a/backend/epub/MathJax/jax/output/SVG/autoload/mmultiscripts.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * /MathJax/jax/output/SVG/autoload/mmultiscripts.js
- *
- * Copyright (c) 2009-2014 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var b="2.4.0";var a=MathJax.ElementJax.mml,c=MathJax.OutputJax.SVG;a.mmultiscripts.Augment({toSVG:function(G,z){this.SVGgetStyles();var B=this.SVG(),N=this.SVGgetScale(B);this.SVGhandleSpace(B);var j=(this.data[this.base]?this.SVGdataStretched(this.base,G,z):c.BBOX.G().Clean());var K=c.TeX.x_height*N,y=c.TeX.scriptspace*N*0.75;var x=this.SVGgetScripts(y);var k=x[0],e=x[1],n=x[2],i=x[3];var g=(this.data[1]||this).SVGgetScale();var C=c.TeX.sup_drop*g,A=c.TeX.sub_drop*g;var o=j.h-C,m=j.d+A,L=0,F;if(j.ic){L=j.ic}if(this.data[this.base]&&(this.data[this.base].type==="mi"||this.data[this.base].type==="mo")){if(this.data[this.base].data.join("").length===1&&j.scale===1&&!j.stretched&&!this.data[this.base].Get("largeop")){o=m=0}}var H=this.getValues("subscriptshift","superscriptshift"),E=this.SVGgetMu(B);H.subscriptshift=(H.subscriptshift===""?0:c.length2em(H.subscriptshift,E));H.superscriptshift=(H.superscriptshift===""?0:c.length2em(H.superscriptshift,E));var l=0;if(n){l=n.w+L}else{if(i){l=i.w-L}}B.Add(j,Math.max(0,l),0);if(!e&&!i){m=Math.max(m,c.TeX.sub1*N,H.subscriptshift);if(k){m=Math.max(m,k.h-(4/5)*K)}if(n){m=Math.max(m,n.h-(4/5)*K)}if(k){B.Add(k,l+j.w+y-L,-m)}if(n){B.Add(n,0,-m)}}else{if(!k&&!n){var f=this.getValues("displaystyle","texprimestyle");F=c.TeX[(f.displaystyle?"sup1":(f.texprimestyle?"sup3":"sup2"))];o=Math.max(o,F*N,H.superscriptshift);if(e){o=Math.max(o,e.d+(1/4)*K)}if(i){o=Math.max(o,i.d+(1/4)*K)}if(e){B.Add(e,l+j.w+y,o)}if(i){B.Add(i,0,o)}}else{m=Math.max(m,c.TeX.sub2*N);var w=c.TeX.rule_thickness*N;var I=(k||n).h,J=(e||i).d;if(n){I=Math.max(I,n.h)}if(i){J=Math.max(J,i.d)}if((o-J)-(I-m)<3*w){m=3*w-o+J+I;C=(4/5)*K-(o-J);if(C>0){o+=C;m-=C}}o=Math.max(o,H.superscriptshift);m=Math.max(m,H.subscriptshift);if(e){B.Add(e,l+j.w+y,o)}if(i){B.Add(i,l+L-i.w,o)}if(k){B.Add(k,l+j.w+y-L,-m)}if(n){B.Add(n,l-n.w,-m)}}}B.Clean();this.SVGhandleColor(B);this.SVGsaveData(B);var M=this.SVGdata;M.dx=l;M.s=y;M.u=o,M.v=m;M.delta=L;return B},SVGgetScripts:function(p){var o,d,e=[];var n=1,g=this.data.length,f=0;for(var h=0;h<4;h+=2){while(n<g&&this.data[n].type!=="mprescripts"){for(var l=h;l<h+2;l++){if(this.data[n]&&this.data[n].type!=="none"){if(!e[l]){e[l]=c.BBOX.G()}e[l].Add(this.data[n].toSVG().With({x:f}))}n++}d=e[h]||{w:0};o=e[h+1]||{w:0};d.w=o.w=f=Math.max(d.w,o.w)}n++;f=0}for(l=0;l<4;l++){if(e[l]){e[l].w+=p;e[l].Clean()}}return e}});MathJax.Hub.Startup.signal.Post("SVG mmultiscripts Ready");MathJax.Ajax.loadComplete(c.autoloadDir+"/mmultiscripts.js")});
diff --git a/backend/epub/MathJax/jax/output/SVG/autoload/ms.js b/backend/epub/MathJax/jax/output/SVG/autoload/ms.js
deleted file mode 100644
index 38dbb947..00000000
--- a/backend/epub/MathJax/jax/output/SVG/autoload/ms.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * /MathJax/jax/output/SVG/autoload/ms.js
- *
- * Copyright (c) 2009-2014 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var b="2.4.0";var a=MathJax.ElementJax.mml,c=MathJax.OutputJax.SVG;a.ms.Augment({toSVG:function(){this.SVGgetStyles();var e=this.SVG();this.SVGhandleSpace(e);var d=this.getValues("lquote","rquote");var f=this.SVGgetVariant(),h=this.SVGgetScale();var g=this.data.join("");e.Add(this.SVGhandleVariant(f,h,d.lquote+g+d.rquote));e.Clean();this.SVGhandleColor(e);this.SVGsaveData(e);return e}});a.ms.prototype.defaults.mathvariant="monospace";MathJax.Hub.Startup.signal.Post("SVG ms Ready");MathJax.Ajax.loadComplete(c.autoloadDir+"/ms.js")});
diff --git a/backend/epub/MathJax/jax/output/SVG/autoload/mtable.js b/backend/epub/MathJax/jax/output/SVG/autoload/mtable.js
deleted file mode 100644
index b40ac5d7..00000000
--- a/backend/epub/MathJax/jax/output/SVG/autoload/mtable.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * /MathJax/jax/output/SVG/autoload/mtable.js
- *
- * Copyright (c) 2009-2014 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var c="2.4.0";var a=MathJax.ElementJax.mml,d=MathJax.OutputJax.SVG,b=d.BBOX;a.mtable.Augment({toSVG:function(V){this.SVGgetStyles();var l=this.SVG(),al=this.SVGgetScale(l);if(this.data.length===0){this.SVGsaveData(l);return l}var aI=this.getValues("columnalign","rowalign","columnspacing","rowspacing","columnwidth","equalcolumns","equalrows","columnlines","rowlines","frame","framespacing","align","useHeight","width","side","minlabelspacing");if(aI.width.match(/%$/)){l.width=aI.width=Math.floor(d.cwidth*parseFloat(aI.width)/100)+"px"}var t=this.SVGgetMu(l);var aF=-1;var v=[],E=[],h=[],L=[],G=[],aD,aC,u=-1,aA,r,av,O,aj,z,aw;var Z=d.FONTDATA.lineH*al*aI.useHeight,ad=d.FONTDATA.lineD*al*aI.useHeight;for(aD=0,aA=this.data.length;aD<aA;aD++){O=this.data[aD];av=(O.type==="mlabeledtr"?aF:0);L[aD]=[];v[aD]=Z;E[aD]=ad;for(aC=av,r=O.data.length+av;aC<r;aC++){if(h[aC]==null){if(aC>u){u=aC}G[aC]=b.G();h[aC]=-d.BIGDIMEN}aj=O.data[aC-av];L[aD][aC]=aj.toSVG();if(aj.isEmbellished()){z=aj.CoreMO();var aH=z.Get("minsize",true);if(aH){if(z.SVGcanStretch("Vertical")){aw=z.SVGdata.h+z.SVGdata.d;if(aw){aH=d.length2em(aH,t,aw);if(aH*z.SVGdata.h/aw>v[aD]){v[aD]=aH*z.SVGdata.h/aw}if(aH*z.SVGdata.d/aw>E[aD]){E[aD]=aH*z.SVGdata.d/aw}}}else{if(z.SVGcanStretch("Horizontal")){aH=d.length2em(aH,t,z.SVGdata.w);if(aH>h[aC]){h[aC]=aH}}}}}if(L[aD][aC].h>v[aD]){v[aD]=L[aD][aC].h}if(L[aD][aC].d>E[aD]){E[aD]=L[aD][aC].d}if(L[aD][aC].w>h[aC]){h[aC]=L[aD][aC].w}}}var ak=MathJax.Hub.SplitList;var ai=ak(aI.columnspacing),Q=ak(aI.rowspacing),af=ak(aI.columnalign),I=ak(aI.rowalign),K=ak(aI.columnlines),g=ak(aI.rowlines),an=ak(aI.columnwidth),ar=[];for(aD=0,aA=ai.length;aD<aA;aD++){ai[aD]=d.length2em(ai[aD],t)}for(aD=0,aA=Q.length;aD<aA;aD++){Q[aD]=d.length2em(Q[aD],t)}while(ai.length<u){ai.push(ai[ai.length-1])}while(af.length<=u){af.push(af[af.length-1])}while(K.length<u){K.push(K[K.length-1])}while(an.length<=u){an.push(an[an.length-1])}while(Q.length<L.length){Q.push(Q[Q.length-1])}while(I.length<=L.length){I.push(I[I.length-1])}while(g.length<L.length){g.push(g[g.length-1])}if(G[aF]){af[aF]=(aI.side.substr(0,1)==="l"?"left":"right");ai[aF]=-h[aF]}for(aD=0,aA=L.length;aD<aA;aD++){O=this.data[aD];ar[aD]=[];if(O.rowalign){I[aD]=O.rowalign}if(O.columnalign){ar[aD]=ak(O.columnalign);while(ar[aD].length<=u){ar[aD].push(ar[aD][ar[aD].length-1])}}}if(aI.equalrows){var R=Math.max.apply(Math,v),am=Math.max.apply(Math,E);for(aD=0,aA=L.length;aD<aA;aD++){av=((R+am)-(v[aD]+E[aD]))/2;v[aD]+=av;E[aD]+=av}}aw=v[0]+E[L.length-1];for(aD=0,aA=L.length-1;aD<aA;aD++){aw+=Math.max(0,E[aD]+v[aD+1]+Q[aD])}var ab=0,X=0,ax,aG=aw;if(aI.frame!=="none"||(aI.columnlines+aI.rowlines).match(/solid|dashed/)){var q=ak(aI.framespacing);if(q.length!=2){q=ak(this.defaults.framespacing)}ab=d.length2em(q[0],t);X=d.length2em(q[1],t);aG=aw+2*X}var e,au,az="";if(typeof(aI.align)!=="string"){aI.align=String(aI.align)}if(aI.align.match(/(top|bottom|center|baseline|axis)( +(-?\d+))?/)){az=RegExp.$3;aI.align=RegExp.$1}else{aI.align=this.defaults.align}if(az!==""){az=parseInt(az);if(az<0){az=L.length+1+az}if(az<1){az=1}else{if(az>L.length){az=L.length}}e=0;au=-(aw+X)+v[0];for(aD=0,aA=az-1;aD<aA;aD++){var U=Math.max(0,E[aD]+v[aD+1]+Q[aD]);e+=U;au+=U}}else{e=({top:-(v[0]+X),bottom:aw+X-v[0],center:aw/2-v[0],baseline:aw/2-v[0],axis:aw/2+d.TeX.axis_height*al-v[0]})[aI.align];au=({top:-(aw+2*X),bottom:0,center:-(aw/2+X),baseline:-(aw/2+X),axis:d.TeX.axis_height*al-aw/2-X})[aI.align]}var ao,at=0,S=0,T=0,ay=0,aE=0,o=[],w=[],ag=1;if(aI.equalcolumns&&aI.width!=="auto"){ao=d.length2em(aI.width,t);for(aD=0,aA=Math.min(u+1,ai.length);aD<aA;aD++){ao-=ai[aD]}ao/=u+1;for(aD=0,aA=Math.min(u+1,an.length);aD<aA;aD++){h[aD]=ao}}else{for(aD=0,aA=Math.min(u+1,an.length);aD<aA;aD++){if(an[aD]==="auto"){S+=h[aD]}else{if(an[aD]==="fit"){w[aE]=aD;aE++;S+=h[aD]}else{if(an[aD].match(/%$/)){o[ay]=aD;ay++;T+=h[aD];at+=d.length2em(an[aD],t,1)}else{h[aD]=d.length2em(an[aD],t);S+=h[aD]}}}}if(aI.width==="auto"){if(at>0.98){ag=T/(S+T);ao=S+T}else{ao=S/(1-at)}}else{ao=d.length2em(aI.width,t);for(aD=0,aA=Math.min(u+1,ai.length);aD<aA;aD++){ao-=ai[aD]}}for(aD=0,aA=o.length;aD<aA;aD++){h[o[aD]]=d.length2em(an[o[aD]],t,ao*ag);S+=h[o[aD]]}if(Math.abs(ao-S)>0.01){if(aE&&ao>S){ao=(ao-S)/aE;for(aD=0,aA=w.length;aD<aA;aD++){h[w[aD]]+=ao}}else{ao=ao/S;for(aC=0;aC<=u;aC++){h[aC]*=ao}}}if(aI.equalcolumns){var ac=Math.max.apply(Math,h);for(aC=0;aC<=u;aC++){h[aC]=ac}}}var ap=e,k,aB;av=(G[aF]?aF:0);for(aC=av;aC<=u;aC++){G[aC].w=h[aC];for(aD=0,aA=L.length;aD<aA;aD++){if(L[aD][aC]){av=(this.data[aD].type==="mlabeledtr"?aF:0);aj=this.data[aD].data[aC-av];if(aj.SVGcanStretch("Horizontal")){L[aD][aC]=aj.SVGstretchH(h[aC])}else{if(aj.SVGcanStretch("Vertical")){z=aj.CoreMO();var aa=z.symmetric;z.symmetric=false;L[aD][aC]=aj.SVGstretchV(v[aD],E[aD]);z.symmetric=aa}}aB=aj.rowalign||this.data[aD].rowalign||I[aD];k=({top:v[aD]-L[aD][aC].h,bottom:L[aD][aC].d-E[aD],center:((v[aD]-E[aD])-(L[aD][aC].h-L[aD][aC].d))/2,baseline:0,axis:0})[aB]||0;aB=(aj.columnalign||ar[aD][aC]||af[aC]);G[aC].Align(L[aD][aC],aB,0,ap+k)}if(aD<L.length-1){ap-=Math.max(0,E[aD]+v[aD+1]+Q[aD])}}ap=e}var ae=1.5*d.em;var aq=ab-ae/2;for(aC=0;aC<=u;aC++){l.Add(G[aC],aq,0);aq+=h[aC]+ai[aC];if(K[aC]!=="none"&&aC<u&&aC!==aF){l.Add(b.VLINE(aG,ae,K[aC]),aq-ai[aC]/2,au)}}l.w+=ab;l.d=-au;l.h=aG+au;ax=l.w;if(aI.frame!=="none"){l.Add(b.HLINE(ax,ae,aI.frame),0,au+aG-ae);l.Add(b.HLINE(ax,ae,aI.frame),0,au);l.Add(b.VLINE(aG,ae,aI.frame),0,au);l.Add(b.VLINE(aG,ae,aI.frame),ax-ae,au)}ap=e-ae/2;for(aD=0,aA=L.length-1;aD<aA;aD++){k=Math.max(0,E[aD]+v[aD+1]+Q[aD]);if(g[aD]!=="none"){l.Add(b.HLINE(ax,ae,g[aD]),0,ap-E[aD]-(k-E[aD]-v[aD+1])/2)}ap-=k}l.Clean();this.SVGhandleSpace(l);this.SVGhandleColor(l);if(G[aF]){var N=this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");if(N.indentalignfirst!==a.INDENTALIGN.INDENTALIGN){N.indentalign=N.indentalignfirst}if(N.indentalign===a.INDENTALIGN.AUTO){N.indentalign=this.displayAlign}if(N.indentshiftfirst!==a.INDENTSHIFT.INDENTSHIFT){N.indentshift=N.indentshiftfirst}if(N.indentshift==="auto"){N.indentshift=this.displayIndent}var ah=(N.indentshift?d.length2em(N.indentshift,t):0);var aJ=d.length2em(aI.minlabelspacing,t);var B=l;l=this.SVG();if(N.indentalign===a.INDENTALIGN.CENTER){l.w=l.r=d.length2em(d.cwidth+"px");ah=0;l.hasIndent=true}else{if(af[aF]!==N.indentalign){l.w=l.r=d.length2em(d.cwidth+"px")-ah-aJ;ah=aJ=0}else{l.w=l.r=B.w+ah;l.hasIndent=true}}l.Align(B,N.indentalign,ah,0);l.Align(G[aF],af[aF],aJ,0)}this.SVGsaveData(l);return l},SVGhandleSpace:function(e){if(!this.hasFrame&&!e.width){e.x=e.X=167}this.SUPER(arguments).SVGhandleSpace.call(this,e)}});a.mtd.Augment({toSVG:function(e,g){var f=this.svg=this.SVG();if(this.data[0]){f.Add(this.SVGdataStretched(0,e,g));f.Clean()}this.SVGhandleColor(f);this.SVGsaveData(f);return f}});MathJax.Hub.Startup.signal.Post("SVG mtable Ready");MathJax.Ajax.loadComplete(d.autoloadDir+"/mtable.js")});
diff --git a/backend/epub/MathJax/jax/output/SVG/autoload/multiline.js b/backend/epub/MathJax/jax/output/SVG/autoload/multiline.js
deleted file mode 100644
index 1bb16c57..00000000
--- a/backend/epub/MathJax/jax/output/SVG/autoload/multiline.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * /MathJax/jax/output/SVG/autoload/multiline.js
- *
- * Copyright (c) 2009-2014 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var d="2.4.0";var a=MathJax.ElementJax.mml,f=MathJax.OutputJax.SVG,b=f.BBOX;var e={newline:0,nobreak:1000000,goodbreak:[-200],badbreak:[+200],auto:[0],toobig:800,nestfactor:400,spacefactor:-100,spaceoffset:2,spacelimit:1,fence:500,close:500};var c={linebreakstyle:"after"};a.mrow.Augment({SVGmultiline:function(k){var o=this;while(o.inferred||(o.parent&&o.parent.type==="mrow"&&o.parent.data.length===1)){o=o.parent}var n=((o.type==="math"&&o.Get("display")==="block")||o.type==="mtd");o.isMultiline=true;var p=this.getValues("linebreak","linebreakstyle","lineleading","linebreakmultchar","indentalign","indentshift","indentalignfirst","indentshiftfirst","indentalignlast","indentshiftlast");if(p.linebreakstyle===a.LINEBREAKSTYLE.INFIXLINEBREAKSTYLE){p.linebreakstyle=this.Get("infixlinebreakstyle")}p.lineleading=f.length2em(p.lineleading,1,0.5);k=this.SVG();if(n&&o.type!=="mtd"){if(f.linebreakWidth<f.BIGDIMEN){k.w=f.linebreakWidth}else{k.w=f.cwidth/f.em*1000}}var g={n:0,Y:0,scale:this.scale||1,isTop:n,values:{},VALUES:p},m=this.SVGgetAlign(g,{}),i=this.SVGgetShift(g,{},m),h=[],j={index:[],penalty:e.nobreak,w:0,W:i,shift:i,scanW:i,nest:0},l=false;while(this.SVGbetterBreak(j,g)&&(j.scanW>=f.linebreakWidth||j.penalty===e.newline)){this.SVGaddLine(k,h,j.index,g,j.values,l);h=j.index.slice(0);l=true;m=this.SVGgetAlign(g,j.values);i=this.SVGgetShift(g,j.values,m);if(m===a.INDENTALIGN.CENTER){i=0}j.W=j.shift=j.scanW=i;j.penalty=e.nobreak}g.isLast=true;this.SVGaddLine(k,h,[],g,c,l);this.SVGhandleSpace(k);this.SVGhandleColor(k);k.isMultiline=true;this.SVGsaveData(k);return k}});a.mbase.Augment({SVGlinebreakPenalty:e,SVGbetterBreak:function(j,g){if(this.isToken){return false}if(this.isEmbellished()){j.embellished=this;return this.CoreMO().SVGbetterBreak(j,g)}if(this.linebreakContainer){return false}var q=j.index.slice(0),o=j.index.shift(),n=this.data.length,l,r,k,p=(j.index.length>0),h=false;if(o==null){o=-1}if(!p){o++;j.W+=j.w;j.w=0}k=j.scanW=j.W;j.nest++;while(o<n&&j.scanW<1.33*f.linebreakWidth){if(this.data[o]){if(this.data[o].SVGbetterBreak(j,g)){h=true;q=[o].concat(j.index);l=j.W;r=j.w;if(j.penalty===e.newline){j.index=q;if(j.nest){j.nest--}return true}}k=(p?j.scanW:this.SVGaddWidth(o,j,k))}j.index=[];o++;p=false}if(j.nest){j.nest--}j.index=q;if(h){j.W=l}return h},SVGaddWidth:function(h,k,j){if(this.data[h]){var g=this.data[h].SVGdata;j+=g.w+g.x;if(g.X){j+=g.X}k.W=k.scanW=j;k.w=0}return j},SVGaddLine:function(l,h,k,g,p,n){var q=b();g.first=n;g.last=true;this.SVGmoveLine(h,k,q,g,p);q.Clean();var o=this.SVGgetAlign(g,p),i=this.SVGgetShift(g,p,o);if(i){if(o===a.INDENTALIGN.LEFT){q.x=i}else{if(o===a.INDENTALIGN.RIGHT){q.w+=i;q.r=q.w}}}if(g.n>0){var m=f.FONTDATA.baselineskip*g.scale;var j=(g.values.lineleading==null?g.VALUES:g.values).lineleading*g.scale;g.Y-=Math.max(m,g.d+q.h+j)}l.Align(q,o,0,g.Y);g.d=q.d;g.values=p;g.n++},SVGgetAlign:function(j,g){var k=g,h=j.values,i=j.VALUES,l;if(j.n===0){l=k.indentalignfirst||h.indentalignfirst||i.indentalignfirst}else{if(j.isLast){l=h.indentalignlast||i.indentalignlast}else{l=h.indentalign||i.indentalign}}if(l===a.INDENTALIGN.INDENTALIGN){l=h.indentalign||i.indentalign}if(l===a.INDENTALIGN.AUTO){l=(j.isTop?this.displayAlign:a.INDENTALIGN.LEFT)}return l},SVGgetShift:function(k,h,m){if(m===a.INDENTALIGN.CENTER){return 0}var l=h,i=k.values,j=k.VALUES,g;if(k.n===0){g=l.indentshiftfirst||i.indentshiftfirst||j.indentshiftfirst}else{if(k.isLast){g=i.indentshiftlast||j.indentshiftlast}else{g=i.indentshift||j.indentshift}}if(g===a.INDENTSHIFT.INDENTSHIFT){g=i.indentshift||j.indentshift}if(g==="auto"||g===""){g=(k.isTSop?this.displayIndent:"0")}return f.length2em(g,0)},SVGmoveLine:function(p,g,k,o,h){var m=p[0],l=g[0];if(m==null){m=-1}if(l==null){l=this.data.length-1}if(m===l&&p.length>1){this.data[m].SVGmoveSlice(p.slice(1),g.slice(1),k,o,h,"paddingLeft")}else{var n=o.last;o.last=false;while(m<l){if(this.data[m]){if(p.length<=1){this.data[m].SVGmove(k,o,h)}else{this.data[m].SVGmoveSlice(p.slice(1),[],k,o,h,"paddingLeft")}}m++;o.first=false;p=[]}o.last=n;if(this.data[m]){if(g.length<=1){this.data[m].SVGmove(k,o,h)}else{this.data[m].SVGmoveSlice([],g.slice(1),k,o,h,"paddingRight")}}}},SVGmoveSlice:function(m,g,i,j,h,k){var l=b();this.SVGmoveLine(m,g,l,j,h);l.Clean();this.SVGhandleColor(l);i.Add(l,i.w,0,true);return l},SVGmove:function(g,j,i){if(!(j.first||j.last)||(j.first&&j.values.linebreakstyle===a.LINEBREAKSTYLE.BEFORE)||(j.last&&i.linebreakstyle===a.LINEBREAKSTYLE.AFTER)){var h=this.toSVG(this.SVGdata.HW,this.SVGdata.D);if(j.first||j.nextIsFirst){h.x=0}if(j.last&&h.X){h.X=0}g.Add(h,g.w,0,true)}if(j.first&&h&&h.w===0){j.nextIsFirst=true}else{delete j.nextIsFirst}}});a.mfenced.Augment({SVGbetterBreak:function(l,g){var u=l.index.slice(0),s=l.index.shift(),p=this.data.length,o,v,n,t=(l.index.length>0),h=false;if(s==null){s=-1}if(!t){s++;l.W+=l.w;l.w=0}n=l.scanW=l.W;l.nest++;if(!this.dataI){this.dataI=[];if(this.data.open){this.dataI.push("open")}if(p){this.dataI.push(0)}for(var r=1;r<p;r++){if(this.data["sep"+r]){this.dataI.push("sep"+r)}this.dataI.push(r)}if(this.data.close){this.dataI.push("close")}}p=this.dataI.length;while(s<p&&l.scanW<1.33*f.linebreakWidth){var q=this.dataI[s];if(this.data[q]){if(this.data[q].SVGbetterBreak(l,g)){h=true;u=[s].concat(l.index);o=l.W;v=l.w;if(l.penalty===e.newline){l.index=u;if(l.nest){l.nest--}return true}}n=(t?l.scanW:this.SVGaddWidth(s,l,n))}l.index=[];s++;t=false}if(l.nest){l.nest--}l.index=u;if(h){l.W=o;l.w=v}return h},SVGmoveLine:function(h,m,p,g,r){var o=h[0],n=m[0];if(o==null){o=-1}if(n==null){n=this.dataI.length-1}if(o===n&&h.length>1){this.data[this.dataI[o]].SVGmoveSlice(h.slice(1),m.slice(1),p,g,r,"paddingLeft")}else{var q=g.last;g.last=false;var l=this.dataI[o];while(o<n){if(this.data[l]){if(h.length<=1){this.data[l].SVGmove(p,g,r)}else{this.data[l].SVGmoveSlice(h.slice(1),[],p,g,r,"paddingLeft")}}o++;l=this.dataI[o];g.first=false;h=[]}g.last=q;if(this.data[l]){if(m.length<=1){this.data[l].SVGmove(p,g,r)}else{this.data[l].SVGmoveSlice([],m.slice(1),p,g,r,"paddingRight")}}}}});a.msubsup.Augment({SVGbetterBreak:function(j,g){if(!this.data[this.base]){return false}var o=j.index.slice(0),m=j.index.shift(),l,p,k,n=(j.index.length>0),h=false;if(!n){j.W+=j.w;j.w=0}k=j.scanW=j.W;if(m==null){this.SVGdata.dw=this.SVGdata.w-this.data[this.base].SVGdata.w}if(this.data[this.base].SVGbetterBreak(j,g)){h=true;o=[this.base].concat(j.index);l=j.W;p=j.w;if(j.penalty===e.newline){h=n=true}}if(!n){this.SVGaddWidth(this.base,j,k)}j.scanW+=this.SVGdata.dw;j.W=j.scanW;j.index=[];if(h){j.W=l;j.w=p;j.index=o}return h},SVGmoveLine:function(i,j,m,h,o){if(this.data[this.base]){if(i.length>1){this.data[this.base].SVGmoveSlice(i.slice(1),j.slice(1),m,h,o,"paddingLeft")}else{if(j.length<=1){this.data[this.base].SVGmove(m,h,o)}else{this.data[this.base].SVGmoveSlice([],j.slice(1),m,h,o,"paddingRight")}}}if(j.length===0){var l=this.data[this.sup],g=this.data[this.sub],n=m.w,k;if(l){k=l.SVGdata;m.Add(l.toSVG(),n+(k.dx||0),k.dy)}if(g){k=g.SVGdata;m.Add(g.toSVG(),n+(k.dx||0),k.dy)}}}});a.mmultiscripts.Augment({SVGbetterBreak:function(k,h){if(!this.data[this.base]){return false}var p=k.index.slice(0),n=k.index.shift(),m,q,l,o=(k.index.length>0),j=false;if(!o){k.W+=k.w;k.w=0}k.scanW=k.W;var g=this.SVGdata.w-this.data[this.base].SVGdata.w-this.SVGdata.dx;k.scanW+=this.SVGdata.dx;l=k.scanW;if(this.data[this.base].SVGbetterBreak(k,h)){j=true;p=[this.base].concat(k.index);m=k.W;q=k.w;if(k.penalty===e.newline){j=o=true}}if(!o){this.SVGaddWidth(this.base,k,l)}k.scanW+=g;k.W=k.scanW;k.index=[];if(j){k.W=m;k.w=q;k.index=p}return j},SVGmoveLine:function(i,k,n,h,p){var q,m=this.SVGdata;if(i.length<1){this.scriptBox=this.SVGgetScripts(this.SVGdata.s);var j=this.scriptBox[2],o=this.scriptBox[3];q=n.w+m.dx;if(o){n.Add(o,q+m.delta-o.w,m.u)}if(j){n.Add(j,q-j.w,-m.v)}}if(this.data[this.base]){if(i.length>1){this.data[this.base].SVGmoveSlice(i.slice(1),k.slice(1),n,h,p,"paddingLeft")}else{if(k.length<=1){this.data[this.base].SVGmove(n,h,p)}else{this.data[this.base].SVGmoveSlice([],k.slice(1),n,h,p,"paddingRight")}}}if(k.length===0){var g=this.scriptBox[0],l=this.scriptBox[1];q=n.w+m.s;if(l){n.Add(l,q,m.u)}if(g){n.Add(g,q-m.delta,-m.v)}delete this.scriptBox}}});a.mo.Augment({SVGbetterBreak:function(i,g){if(i.values&&i.values.last===this){return false}var q=this.getValues("linebreak","linebreakstyle","lineleading","linebreakmultchar","indentalign","indentshift","indentalignfirst","indentshiftfirst","indentalignlast","indentshiftlast","texClass","fence");if(q.linebreakstyle===a.LINEBREAKSTYLE.INFIXLINEBREAKSTYLE){q.linebreakstyle=this.Get("infixlinebreakstyle")}if(q.texClass===a.TEXCLASS.OPEN){i.nest++}if(q.texClass===a.TEXCLASS.CLOSE&&i.nest){i.nest--}var j=i.scanW,k=i.embellished;delete i.embellished;if(!k||!k.SVGdata){k=this}var m=k.SVGdata,p=m.w+m.x;if(q.linebreakstyle===a.LINEBREAKSTYLE.AFTER){j+=p;p=0}if(j-i.shift===0&&q.linebreak!==a.LINEBREAK.NEWLINE){return false}var l=f.linebreakWidth-j;if(g.n===0&&(q.indentshiftfirst!==g.VALUES.indentshiftfirst||q.indentalignfirst!==g.VALUES.indentalignfirst)){var n=this.SVGgetAlign(g,q),h=this.SVGgetShift(g,q,n);l+=(i.shift-h)}var o=Math.floor(l/f.linebreakWidth*1000);if(o<0){o=e.toobig-3*o}if(q.fence){o+=e.fence}if((q.linebreakstyle===a.LINEBREAKSTYLE.AFTER&&q.texClass===a.TEXCLASS.OPEN)||q.texClass===a.TEXCLASS.CLOSE){o+=e.close}o+=i.nest*e.nestfactor;var r=e[q.linebreak||a.LINEBREAK.AUTO];if(!(r instanceof Array)){if(l>=0){o=r*i.nest}}else{o=Math.max(1,o+r[0]*i.nest)}if(o>=i.penalty){return false}i.penalty=o;i.values=q;i.W=j;i.w=p;q.lineleading=f.length2em(q.lineleading,g.VALUES.lineleading);q.last=this;return true}});a.mspace.Augment({SVGbetterBreak:function(h,g){if(h.values&&h.values.last===this){return false}var o=this.getValues("linebreak");var m=o.linebreak;if(!m||this.hasDimAttr()){m=a.LINEBREAK.AUTO}var i=h.scanW,k=this.SVGdata,n=k.w+k.x;if(i-h.shift===0){return false}var j=f.linebreakWidth-i;var l=Math.floor(j/f.linebreakWidth*1000);if(l<0){l=e.toobig-3*l}l+=h.nest*e.nestfactor;var p=e[m];if(m===a.LINEBREAK.AUTO&&n>=e.spacelimit*1000&&!this.mathbackground&&!this.backrgound){p=[(n/1000+e.spaceoffset)*e.spacefactor]}if(!(p instanceof Array)){if(j>=0){l=p*h.nest}}else{l=Math.max(1,l+p[0]*h.nest)}if(l>=h.penalty){return false}h.penalty=l;h.values=o;h.W=i;h.w=n;o.lineleading=g.VALUES.lineleading;o.linebreakstyle="before";o.last=this;return true}});MathJax.Hub.Register.StartupHook("TeX mathchoice Ready",function(){a.TeXmathchoice.Augment({SVGbetterBreak:function(h,g){return this.Core().SVGbetterBreak(h,g)},SVGmoveLine:function(k,g,i,j,h){return this.Core().SVGmoveSlice(k,g,i,j,h)}})});a.maction.Augment({SVGbetterBreak:function(h,g){return this.Core().SVGbetterBreak(h,g)},SVGmoveLine:function(k,g,i,j,h){return this.Core().SVGmoveSlice(k,g,i,j,h)},});a.semantics.Augment({SVGbetterBreak:function(h,g){return(this.data[0]?this.data[0].SVGbetterBreak(h,g):false)},SVGmoveLine:function(k,g,i,j,h){return(this.data[0]?this.data[0].SVGmoveSlice(k,g,i,j,h):null)}});MathJax.Hub.Startup.signal.Post("SVG multiline Ready");MathJax.Ajax.loadComplete(f.autoloadDir+"/multiline.js")});