moodle/filter/algebra/algebra2tex.pl
Petr Skoda f7f0909ce5 PULL-442 multiple TeX related fixes
Prevent moodle_url error, cleanup entity encoding and decoding, disable tex source view when TeX and Algebra plugins disabled, localise TeX source popup and prevent phishing attempts, fix executable permission of Algebra pearl script, prevent image error in tex debug when Tex/Ghostscript not configured properly, fix copyright blocks and phpdocs, improve coding style, fix wrong source display link in Algebra filter.
2011-03-13 15:18:07 +01:00

17 lines
287 B
Perl
Executable file

#!/usr/bin/perl
use lib '.';
use AlgParser;
my $parser = new AlgParserWithImplicitExpand;
my $ret;
$ret = $parser -> parse($ARGV[0]);
if ( ref($ret) ) {
$parser -> tostring();
$parser -> normalize();
print $parser -> tolatex();
} else {
print $parser->{htmlerror};
}