/*
* /MathJax/jax/output/HTML-CSS/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("HTML-CSS Jax Ready",function(){var c="2.5.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a.mtable.Augment({toHTML:function(r){r=this.HTMLcreateSpan(r);if(this.data.length===0){return r}var I=this.getValues("columnalign","rowalign","columnspacing","rowspacing","columnwidth","equalcolumns","equalrows","columnlines","rowlines","frame","framespacing","align","useHeight","width","side","minlabelspacing");var aK=I.width.match(/%$/);var ax=b.createStack(r);var aH=this.HTMLgetScale(),aA=this.HTMLgetMu(r),aB=-1;var ap=[],at=[],aj=[],av=[],au=[],ae,ad,ao=-1,ac,an,X,aF,Q,aC,aP=[],aU;var G=b.FONTDATA.lineH*aH*I.useHeight,N=b.FONTDATA.lineD*aH*I.useHeight;for(ae=0,ac=this.data.length;aeao){ao=ad}au[ad]=b.createStack(b.createBox(ax));aj[ad]=-b.BIGDIMEN}av[ae][ad]=b.createBox(au[ad]);aP.push(aF.data[ad-X].toHTML(av[ae][ad]))}}b.MeasureSpans(aP);for(ae=0,ac=this.data.length;aeap[ae]){ap[ae]=aT*aM.h/aU}if(aT*aM.d/aU>at[ae]){at[ae]=aT*aM.d/aU}}}else{if(aC.HTMLcanStretch("Horizontal")){aT=b.length2em(aT,aA,aM.w);if(aT>aj[ad]){aj[ad]=aT}}}}}if(av[ae][ad].bbox.h>ap[ae]){ap[ae]=av[ae][ad].bbox.h}if(av[ae][ad].bbox.d>at[ae]){at[ae]=av[ae][ad].bbox.d}if(av[ae][ad].bbox.w>aj[ad]){aj[ad]=av[ae][ad].bbox.w}}}var aE=MathJax.Hub.SplitList;var az=aE(I.columnspacing),aR=aE(I.rowspacing),e=aE(I.columnalign),B=aE(I.rowalign),d=aE(I.columnlines),w=aE(I.rowlines),aN=aE(I.columnwidth),U=[];for(ae=0,ac=az.length;aeav.length){aa=av.length}}ai=0;aV=-(aU+aI)+ap[0];for(ae=0,ac=aa-1;ae0.98){R=0.98/af;af=0.98}}else{if(I.width==="auto"){if(af>0.98){R=K/(z+K);ab=z+K}else{ab=z/(1-af)}}else{ab=b.length2em(I.width,aA);for(ae=0,ac=Math.min(ao+1,az.length);ae0.01){if(ag&&ab>z){ab=(ab-z)/ag;for(ae=0,ac=ar.length;aeap[ae]){av[ae][ad].bbox.H=av[ae][ad].bbox.h;av[ae][ad].bbox.h=ap[ae]}if(av[ae][ad].bbox.d>at[ae]){av[ae][ad].bbox.D=av[ae][ad].bbox.d;av[ae][ad].bbox.d=at[ae]}aC.symmetric=aL}}aS=Q.rowalign||this.data[ae].rowalign||B[ae];o=({top:ap[ae]-av[ae][ad].bbox.h,bottom:av[ae][ad].bbox.d-at[ae],center:((ap[ae]-at[ae])-(av[ae][ad].bbox.h-av[ae][ad].bbox.d))/2,baseline:0,axis:0})[aS]||0;aS=(Q.columnalign||U[ae][ad]||e[ad]);b.alignBox(av[ae][ad],aS,S+o)}if(ae