From: Mike G. v. a. <we...@ma...> - 2007-12-20 00:18:32
|
Log Message: ----------- remove \ensuremath from around the output. I don't think it will work properly (although it might have worked with LatexToHTML) Modified Files: -------------- pg/lib: Fraction.pm Revision Data ------------- Index: Fraction.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Fraction.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -Llib/Fraction.pm -Llib/Fraction.pm -u -r1.2 -r1.3 --- lib/Fraction.pm +++ lib/Fraction.pm @@ -313,13 +313,13 @@ } # positive fraction: print out in plain math mode elsif ($self->scalar > 0) { - $out = "\\ensuremath{ \\frac{$self->{numerator}}{$self->{denominator}} }"; + $out = " \\frac{$self->{numerator}}{$self->{denominator}} "; } # negative fraction: print out negative sign and then absolute value in # fraction form, avoiding parenthesis around the negative portion. else { my $foo = -$self->{numerator}; - $out = "\\ensuremath{ -\\frac{$foo}{$self->{denominator}} }"; + $out = " -\\frac{$foo}{$self->{denominator}} "; } $out; @@ -341,8 +341,8 @@ my $coeff = int($tempNum/$tempDenom); $tempNum = $tempNum % $tempDenom; - $out = "\\ensuremath{ -$coeff \\frac{abs($tempNum)}{abs($tempDenom)} }" if ($self->scalar < 0); - $out = "\\ensuremath{ $coeff \\frac{$tempNum}{$tempDenom} }" if ($self->scalar > 0); + $out = " -$coeff \\frac{abs($tempNum)}{abs($tempDenom)} " if ($self->scalar < 0); + $out = " $coeff \\frac{$tempNum}{$tempDenom} " if ($self->scalar > 0); $out = $coeff if ($tempNum == 0); } |