19 lines
7.9 KiB
JavaScript
19 lines
7.9 KiB
JavaScript
|
/*
|
||
|
* ../SourceForge/trunk/mathjax/jax/output/HTML-CSS/autoload/mtable.js
|
||
|
*
|
||
|
* Copyright (c) 2010 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.Unpack([
|
||
|
['(function(a,b){var c="1.0";a.mtable','.Augment({toHTML:function(','X){X','=this.HTMLcreateSpan(','X);if(','this.data','.length','===0){return X}var aJ','=this.getValues("','columnalign','","','rowalign','","','columnspacing','","','rowspacing','","','columnwidth','","','equalcolumns','","equalrows","','columnlines','","rowlines","frame","framespacing","align","useHeight","width","side","','minlabelspacing','");var r=','aJ.width','.match(/%$/);var ag=','b.createStack(','X);var am=this.HTMLgetScale();var aH=-1;var w=[],I=[],l=[],O=[],K=[],aF,aE,v=-1,aC,t,ay,R;var aL','=b.FONTDATA.','baselineskip*am*aJ.useHeight,Z',29,'lineH*am,af',29,'lineD*am;','for(aF=0,aC=',5,'.length;aF<aC;aF++){','R=',5,'[aF];ay=(R.','type==="mlabeledtr"?aH:0);','O[aF]=[];w[aF]=I[aF]=0;for(aE=ay,t=R.data',6,'+ay;aE<t;aE++){if(l[aE]==null){if(aE>v){v=aE}K[aE]=',27,'b.createBox(','ag));l[aE]=-b.BIGDIMEN}O[aF][aE]=',46,'K[aE]);b.Measured','(R.data[aE-ay].','toHTML(O[aF][aE]),O[aF][aE]);if',50,'isMultiline){O[aF][aE].','style.width="100','%"}if(','O[aF][aE].bbox','.h>w[aF]){w[aF]=',56,'.h}if(',56,'.d>I[aF]){I[aF]=',56,'.d}if(',56,'.w>l[aE]){l[aE]=',56,'.w}}}if(w[0]+I[0]){w[0',']=Math.max(','w[0],Z)}if(w[','O.length-1',']+I[',70,']){I[',70,68,'I[',70,'],af)}var al=aJ.',13,'.split(/ /),','S=aJ.',15,80,'ah=aJ.',9,80,'L=aJ.',11,80,'N=aJ.',21,80,'k=','aJ.rowlines',80,'ap=aJ.',17,80,'au=[];',35,'al',37,'al[aF]=','b.length2em(','al[aF])}',35,'S',37,'S[aF]=',104,'S[aF])}while(al',6,'<v){al.push(al[al','.length-1])}while(','ah',6,'<=v){ah.push(ah[ah',114,'N',6,'<v){N.push(N[N',114,'ap',6,'<=v){ap.push(ap[ap',114,'S',6,'<O',6,'){S.push(S[S',114,'L',6,'<=O',6,'){L.push(L[L',114,'k',6,'<O',6,'){k.push(k[k',6,'-1])}if(K[aH]){ah[aH]=(aJ.side.substr(0,1)==="l"?"left":"right");al[aH]=-l[aH]}',35,'O',37,'R=',5,'[aF];au[aF]=[];if(R.',11,'){L[aF]=R.',11,'}if(R.',9,'){au[aF]=R.',9,'.split(/ /);while(au[aF].length<=v){au[aF].push(au[aF][au[aF].length-1])}}}var az=w[0]+I[',70,'];',35,70,';aF<aC;aF++){','az+=','Math.max((w[aF]+I[aF]?aL:0),I[aF]+w[aF+1]+S[aF','])}var ac=0,aa=0,aA,aI=az',';if(aJ.frame!=="none','"||(aJ.',21,'+',94,').match(/solid|dashed/)){ac=',104,'aJ.framespacing.split(/[, ]+/)[','0]);aa=',104,175,'1]);aI=az+2*aa}var h,ax;if(String(aJ.align).match(/^\\d+$/)){h=az/2+','b.TeX.axis_height*am-','w[0];ax=-(az/2+aa)}else{h=({top:-(w[0]+aa),bottom:az+aa-w[0],center:az/2-w[0],baseline:az/2-w[0],axis:az/2+',180,'w[0]})[aJ.align];ax=({top:-(az+2*aa),bottom:0,center:-(az/2+aa),baseline:-(az/2+aa),axis:',180,'az/2-aa})[aJ.align]}var aq,aw=0,U=0,V=0,aB=0,aG=0,o=[],B=[],ai=1;if(aJ.',19,'&&',25,'!=="auto"){if(r){aq=(100/(v+1)).toFixed(2).replace(/\\.?0+$/,"")+"%";','for(aF=0,aC=Math.min(v+1,','ap','.length);aF<aC;aF++){','ap[aF]=aq}aq=0;aw=1;aG=v+1;',190,'al',192,'aq+=al[aF',']}}else{aq=',104,25,');',190,'al',192,'aq-=al[aF',']}aq/=v+1;',190,'ap',192,'l[aF]=aq}}}else{',190,'ap',192,'if(ap[aF]==="auto"){','U+=l[aF]}else{if(ap[aF',']==="fit"){B[aG]=aF;aG++;',215,'].match(/%$/)){','o[aB]=aF;aB++;V+=l[aF];aw+=',104,'ap[aF],1)}else{l[aF]=',104,'ap[aF]);U+=l[aF]}}}}if(r){aq=0;',35,'Math.min(v,al',192,197,']}','if(aw>0.98){ai=','0.98/aw;aw=0.98}}else{if(',25,'==="auto"){',229,'V/(U+V);aq=U+V}else{aq=U/(1-aw)}}else{aq=',104,25,');',190,'al',192,205,']}}',35,'o',37,'l[o[aF]]=',104,'ap[o[aF]],aq*ai);U+=l[o[aF]]}if(Math.abs(aq-U)>0.01){if(aG&&aq>U){aq=(aq-U)/aG;',35,'B',37,'l[B[aF]]+=aq}}else{aq=aq/U;','for(aE=0;aE<=v;aE++){','l[aE]*=aq}}}if(aJ.',19,'){var ad','=Math.max.apply(Math,','l);',253,'l[aE]=ad}}}}if(aJ.equalrows){var T',257,'w),ao',257,'I);',35,'O',37,'ay=((T+ao)-(w[aF]+I[aF]))/2;w[aF]+=ay;I[aF]+=ay}}var ar=h,n,u,aD;ay=(K[aH]?aH:0);for(aE=ay;aE<=v;aE++){',35,'O',37,'if(O[aF][aE]){ay=(',5,'[aF].',41,'var ak=',5,'[aF].data[aE-ay];','if(ak.HTMLcanStretch("','Horizontal")){',56,'=ak.','HTMLstretchH','(K[aE],l[aE]).bbox}else{',279,'Vertical")){var z=ak.CoreMO();var ab=z.symmetric;z.symmetric=false;',56,'=ak.','HTMLstretchV','(K[aE],w[aF],I[aF]).bbox;z.symmetric=ab}}aD=ak.',11,'||',5,'[aF].',11,'||L[aF];n=({top:w[aF]-',56,'.h,bottom:',56,'.d-I[aF],center:((w[aF]-I[aF])-(',56,'.h
|
||
|
]);
|
||
|
|