From f313c9cf8e3a4aad9d1d289ea1d3e2e36126ea47 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Sat, 27 Feb 2021 14:12:35 -0600 Subject: [PATCH] Add the `non_tex_preview` flag to the cmp options for the parserGraphTool.pl macro so that its answers are not typeset by MathJax. --- macros/parserGraphTool.pl | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/macros/parserGraphTool.pl b/macros/parserGraphTool.pl index 4f45f01f46..00936504ff 100644 --- a/macros/parserGraphTool.pl +++ b/macros/parserGraphTool.pl @@ -524,14 +524,9 @@ sub cmp_preprocess { my $graphObjs = @{$self->{staticObjects}} ? join(",", @{$self->{staticObjects}}, $ans->{student_ans}) : $ans->{student_ans}; - # This first ends the attempts table MathJax math mode, then injects the jsxgraph div and javascript, and then - # starts another MathJax math mode that is ended by the atttempts table. Both of the MathJax elements are - # removed by the injected javascript. $ans->{preview_latex_string} = <<"END_ANS"; -\\]
-\\[ END_ANS } } @@ -554,7 +548,7 @@ sub cmp_preprocess { # displayed in the "Correct Answer" box of the results table. sub cmp { my $self = shift; - my $cmp = $self->SUPER::cmp(%{$self->{cmpOptions}}, @_); + my $cmp = $self->SUPER::cmp(non_tex_preview => 1, %{$self->{cmpOptions}}, @_); if ($main::displayMode ne 'TeX') { my $ans_name = $self->ANS_NAME; @@ -562,14 +556,9 @@ sub cmp { my $graphObjs = @{$self->{staticObjects}} ? join(",", @{$self->{staticObjects}}, $cmp->{rh_ans}{correct_ans}) : $cmp->{rh_ans}{correct_ans}; - # This first ends the attempts table MathJax math mode, then injects the jsxgraph div and javascript, and then - # starts another MathJax math mode that is ended by the atttempts table. Both of the MathJax elements are - # removed by the injected javascript. $cmp->{rh_ans}{correct_ans_latex_string} = << "END_ANS"; -\\]
-\\[ END_ANS }