Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Better way to eliminate superfluous parentheses in fractions

  • Loading branch information...
commit f20e195fa4ea1157daede979ea1663e596499136 1 parent ba90d6d
fiedorow authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 filter/algebra/AlgParser.pm
View
6 filter/algebra/AlgParser.pm
@@ -553,8 +553,10 @@ sub tolatex {
if ($args[2]->[0] =~ /binop[12]|numberE|unop1/)
{($p3,$p4)=qw{ \left( \right) };}
if ($args[0] eq '/'){
- return('\frac{' . $p1 . $args[1]->tolatex() . $p2 . '}'.
- '{' . $p3 . $args[2]->tolatex() . $p4 . '}' );
+# return('\frac{' . $p1 . $args[1]->tolatex() . $p2 . '}'.
+# '{' . $p3 . $args[2]->tolatex() . $p4 . '}' );
+ return('\frac{' . $args[1]->tolatex() . '}'.
+ '{' . $args[2]->tolatex() . '}' );
}
else{
return ($p1 . $args[1]->tolatex() . $p2 . $args[0] . $p3 .
Please sign in to comment.
Something went wrong with that request. Please try again.