From: dpvc v. a. <we...@ma...> - 2007-09-19 12:12:59
|
Log Message: ----------- Make sure comma's are represented correctly in TeX mode. (They need to be enclosed in braces to get the spacing right.) Modified Files: -------------- pg/macros: contextCurrency.pl Revision Data ------------- Index: contextCurrency.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/contextCurrency.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -Lmacros/contextCurrency.pl -Lmacros/contextCurrency.pl -u -r1.8 -r1.9 --- macros/contextCurrency.pl +++ macros/contextCurrency.pl @@ -456,6 +456,7 @@ my $currency = ($self->{currency} || $self->context->{currency}); my ($symbol,$comma,$decimal) = ($currency->{symbol},$currency->{comma},$currency->{decimal}); $symbol = $self->context->operators->get($symbol)->{$type} || $symbol; + $comma = "{$comma}" if $type eq 'TeX'; my $s = main::prfmt($self->value,"%.2f"); $s =~ s/\./$decimal/; while ($s =~ s/(\d)(\d\d\d\D)/$1$comma$2/) {} |