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

Spacing around \leq and < in math mode

37 views
Skip to first unread message

Adam Funk

unread,
Oct 20, 2017, 6:00:07 AM10/20/17
to
$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,
Adam

Ulrike Fischer

unread,
Oct 20, 2017, 6:14:29 AM10/20/17
to
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/

Dan Luecking

unread,
Oct 20, 2017, 4:43:33 PM10/20/17
to
On Fri, 20 Oct 2017 10:51:01 +0100, Adam Funk <a24...@ducksburg.com>
wrote:

>$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
as it can confuse a reader trying to parse your formulas

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

unread,
Oct 21, 2017, 8:50:02 AM10/21/17
to
Am Fri, 20 Oct 2017 15:43:29 -0500 schrieb 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
looks bad) I would also recommend to adapt \thickmuskip to get an
uniform look.

Adam Funk

unread,
Oct 24, 2017, 4:00:09 AM10/24/17
to
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)

Adam Funk

unread,
Oct 24, 2017, 4:15:08 AM10/24/17
to
On 2017-10-21, Ulrike Fischer wrote:

> Am Fri, 20 Oct 2017 15:43:29 -0500 schrieb 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
> looks bad) I would also recommend to adapt \thickmuskip to get an
> 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

unread,
Oct 25, 2017, 2:32:32 AM10/25/17
to
Dan Luecking <Look...@uark.edu> writes:
>
> 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.

Or try a local partial reduction like

$\thickmuskip=.5\thickmuskip % around "\ge" operator
x \ge 2$

or =\thinmuskip or as preferred. A little less space can be good if
repeating a few times in text, or a merely qualifying condition.
0 new messages