version 1.7, 2005/02/24 08:32:11
|
version 1.8, 2005/02/24 08:34:52
|
Line 594 sub tolatex {
|
Line 594 sub tolatex {
|
# added missing trig functions |
# added missing trig functions |
# |
# |
#$specialfunc = '(?:abs|logten|asin|acos|atan|sech|sgn|step|fact)'; |
#$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 = '(?:abs|(logten)|a(sin|cos|tan|sec|csc|cot)(h)?|sgn|step|fact)'; |
# |
# |
# End DPVC |
# End DPVC |
# |
# |
|
|
if ($args[0] =~ /$specialfunc/) { |
if ($args[0] =~ /$specialfunc/) { |
return ('\mbox{' . $args[0] .'}'. $p1 . $args[1]->tolatex() . $p2); |
if (defined($1)) { |
|
return ('\mbox{log}_{10}'. $p1 . $args[1]->tolatex() . $p2); |
|
} |
|
elsif (defined($2)) { |
|
return ('\mbox{' . $2.$3 .'}^{-1}'. $p1 . $args[1]->tolatex() . $p2); |
|
} |
|
else { |
|
return ('\mbox{' . $args[0] .'}'. $p1 . $args[1]->tolatex() . $p2); |
|
} |
} |
} |
else { |
else { |
return ('\\' . $args[0] . $p1 . $args[1]->tolatex() . $p2); |
return ('\\' . $args[0] . $p1 . $args[1]->tolatex() . $p2); |