From 08d32575e1c7abdfbe1701ec57cd9c5c9d212868 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Mon, 9 Jul 2012 16:45:13 +0800 Subject: [PATCH] MDL-33616 Maths filter: Addded --halt-on-error swtich for latex to stop execution, if any error is encountered --- filter/tex/latex.php | 2 +- filter/tex/texdebug.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/filter/tex/latex.php b/filter/tex/latex.php index 2f84bc220cc..fe0baf99795 100644 --- a/filter/tex/latex.php +++ b/filter/tex/latex.php @@ -108,7 +108,7 @@ fclose( $fh ); // run latex on document - $command = "{$CFG->filter_tex_pathlatex} --interaction=nonstopmode $tex"; + $command = "{$CFG->filter_tex_pathlatex} --interaction=nonstopmode --halt-on-error $tex"; chdir( $this->temp_dir ); if ($this->execute($command, $log)) { // It allways False on Windows // return false; diff --git a/filter/tex/texdebug.php b/filter/tex/texdebug.php index 35f1afb4642..b4a08dee34c 100644 --- a/filter/tex/texdebug.php +++ b/filter/tex/texdebug.php @@ -244,7 +244,7 @@ chdir($latex->temp_dir); // step 1: latex command - $cmd = "$CFG->filter_tex_pathlatex --interaction=nonstopmode $tex"; + $cmd = "$CFG->filter_tex_pathlatex --interaction=nonstopmode --halt-on-error $tex"; $output .= execute($cmd); // step 2: dvips command