Alex is right, the issue is one of spacing. In TeX, each item in the expression is assigned a "class" (like BIN
for binary operator, REL
for relation, OPEN
for an open delimiter, ORD
for an ordinary item like a variable, etc). The spacing between adjacent items is determined by their two classes. For something like \sin(x)
, the \sin
is class OP
(operator) and (
is class OPEN
, and there is no extra space between those. But MathObejcts always uses \left(...\right)
for parentheses, since its doesn't know how tall the contents of the parentheses will be, and a \left(...\right)
group has class INNER
. An OP
followed by an INNER
has a bit of space between them, and that means \sin\left(x\right)
will be badly spaced (as Alex points out). MathObjects uses \!
to remove that space, but there are situations when that doesn't work as well as it should, as you found out.
I have given it some thought, and perhaps a better idea would be to use \mathopen{\left(...\right)}
around the parenthesis group, and \mathclose{}
following it so that the parentheses appear to work as open
and close
items. This will get the correct spacing for \sin(x)
as well as 6(x^3-1)
. This could be done in both locations that identified by Alex.