4

I know basically what \mathrel does when it's given a parameter: it typesets its parameter as though it were a mathematical relation for the purposes of spacing.

However, I have seen in several places the usage \mathrel{}, which seems to be treating the empty group as a relation. This doesn't square with how I've been told \mathrel is supposed to work; is there something else going on here?

In short, what does \mathrel (and, presumably, \mathbin, \mathop, etc.) do when its parameter is an empty group?

(I have seen this other question, but it didn't make sense to me and seemed to be not quite the same as mine.)

1 Answers1

4

In math mode {} makes an empty math atom (not just an empty group as in text mode) so \mathrel{} makes an empty atom that gets relation spacing.

Compare

$a {} b$ to $ a \mathrel{} b$

enter image description here

David Carlisle
  • 757,742
  • Thanks! I'm still confused as to why one would use such a thing, but you've explained what it is, at least. :) – Ptharien's Flame Mar 19 '16 at 22:35
  • 2
    @Ptharien'sFlame I'm not sure I would use that construct (empty \mathop more likely) but typical use is something that you can not surrpound like \middle or \left \right but you want to get the automatic relation spacing (including automatic lack of space in superscripts etc) – David Carlisle Mar 20 '16 at 09:32