From: dpvc v. a. <we...@ma...> - 2005-07-06 15:41:18
|
Log Message: ----------- Make tth use unicode for the preview (as it does for the calls within the body of the problem). Also, do the preview in display mode, but fix the tables so that they won't have unwanted borders (really need to fix the ur.css to get this right) and remove the unneeded initial <BR> that tth produces. Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator: Problem.pm Revision Data ------------- Index: Problem.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm,v retrieving revision 1.174 retrieving revision 1.175 diff -Llib/WeBWorK/ContentGenerator/Problem.pm -Llib/WeBWorK/ContentGenerator/Problem.pm -u -r1.174 -r1.175 --- lib/WeBWorK/ContentGenerator/Problem.pm +++ lib/WeBWorK/ContentGenerator/Problem.pm @@ -319,8 +319,8 @@ # construct TTH command line my $tthCommand = $ce->{externalPrograms}->{tth} - . " -L -f5 -r 2> /dev/null <<END_OF_INPUT; echo > /dev/null\n" - . $tthPreamble . "\\(" . $tex . "\\)\n" + . " -L -f5 -u -r 2> /dev/null <<END_OF_INPUT; echo > /dev/null\n" + . $tthPreamble . "\\[" . $tex . "\\]\n" . "END_OF_INPUT\n"; # call tth @@ -328,6 +328,9 @@ if ($?) { return "<b>[tth failed: $? $@]</b>"; } else { + # avoid border problems in tables and remove unneeded initial <br> + $result =~ s/(<table [^>]*)>/$1 CLASS="ArrayLayout">/gi; + $result =~ s!\s*<br clear="all" />!!; return $result; } |