/*
* /MathJax/jax/output/HTML-CSS/autoload/mtable.js
*
* Copyright (c) 2012 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var c="2.1";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 G=this.getValues("columnalign","rowalign","columnspacing","rowspacing","columnwidth","equalcolumns","equalrows","columnlines","rowlines","frame","framespacing","align","useHeight","width","side","minlabelspacing");var aF=G.width.match(/%$/);var av=b.createStack(r);var aC=this.HTMLgetScale(),ax=this.HTMLgetMu(r),ay=-1;var ao=[],ar=[],ai=[],au=[],at=[],ad,ac,an=-1,ab,am,V,aB,O,az,aK=[];var aj=b.FONTDATA.baselineskip*aC*G.useHeight,aP,E=b.FONTDATA.lineH*aC,L=b.FONTDATA.lineD*aC;for(ad=0,ab=this.data.length;adan){an=ac}at[ac]=b.createStack(b.createBox(av));ai[ac]=-b.BIGDIMEN}au[ad][ac]=b.createBox(at[ac]);aK.push(aB.data[ac-V].toHTML(au[ad][ac]))}}b.MeasureSpans(aK);for(ad=0,ab=this.data.length;adao[ac]){ao[ac]=aO*aH.h/aP}if(aO*aH.d/aP>ar[ac]){ar[ac]=aO*aH.d/aP}}}else{if(az.HTMLcanStretch("Horizontal")){aO=b.length2em(aO,ax,aH.w);if(aO>ai[ac]){ai[ac]=aO}}}}}if(au[ad][ac].bbox.h>ao[ad]){ao[ad]=au[ad][ac].bbox.h}if(au[ad][ac].bbox.d>ar[ad]){ar[ad]=au[ad][ac].bbox.d}if(au[ad][ac].bbox.w>ai[ac]){ai[ac]=au[ad][ac].bbox.w}}}if(ao[0]+ar[0]){ao[0]=Math.max(ao[0],E)}if(ao[au.length-1]+ar[au.length-1]){ar[au.length-1]=Math.max(ar[au.length-1],L)}var aw=G.columnspacing.split(/ /),aM=G.rowspacing.split(/ /),e=G.columnalign.split(/ /),z=G.rowalign.split(/ /),d=G.columnlines.split(/ /),v=G.rowlines.split(/ /),aI=G.columnwidth.split(/ /),T=[];for(ad=0,ab=aw.length;adau.length){Z=au.length}}ah=0;aQ=-(aP+aD)+ao[0];for(ad=0,ab=Z-1;ad0.98){Q=0.98/ae;ae=0.98}}else{if(G.width==="auto"){if(ae>0.98){Q=I/(w+I);aa=w+I}else{aa=w/(1-ae)}}else{aa=b.length2em(G.width,ax);for(ad=0,ab=Math.min(an+1,aw.length);ad0.01){if(af&&aa>w){aa=(aa-w)/af;for(ad=0,ab=aq.length;ad