--- loncom/homework/math_parser/ENode.pm 2015/06/30 17:42:14 1.3 +++ loncom/homework/math_parser/ENode.pm 2017/01/19 19:24:57 1.4 @@ -836,9 +836,14 @@ sub toTeX { return "\\lim_{".$c2->toTeX()." \\to ".$c3->toTeX(). "}".$c1->toTeX(); } else { - return "\\lim_{".$c2->toTeX()." \\to ".$c3->toTeX(). - (($c4->value eq "plus") ? "+" : "-"). - "}".$c1->toTeX(); + my $s = "\\lim_{".$c2->toTeX()." \\to ".$c3->toTeX(); + if ($c4->value eq "plus") { + $s .= "+"; + } elsif ($c4->value eq "minus") { + $s .= "-"; + } + $s .= "}".$c1->toTeX(); + return $s; } } when ("binomial") {