Re: [XeTeX] unicode-math package and \UnicodeMathSymbol command

28 views
Skip to first unread message

Ross Moore

unread,
Jun 21, 2009, 11:29:18 PM6/21/09
to uni...@googlegroups.com
Hi Joel, --- switching lists

On 22/06/2009, at 12:05 PM, Joel C. Salomon wrote:

> This is an issue Will knows about; see the GitHub bug tracker at
> <http://github.com/wspr/unicode-math/issues/#issue/7>. It’s the
> Unicode
> folks, not font designers, that have decided the issue (somewhat):
> ‘:’
> [U+003A] is called “Colon”, the punctuation mark, while
> ‘∶’ [U+2236] is
> the “Ratio” relation symbol.

I tried to add a comment, but don't really want to go through
the joining and login process.
Here's the blog, followed my comment:

>> Colon behaviour
>> 0 comments Created about 1 month ago by wspr
>> Using unicode-math, while in math mode, both : (0x003A) and \colon
>> produce a colon with punctuation spacing, while ∶ (0x2236)
>> produces a
>> colon with operator spacing. This leads to a situation where
>> 0x003A produces operator spacing without unicode-math but
>> punctuation spacing with unicode-math. Is this intended behavior?
>> (Making 0x003A produce operator spacing is probably worse, since
>> then you don't have a character that produces punctuation
>> spacing.) Also, in unicode-math.tex, ∶ (0x2236) is associated
>> with \colon even though it produces operator spacing; should it be
>> associated with something that produces operator spacing? (\vdotdot?)
>>


>>> It is not the intended behaviour. 0x003A should do the same in
>>> mathematics, whether unicode math is loaded or not. IMHO, this
>>> should be relation spacing, not punctuation. It should be coed
>>> this way within the XeTeX format.

>>> Traditionally \colon has been used for punctuation spacing.
>>> This should not change.
>>> The Unicode character at 0x2236 is called "ratio", as in "odds
>>> of 2:1 against".
>>> What is a good macro name? How about \unicoderatio ?
>>>
>>> In practice one might use
>>> \let\odds\unicoderatio % in the preamble
>>> "odds of $2\odds 1$ against"
>>> or
>>> \let\suchthat\unicoderatio % in the preamble
>>> consider the subset $S = \{ x \in X \suchthat 1 ≤ x ≤
>>> 3 \}$.
>>>
>>> I think it is better to use a macro like \unicoderatio that
>>> should remain unique,
>>> rather than directly define \odds or \suchthat , which risk a
>>> name clash, and which bias towards one use of the symbol when
>>> several usages are quite common.
>>>
>>>
>>> Hope this helps,
>>> Ross


> It seems that, somewhat counter-intuitively, ‘:’ [U+003A] ought
> to be a
> synonym for the mathrel ‘∶’ [U+2236], and ‘\colon’ must be
> used to
> include the actual [U+003A] mathpunct.

\colon is for normal colon usage. Seems logical enough to me.


>
> —Joel Salomon


Cheers,

Ross

------------------------------------------------------------------------
Ross Moore ro...@maths.mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 (0)2 9850 8955
Sydney, Australia 2109 fax: +61 (0)2 9850 8114
------------------------------------------------------------------------

Joel C. Salomon

unread,
Jun 22, 2009, 12:39:36 AM6/22/09
to Unicode Maths for Τεχ
Ross Moore wrote:
> I tried to add a comment, but don't really want to go through
> the joining and login process.

I added the comment in your name; hope that’s OK.

—Joel Salomon

Will Robertson

unread,
Jun 22, 2009, 1:03:04 AM6/22/09
to uni...@googlegroups.com
Hi Ross,

Thanks for summarising it for me here.
Joel, thanks for the comments on the XeTeX list.

On 22/06/2009, at 12:59 PM, Ross Moore wrote:

>> It seems that, somewhat counter-intuitively, ‘:’ [U+003A] ought
>> to be a
>> synonym for the mathrel ‘∶’ [U+2236], and ‘\colon’ must be
>> used to
>> include the actual [U+003A] mathpunct.
>
> \colon is for normal colon usage. Seems logical enough to me.


I'm not much of a mathematician, but it seems to me that there are two
competing uses for the typical colon character neither of which
necessarily should take precedence (except due to historical usage in
TeX and amsmath).

It's obvious that U+2236 should behave as a mathrel, as currently
specified in unicode-math.tex and taken from the STIX table. It should
probably *not* use the \colon macro name, however, since that name
would more rightfully be taken by U+003A. So let's say something like

\UnicodeMathSymbol{"02236}{\ratiocolon}{\mathrel}{ratio}%

(Maybe \mathcolon?) The thing I'm not sure about is what the behaviour
of : should be and whether it should customisable. I don't like to
break the (mostly) one-to-one mapping between unicode chars and macro
names, but I concede this is a special case. What about another
configuration option (i.e., package option) such as

colon-style=unicode

which does:

\UnicodeMathSymbol{"0003A}{\colon}{\mathpunct}{}
\def\colonrel{\mathrel{\colon}}

and the default TeX behaviour:

colon-style=TeX

which does

\UnicodeMathSymbol{"0003A}{\colonrel}{\mathrel}{}
\def\colon{\mathpunct{\colonrel}}

(The above snippets are untested but I think they get the meaning
across. In either case, \colonrel should produce an ascii colon with
rel spacing, and \colon produces either punct or rel spacing
accordingly.)

* * *

The advantage of [colon-style=TeX] is backwards compatibility. The
advantage of [colon-style=unicode] is that with a decent editor one
could write both types of math expression involving colons using plain
unicode input.

Any comments either way before I add this to my definite to-do list?

Will


Ross Moore

unread,
Jun 23, 2009, 4:22:23 PM6/23/09
to uni...@googlegroups.com
Hi Joel,

Sure; thanks.
And you fixed my missing letter too. :-)

I just looked back over when this \colon issue arose previously,
roughly 4 years ago. I'd forgotten all about that.

Reply all
Reply to author
Forward
0 new messages