Skip to content

Commit

Permalink
Update macros/contextFraction.pl
Browse files Browse the repository at this point in the history
Co-authored-by: Davide P. Cervone <[email protected]>
  • Loading branch information
drdrew42 and dpvc authored Oct 20, 2021
1 parent c4a26ee commit 7d0d3e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion macros/contextFraction.pl
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,9 @@ sub TeX {
return $string unless $self->{value}->classMatch('Fraction');
my $precedence = shift;
my $frac = $self->context->operators->get('/')->{precedence};
my $noparens = shift;
$string = '\left(' . $string . '\right)' if $self->{hadParens} ||
(defined $precedence && $precedence > $frac && $self->context->flag('showExtraParens') > 1);
(defined $precedence && $precedence > $frac && !$noparens);
return $string;
}

Expand Down

0 comments on commit 7d0d3e4

Please sign in to comment.