From: dpvc v. a. <we...@ma...> - 2005-12-07 16:16:40
|
Log Message: ----------- Prevent error message when num_cmp specifies the same string more than once (e.g., upper and lower case versions of the same thing). Modified Files: -------------- pg/macros: PGanswermacros.pl Revision Data ------------- Index: PGanswermacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGanswermacros.pl,v retrieving revision 1.48 retrieving revision 1.49 diff -Lmacros/PGanswermacros.pl -Lmacros/PGanswermacros.pl -u -r1.48 -r1.49 --- macros/PGanswermacros.pl +++ macros/PGanswermacros.pl @@ -1080,7 +1080,8 @@ foreach my $string (@{$num_params{strings}}) { my %tex = ($string =~ m/^(-?)inf(inity)?$/i)? (TeX => "$1\\infty"): (); %tex = (TeX => "-\\infty") if uc($string) eq "MINF"; - $context->strings->add(uc($string) => {%tex}); + $context->strings->add(uc($string) => {%tex}) + unless $context->strings->get(uc($string)); } } |