Log Message:
-----------
Use \verb rather than \text, since it will show more characters
properly, and will handle missmatched braces in student answers.
Modified Files:
--------------
pg/macros:
PGstringevaluators.pl
Revision Data
-------------
Index: PGstringevaluators.pl
===================================================================
RCS file: /webwork/cvs/system/pg/macros/PGstringevaluators.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lmacros/PGstringevaluators.pl -Lmacros/PGstringevaluators.pl -u -r1.2 -r1.3
--- macros/PGstringevaluators.pl
+++ macros/PGstringevaluators.pl
@@ -578,10 +578,11 @@
$rh_ans;
});
$answer_evaluator->install_post_filter(sub {
- my $rh_hash = shift;
+ my $rh_hash = shift; my $c = chr(128); ## something that won't be typed
$rh_hash->{_filter_name} = "clean up preview strings";
$rh_hash->{'preview_text_string'} = $rh_hash->{student_ans};
- $rh_hash->{'preview_latex_string'} = "\\text{ ".$rh_hash->{student_ans}." }";
+# $rh_hash->{'preview_latex_string'} = "\\text{ ".$rh_hash->{student_ans}." }";
+ $rh_hash->{'preview_latex_string'} = "\\verb".$c.$rh_hash->{student_ans}.$c;
$rh_hash;
});
return $answer_evaluator;
|