Discussion:
Adding a space in math-mode
(too old to reply)
Joseph Turian
2005-03-12 02:52:01 UTC
Permalink
Let's say I have the following formula:
$f(x) = 1 \forall x$

But this is poor, since there should be a space between 1 and the
\forall.

Is there any difference between:
$f(x) = 1\ \forall x$
and
$f(x) = 1~\forall x$

Does the '~' have a fixed length?

Joseph
Steven Hirst
2005-03-12 12:01:55 UTC
Permalink
Post by Joseph Turian
$f(x) = 1 \forall x$
But this is poor, since there should be a space between 1 and the
\forall.
$f(x) = 1\ \forall x$
and
$f(x) = 1~\forall x$
Does the '~' have a fixed length?
Joseph
~ is just a standard non-breaking space. I believe that it follows the
usual Latex formatting rules in terms of whitespace.

Steve.
El Bandolero
2005-03-12 17:20:38 UTC
Permalink
Post by Joseph Turian
$f(x) = 1 \forall x$
$f(x) = 1\, \forall x$
if you need more
$f(x) = 1 \quad \forall x$
if you need less
$f(x) = 1 \; \forall x$

HTH
--
ciao
El Bandolero

Lo sai che al bar ho trovato il giornale occupato
e mi stavo per leggere addosso?
Enrico Gregorio
2005-03-12 18:49:57 UTC
Permalink
Post by Joseph Turian
$f(x) = 1 \forall x$
But this is poor, since there should be a space between 1 and the
\forall.
$f(x) = 1\ \forall x$
and
$f(x) = 1~\forall x$
Does the '~' have a fixed length?
There is no difference in the final spacing, but the first one
could be split across lines.

Anyway, consider writing "$f(x)=1$, for all~$x$", unless
you are typesetting some concise table.

Ciao
Enrico
Steven Hirst
2005-03-12 22:25:51 UTC
Permalink
Post by Enrico Gregorio
Post by Joseph Turian
$f(x) = 1 \forall x$
But this is poor, since there should be a space between 1 and the
\forall.
$f(x) = 1\ \forall x$
and
$f(x) = 1~\forall x$
Does the '~' have a fixed length?
There is no difference in the final spacing, but the first one
could be split across lines.
Anyway, consider writing "$f(x)=1$, for all~$x$", unless
you are typesetting some concise table.
Ciao
Enrico
\forall is a maths notation which displays an upside down 'A' :)

S.
Joseph Turian
2005-03-13 00:39:21 UTC
Permalink
Post by Enrico Gregorio
Anyway, consider writing "$f(x)=1$, for all~$x$", unless
you are typesetting some concise table.
Agreed, this does read better.

This isn't the only case of spacing in math-mode that I need---most
notably, I want ", " in my subscripts of summations---so it was just an
example.

Thank you everyone for your helpful comments.

Joseph

Continue reading on narkive:
Loading...