Discussion:
Spacing around \leq and < in math mode
2017-10-20 09:51:01 UTC
$0{\leq}x<i$

produces a lot more space on both sides of the "<" than around the "≤"
--- is that normal? I can fix it adequately with this

$0{\leq}x\!<\!i$

but even that has slightly more space around the "<" than around the
"≤". Is there a right way to make them match?

Thanks,
Ulrike Fischer
2017-10-20 10:14:12 UTC
$0{\leq}x<i$
produces a lot more space on both sides of the "<" than around the "≤"
--- is that normal? I can fix it adequately with this
$0{\leq}x\!<\!i$
but even that has slightly more space around the "<" than around the
"≤". Is there a right way to make them match?
When you add braces the symbol is no longer a relation but a normal
math symbol and this changes the spacing.

\documentclass[11pt]{book}

\begin{document}

$0\leq x<i$

$0{\leq} x{<}i$

\end{document}
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
2017-10-24 07:59:31 UTC
Post by Ulrike Fischer
$0{\leq}x<i$
produces a lot more space on both sides of the "<" than around the "≤"
--- is that normal? I can fix it adequately with this
$0{\leq}x\!<\!i$
but even that has slightly more space around the "<" than around the
"≤". Is there a right way to make them match?
When you add braces the symbol is no longer a relation but a normal
math symbol and this changes the spacing.
\documentclass[11pt]{book}
\begin{document}
$0\leq x<i$
$0{\leq} x{<}i$
\end{document}
Aha! I don't use relations in math mode very often & wasn't aware of
the distinction. I see that these

$0\leq x<i$

$0 \leq x < i$

produce the same result, so I guess I should just be more generous
with the spaces in future. Thanks.
--
Morality is doing what's right regardless of what you're
told. Obedience is doing what you're told regardless of what is
right. (attributed to H.L. Mencken)
Dan Luecking
2017-10-20 20:43:29 UTC
$0{\leq}x<i$
produces a lot more space on both sides of the "<" than around the "?"
--- is that normal? I can fix it adequately with this
$0{\leq}x\!<\!i$
but even that has slightly more space around the "<" than around the
"?". Is there a right way to make them match?
For consistency, one should always have the same space around
all relation symbols. The space that TeX uses for this is
called \thickmuskip, normally set to "5mu plus 5mu" (a stretchable
length).

You can set \thickmuskip = 0mu to make it disappear completely
from all relation symbols. This is almost certainly a bad idea

The unit "mu" that is used for this space has a value of
one-eighteenth of a \quad. It is defined this way so that it
will automatically adjust to being used in subscripts, where
the fonts and therefore the \quad, are smaller.

In very rare circumstances one might want a one-time use of
a smaller space. In this case Ulrike's solution can be used.
The braces causes 0mu of space to be used (usually). You can
then manually add a little more if that is too cramped.

Dan
To reply by email, change LookInSig to luecking
Ulrike Fischer
2017-10-21 12:49:56 UTC
Post by Dan Luecking
In this case Ulrike's solution
It wasn't meant as a "solution", only as a demo to show how braces
change the spacing. If the spacing should really be changed (imho it
uniform look.
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
2017-10-24 08:00:20 UTC
Post by Ulrike Fischer
Post by Dan Luecking
In this case Ulrike's solution
It wasn't meant as a "solution", only as a demo to show how braces
change the spacing. If the spacing should really be changed (imho it
uniform look.
Well, it was demo that contained the solution. I prefer the thicker
spaces around both relations. Thanks.
--
Random numbers should not be generated with a method chosen at random.
--- Donald Knuth
Kevin Ryde
2017-10-25 06:29:21 UTC
$\thickmuskip=.5\thickmuskip % around "\ge" operator x \ge 2$