[LON-CAPA-cvs] cvs: modules /TexConvert/algebra AlgParser.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 24 Feb 2005 09:37:05 -0000
albertel Thu Feb 24 04:37:05 2005 EDT
Modified files:
/modules/TexConvert/algebra AlgParser.pm
Log:
- proper support for \abs
Index: modules/TexConvert/algebra/AlgParser.pm
diff -u modules/TexConvert/algebra/AlgParser.pm:1.9 modules/TexConvert/algebra/AlgParser.pm:1.10
--- modules/TexConvert/algebra/AlgParser.pm:1.9 Thu Feb 24 04:06:14 2005
+++ modules/TexConvert/algebra/AlgParser.pm Thu Feb 24 04:37:05 2005
@@ -596,7 +596,7 @@
# added missing trig functions
#
#$specialfunc = '(?:abs|logten|asin|acos|atan|sech|sgn|step|fact)';
- my $specialfunc = '(?:abs|(logten)|a(sin|cos|tan|sec|csc|cot)(h)?|sgn|step|fact)';
+ my $specialfunc = '(?:(logten)|a(sin|cos|tan|sec|csc|cot)(h)?|sgn|step|fact|(abs))';
#
# End DPVC
#
@@ -608,6 +608,9 @@
elsif (defined($2)) {
return ('\mbox{' . $2.$3 .'}^{-1}'. $p1 . $args[1]->tolatex() . $p2);
}
+ elsif (defined($4)) {
+ return ('|' . $args[1]->tolatex() . '|');
+ }
else {
return ('\mbox{' . $args[0] .'}'. $p1 . $args[1]->tolatex() . $p2);
}