| … | |
… | |
| 179 | 'left' => substr($styleParams,0,1), |
179 | 'left' => substr($styleParams,0,1), |
| 180 | 'right' => substr($styleParams,2,1), |
180 | 'right' => substr($styleParams,2,1), |
| 181 | 'midrule' => substr($styleParams,1,1), |
181 | 'midrule' => substr($styleParams,1,1), |
| 182 | 'top_labels' => 0, |
182 | 'top_labels' => 0, |
| 183 | 'box'=>[-1,-1], # pair location of boxed element |
183 | 'box'=>[-1,-1], # pair location of boxed element |
| 184 | 'allow_unknown_options'=> 1); |
184 | 'allow_unknown_options'=> 1, |
|
|
185 | 'num_format' => "%.0f", |
|
|
186 | ); |
| 185 | |
187 | |
| 186 | my ($numRows, $numCols, @myRows); |
188 | my ($numRows, $numCols, @myRows); |
| 187 | |
189 | |
| 188 | if (ref($ra_matrix) eq 'Matrix' ) { |
190 | if (ref($ra_matrix) eq 'Matrix' ) { |
| 189 | ($numRows, $numCols) = $ra_matrix->dim(); |
191 | ($numRows, $numCols) = $ra_matrix->dim(); |
| … | |
… | |
| 542 | $colcount++; |
544 | $colcount++; |
| 543 | $out .= '\fbox{' if ($colcount == $opts{'box'}->[1] and $opts{'cnt'} == $opts{'box'}->[0]); |
545 | $out .= '\fbox{' if ($colcount == $opts{'box'}->[1] and $opts{'cnt'} == $opts{'box'}->[0]); |
| 544 | $element= shift(@elements); |
546 | $element= shift(@elements); |
| 545 | if (ref($element) eq 'Fraction') { |
547 | if (ref($element) eq 'Fraction') { |
| 546 | $element= $element->print_inline(); |
548 | $element= $element->print_inline(); |
| 547 | } |
549 | }elsif( $element =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/ and $element != sprintf($opts{'num_format'},$element) and $element - sprintf($opts{'num_format'},$element) < $main::functZeroLevelTolDefault){ |
|
|
550 | $element = sprintf($opts{'num_format'},$element); |
|
|
551 | $element = 0 if abs($element) < $main::functZeroLevelTolDefault; |
|
|
552 | } |
| 548 | $out .= "$brh<TD nowrap=\"nowrap\" align=\"$myalign\">$erh"; |
553 | $out .= "$brh<TD nowrap=\"nowrap\" align=\"$myalign\">$erh"; |
| 549 | $out .= '<table border="1"><tr><td>' if ($colcount == $opts{'box'}->[1] and $opts{'cnt'} == $opts{'box'}->[0]); |
554 | $out .= '<table border="1"><tr><td>' if ($colcount == $opts{'box'}->[1] and $opts{'cnt'} == $opts{'box'}->[0]); |
| 550 | $out .= $element; |
555 | $out .= $element; |
| 551 | $out .= '</td></tr></table>' if ($colcount == $opts{'box'}->[1] and $opts{'cnt'} == $opts{'box'}->[0]); |
556 | $out .= '</td></tr></table>' if ($colcount == $opts{'box'}->[1] and $opts{'cnt'} == $opts{'box'}->[0]); |
| 552 | $out .= "$brh</TD>$erh"; |
557 | $out .= "$brh</TD>$erh"; |