[system] / trunk / pg / macros / PGbasicmacros.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/PGbasicmacros.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1050 Revision 1071
1224} 1224}
1225 1225
1226sub general_math_ev3 { 1226sub general_math_ev3 {
1227 my $in = shift; 1227 my $in = shift;
1228 my $mode = shift || "inline"; 1228 my $mode = shift || "inline";
1229 1229
1230 $in = FEQ($in); 1230 $in = FEQ($in);
1231 $in =~ s/%/\\%/g; 1231 $in =~ s/%/\\%/g;
1232 1232 my $in_delim;
1233
1234 if($mode eq "inline") {
1235 $in_delim = "\\($in\\)";
1236 } else { # assuming displayed math
1237 $in_delim = "\\[$in\\]";
1238 }
1239
1233 my $out; 1240 my $out;
1234 if ($displayMode eq "HTML_tth") { 1241 if($displayMode eq "HTML_tth") {
1235 $in = "\\($in\\)" if $mode eq "inline";
1236 $in = "\\[$in\\]" if $mode eq "display";
1237 $out = tth($in); 1242 $out = tth($in_delim);
1243 } elsif ($displayMode eq "HTML_dpng") {
1244 $out = $envir{'imagegen'}->add($in_delim);
1238 } elsif ($displayMode eq "HTML_img") { 1245 } elsif ($displayMode eq "HTML_img") {
1239 $out = math2img($in, $mode); 1246 $out = math2img($in, $mode);
1240 } else { 1247 } else {
1241 $out = "\\($in\\)" if $mode eq "inline"; 1248 $out = "\\($in\\)" if $mode eq "inline";
1242 $out = "\\[$in\\]" if $mode eq "display"; 1249 $out = "\\[$in\\]" if $mode eq "display";
1574 @image_list = @{$image_ref}; 1581 @image_list = @{$image_ref};
1575 } else { 1582 } else {
1576 push(@image_list,$image_ref); 1583 push(@image_list,$image_ref);
1577 } 1584 }
1578 1585
1579
1580 my @output_list = (); 1586 my @output_list = ();
1581 while(@image_list) { 1587 while(@image_list) {
1582 my $imageURL = alias(shift @image_list); 1588 my $imageURL = alias(shift @image_list);
1583 my $out=""; 1589 my $out="";
1584 1590
1585 if ($main::displayMode eq 'TeX') { 1591 if ($main::displayMode eq 'TeX') {

Legend:
Removed from v.1050  
changed lines
  Added in v.1071

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9