Skip to content

Commit

Permalink
Merge pull request #858 from Alex-Jordan/negative-space
Browse files Browse the repository at this point in the history
replace MathObjects negative space with \mathopen{}
  • Loading branch information
pstaabp authored Jun 22, 2023
2 parents 15ba650 + 5614662 commit c3ad44f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Parser/BOP/multiply.pm
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ sub TeX {
&& $self->{rop}{isConstant}
&& $self->{rop}->type eq 'Number'
&& $self->{rop}->class ne 'Constant');
$right = '\!' . $right if $mult eq '' && substr($right, 0, 5) eq '\left';
$right = '\mathopen{}' . $right if $mult eq '' && substr($right, 0, 5) eq '\left';
$TeX = $left . $mult . $right;

$TeX = '\left(' . $TeX . '\right)' if $addparens;
Expand Down
2 changes: 1 addition & 1 deletion lib/Parser/Function.pm
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ sub TeX {
$name = $fn->{TeX} if defined($fn->{TeX});
foreach my $x (@{ $self->{params} }) { push(@pstr, $x->TeX) }
if ($fn->{braceTeX}) { $TeX = $name . '{' . join(',', @pstr) . '}' }
else { $TeX = $name . "$power" . '\!\left(' . join(',', @pstr) . '\right)' }
else { $TeX = $name . "$power" . '\mathopen{}\left(' . join(',', @pstr) . '\right)' }
$TeX = '\left(' . $TeX . '\right)'
if $showparens eq 'all'
or $showparens eq 'extra'
Expand Down

0 comments on commit c3ad44f

Please sign in to comment.