Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to typeset hyphen in math mode?

1,788 views
Skip to first unread message

WANG Wei

unread,
Sep 3, 2001, 2:50:18 PM9/3/01
to
Hi,

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


Lucian Wischik

unread,
Sep 3, 2001, 3:27:43 PM9/3/01
to
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.

(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

Julian V. Noble

unread,
Sep 3, 2001, 4:25:55 PM9/3/01
to

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".

Philo D

unread,
Sep 3, 2001, 5:10:35 PM9/3/01
to
In article <9n0ljf$dt0$1...@pegasus.csx.cam.ac.uk>, Lucian Wischik
<ljw...@cus.cam.ac.uk> wrote:

> 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$

0 new messages