/* * /MathJax/jax/output/SVG/autoload/mtable.js * * Copyright (c) 2009-2015 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.5.0";var a=MathJax.ElementJax.mml,d=MathJax.OutputJax.SVG,b=d.BBOX;a.mtable.Augment({toSVG:function(X){this.SVGgetStyles();var o=this.SVG(),am=this.SVGgetScale(o);if(this.data.length===0){this.SVGsaveData(o);return o}var aJ=this.getValues("columnalign","rowalign","columnspacing","rowspacing","columnwidth","equalcolumns","equalrows","columnlines","rowlines","frame","framespacing","align","useHeight","width","side","minlabelspacing");if(aJ.width.match(/%$/)){o.width=aJ.width=d.Em((d.cwidth/1000)*(parseFloat(aJ.width)/100))}var u=this.SVGgetMu(o);var aG=-1;var w=[],G=[],k=[],N=[],I=[],aE,aD,v=-1,aB,t,aw,Q,ak,B,ax;var aa=d.FONTDATA.lineH*am*aJ.useHeight,ae=d.FONTDATA.lineD*am*aJ.useHeight;for(aE=0,aB=this.data.length;aEv){v=aD}I[aD]=b.G();k[aD]=-d.BIGDIMEN}ak=Q.data[aD-aw];N[aE][aD]=ak.toSVG();if(ak.isEmbellished()){B=ak.CoreMO();var aI=B.Get("minsize",true);if(aI){if(B.SVGcanStretch("Vertical")){ax=B.SVGdata.h+B.SVGdata.d;if(ax){aI=d.length2em(aI,u,ax);if(aI*B.SVGdata.h/ax>w[aE]){w[aE]=aI*B.SVGdata.h/ax}if(aI*B.SVGdata.d/ax>G[aE]){G[aE]=aI*B.SVGdata.d/ax}}}else{if(B.SVGcanStretch("Horizontal")){aI=d.length2em(aI,u,B.SVGdata.w);if(aI>k[aD]){k[aD]=aI}}}}}if(N[aE][aD].h>w[aE]){w[aE]=N[aE][aD].h}if(N[aE][aD].d>G[aE]){G[aE]=N[aE][aD].d}if(N[aE][aD].w>k[aD]){k[aD]=N[aE][aD].w}}}var al=MathJax.Hub.SplitList;var aj=al(aJ.columnspacing),R=al(aJ.rowspacing),ag=al(aJ.columnalign),K=al(aJ.rowalign),L=al(aJ.columnlines),h=al(aJ.rowlines),ao=al(aJ.columnwidth),at=[];for(aE=0,aB=aj.length;aEN.length){aA=N.length}}g=0;av=-(ax+Z)+w[0];for(aE=0,aB=aA-1;aE0.98){ah=U/(T+U);ap=T+U}else{ap=T/(1-au)}}else{ap=d.length2em(aJ.width,u);for(aE=0,aB=Math.min(v+1,aj.length);aE0.01){if(aF&&ap>T){ap=(ap-T)/aF;for(aE=0,aB=z.length;aE