# Math Help - How to force unary minus (negative sign)?

1. ## How to force unary minus (negative sign)?

Sometimes latex treats some code like $-0.4567$ as a binary minus operator and hence adds extra spacing like $3-4$, even though there is nothing to the left of the minus (in an align* environment).

Is it possible to force less space? I know of \! but that doesn't remove as much space as the negation operator. I suppose \! doesn't look too bad though, so it's not a big deal.

2. $\text{-}0.4567$ ?

3. Yeah, it works in this case, but not in:
Code:
  \begin{align*}
J_1(0.35)  &\approx  0 + (0.35-0)\left[0.497504+(0.35-0.2)\left[ \right.\right. \\
& -0.0371825+(0.35-0.4)\left[\right. \\ % on this line
& -0.05995\left.\right]\left.\right]\left.\right]\\ % and this one
&= {} 0.172331688
\end{align*}
Oh, oops, I didn't see the \text. But that makes the dash smaller than usual in the math env.

4. Originally Posted by scorpion007
Yeah, it works in this case, but not in:
Code:
  \begin{align*}
J_1(0.35)  &\approx  0 + (0.35-0)\left[0.497504+(0.35-0.2)\left[ \right.\right. \\
& -0.0371825+(0.35-0.4)\left[\right. \\ % on this line
& -0.05995\left.\right]\left.\right]\left.\right]\\ % and this one
&= {} 0.172331688
\end{align*}
To get the unary minus sign type {-0.0371825} instead of -0.0371825.
Code:
  \begin{align*}
J_1(0.35)  &\approx  0 + (0.35-0)\left[0.497504+(0.35-0.2)\left[ \right.\right. \\
& {-0.0371825} + (0.35-0.4)\left[\right. \\ % on this line
& {-0.05995} \left.\right]\left.\right]\left.\right]\\ % and this one
&= {} 0.172331688
\end{align*}

5. Originally Posted by flyingsquirrel
To get the unary minus sign type {-0.0371825} instead of -0.0371825.
Alternatively, type \mathord{-} instead of - .

6. Awesome, thanks guys! Strangely though, it messes up the alignment slightly... Oh well.

7. Originally Posted by scorpion007
Strangely though, it messes up the alignment slightly.
Yes, I noticed that. The problem is that the space gets removed on both sides of the minus sign, whereas you only want to lose it on the right. The amount of space that you need to restore is what TeX calls a "thin space", which you can insert by typing backslash comma. So replace -0.05995 by \,{-0.05995} or \,\mathord{-}0.05995 and everything will look good.

8. Oh wow! Thanks! You're a genius.