I wonder if there is a way to typeset hyphen in math mode. For example,
LaTeX will take $A-B$ as A minus B, thus leaving extra spaces.
Thanks in advance,
WANG Wei
I don't know about hyphen, but $A{-}B$ produces a minus without extra
spaces.
(Rationale: normally, - is a math operator?relation? and automatically
gets spaces. But a maths expression inside {} is treated as a math
'ordinary' and so doesn't.)
--
Lucian Wischik, Queens' College, Cambridge CB3 9ET. www.wischik.com/lu
If you mean the regular hyphen, I think you say \mbox{-} inside
the math environment.
--
Julian V. Noble
Professor of Physics
j...@virginia.edu
Galileo's Commandment:
"Science knows only one commandment: contribute to science."
-- Bertolt Brecht, "Galileo".
> WANG Wei <fer...@ust.hk> wrote:
> >I wonder if there is a way to typeset hyphen in math mode. For example,
> >LaTeX will take $A-B$ as A minus B, thus leaving extra spaces.
>
> I don't know about hyphen, but $A{-}B$ produces a minus without extra
> spaces.
>
For an actual, genuine, hyphen (not a minus sign without its spaces, but
a shorter hypen): $A$-$B$