6

In unimath-symbols.pdf, the open colon ⦂ (U+02982), called the Z notation type colon, is declared as \mathbin. As far as I know, you use this type colon as demonstrated in the following example. The lines

x ⦂ int
f ⦂ int → int

declare a nullary symbol x of integer type (or integer sort, depending on your vocabulary) and a unary function symbol f of type int → int. Therefore, the open colon ⦂ is a relation symbol, implying that it should be \mathrel. See, e.g., http://czt.sourceforge.net/latex/z/czt-guide.pdf (though as of today, this symbol is probably not used in Z).

  • Any idea why the symbol was listed as \mathbin?
  • Did we hit a documentation / interpretation error?

UPDATE: After reading Short Math Guide for LaTeX, I'm no more sure that the spacing around the fat open colon must be symmetrical. Symmetrical spacing was just an approach of using : for the typing judgements so far (which I and apparently thousands of other people used for many years) and an approach of a few other sources, e.g., Formal Specification -- Z Notation -- Syntax, Type and Semantics. So, if someone has a strong counter-opinion on this, he/she please feel free to advocate for \mathpunct. But in any case, \mathbin is wrong.

  • 1
    You should probably ask Will Robertson in person. He's the one maintaining unicode-math. Also, if it is used to declare a function it should probably be \mathpunct (just like \colon). – Henri Menke Jun 17 '16 at 19:14
  • At least in AmsTeX, \colon is not "just" mathpunct and does not have symmetrical spacing: tex.stackexchange.com/a/37791/1340 – Blaisorblade Jul 10 '17 at 14:05
6

Ideally the default values of Unicode characters math classification woudl be specified by Unicode, just as the default classification as letter or non-letter and case changing properties are specified.

Unicode has a technical report

http://www.unicode.org/Public/math/revision-14/MathClassEx-14.html

Which lists these it is not currently formally part of the Unicode Character database but might be at some point.

There is code to read the Unicode text files directly into TeX, and this is currently used to set the default upper and lower case values in xe(la)tex and lua(la)tex. we did experiment with using mathclass-14.txt to set the default mathcodes but that is not currently enabled. however the files are on ctan and in tex distributions as

<texmf> /2016/texmf-dist/tex/generic/unicode-data/MathClass.txt

A normal colon : typically has two mathcode classifications, the default one makes it a \mathrel which typically gets even large space left and right, and \colon which is the same glyph but declared as \mathpunct which has no space to the left and a thin space to the right in most circumstances.

Looking at the Z specification at

http://www.open-std.org/jtc1/sc22/open/n3187.pdf

It's not over prescriptive about spacing but the usage seems to have symmetric space so matching the mathcode of : would seem reasonable.

MathML's default operator dictionary has it infix with a thin spacing so more like \mathbin than \mathrel.

There is a comment link at the bottom of the MathClassEx-14.html but since one of the authors of the technical report is a regular here she's already discussed this in chat

To suggest a change to unicode-math, best to open an issue on github

  • @MarkMcGregor note mathbin and mathrel both normally give symmetric spacing, with mathrel using larger space, I think fence is just a mistake, making it the same as colon (mathbin) as unicode-math does is I suspect the most natural thing, but it's certainly not unreasonable to argue for mathrel. – David Carlisle Jun 18 '16 at 8:47
  • 1
    @MarkMcGregor it is best not to put too much symantic significance into the tex math classifications, it s all about spacing. \matbin means "get the spacing applied to a typical binary operator" it does not mean "this is a binary operator" for example Knuth assigns ! as a closing delimiter like ) as that happens to work well for factorial usage. – David Carlisle Jun 18 '16 at 10:24
  • 1
    @MarkMcGregor also the mathematical difference between a relation and a binary operation returning truth values is small or non existent depending on your mathematical foundations so there's never a clear cut distinction between mathbin and mathrel – David Carlisle Jun 18 '16 at 10:27
  • @MarkMcGregor good to practice arguments but it's not me you need to convince:-) order should be I think get Unicode mathclass.txt fixed (as that's clearly just wrong) then get unicode-math to match whatever they do. – David Carlisle Jun 18 '16 at 10:55

Your Answer

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