In programming -=
, +=
and other similar operators are quite popular. But I am unable to write such operator nicely in Latex equations.
For example when I use x += \frac{\partial C}{\partial x}
I get the following formula:
The problem is that +=
are kind of too far apart. Is there any latex operator which allows to write them closer together?
Best Answer
You can use
that will add no space between the + and the = signs and treat the whole block as a single relation symbol.
Of course a definition will do better:
and
would print