version 1.4, 2017/01/19 19:24:57
|
version 1.5, 2017/01/27 20:24:26
|
Line 746 sub toTeX {
|
Line 746 sub toTeX {
|
} |
} |
} |
} |
when ("!") { |
when ("!") { |
return($c0->toTeX()." !"); |
my $s = $c0->toTeX(); |
|
if ($c0->type == OPERATOR) { |
|
$s = "(".$s.")"; |
|
} |
|
$s .= " !"; |
|
return $s; |
} |
} |
when ("%") { |
when ("%") { |
return($c0->toTeX()." \\% ".$c1->toTeX()); |
return($c0->toTeX()." \\% ".$c1->toTeX()); |
Line 805 sub toTeX {
|
Line 810 sub toTeX {
|
when ("sqrt") { return "\\sqrt{".$c1->toTeX()."}"; } |
when ("sqrt") { return "\\sqrt{".$c1->toTeX()."}"; } |
when ("abs") { return "|".$c1->toTeX()."|"; } |
when ("abs") { return "|".$c1->toTeX()."|"; } |
when ("exp") { return "\\mathrm{e}^{".$c1->toTeX()."}"; } |
when ("exp") { return "\\mathrm{e}^{".$c1->toTeX()."}"; } |
|
when ("factorial") { |
|
my $s = $c1->toTeX(); |
|
if ($c1->type == OPERATOR) { |
|
$s = "(".$s.")"; |
|
} |
|
$s .= " !"; |
|
return $s; |
|
} |
when ("diff") { |
when ("diff") { |
if (scalar(@children) == 3) { |
if (scalar(@children) == 3) { |
return "\\frac{d}{d".$c2->toTeX()."} ".$c1->toTeX(); |
return "\\frac{d}{d".$c2->toTeX()."} ".$c1->toTeX(); |