When using colon (:) in math mode, it always appears equidistant from the objects on either side of it.

Observe this e.g. when typesetting $(a:b)$.

If one instead uses $(a \colon b)$, the colon is closer to the a, as it would be in ordinary writing.

On the other hand, if one typesets $(a;b)$, one finds that the semicolon is not equidistant between a and b, but closer to the a, as with the \colon command above.

So my question is: Is there a command that creates a semicolon equidistant from the objects to either side of it, as with the :?


1 Answer 1


LaTeX inherits a set of plain TeX commands that let you change the "class" of each character in math mode. The various classes determine how the TeX engine inserts white space in a formula.

There are 8 classes:

  • 0 = Ordinary \
  • 1 = Large operator \sum
  • 2 = Binary operator +
  • 3 = Relation =
  • 4 = Opening (
  • 5 = Closing )
  • 6 = Punctuation ,
  • 7 = Variable

I think ; is punctuation by default, but you can make it behave like a binary operator with \mathbin{;} or like a relation with \mathrel{;}.

The corresponding commands for the first 7 classes are: \mathord, \mathop, \mathbin, \mathrel, \mathopen, \mathclose, and \mathpunct.

See the TexBook, p.155 for more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.