\circ in unicode?

176 views
Skip to first unread message

Will Robertson

unread,
Sep 25, 2009, 7:38:27 AM9/25/09
to uni...@googlegroups.com, Barbara Beeton
Hello,

Joel has pointed out to me that there's no mapping for TeX's \circ in
unicode (well, at least in the version of the STIX table I used to
generate my slot table). The context is amsmath's testmath. There's
something like this "u\overset{\circ}\to W" that produces

texshop_image.pdf
pastedGraphic.pdf
texshop_image.pdf
texshop_image.pdf

Joel C. Salomon

unread,
Sep 25, 2009, 12:56:24 PM9/25/09
to uni...@googlegroups.com
Will Robertson wrote:
> Joel has pointed out to me that there's no mapping for TeX's \circ in
> unicode (well, at least in the version of the STIX table I used to
> generate my slot table). The context is amsmath's testmath.
<snip>
> In summary, I'm going to be calling U+25CB \bigcirc and U+2218 \circ.
> Does this make sense to everybody and/or do you think it's a good idea?

Well, the Comprehensive LaTeX Symbol List includes \circ in Table 40,
Binary Operators, so that would seem to be correct.

> There's something like this "u\overset{\circ}\to W" that produces

<snip>
> Furthermore, the original amsmath composed symbol could be created with
>
> \UnicodeMathSymbol{"0030A}{\ocirc}{\mathaccent}{ring}%
>
> by writing "u \mathbin{\ocirc\to} W" and receiving: (from Cambria Math)
<figure>
> which I think looks quite good.

Yeah, \circ is heavily overloaded. It’s even used as the degree symbol
(i.e., \ensuremath{^\circ}) and in homebrew operator composition. Those
other uses ought to be made unnecessary through the large set of Unicode
operators on the one hand; on the other hand nobody can expect such code
to produce nice results with anything other than the CM fonts.

Set \circ to U+2218 (Ring Operator, ‘∘’) and ignore the other uses of
the symbol. (I’ve change all instances of “\overset{\circ}\to” to
“\mathbin{\ocirc\to}” in my amsmath-testmath-hack.tex for now. When the
Latin Modern folks release the Unicode math font they’re working on,
it’ll be nice to revert this and see it the spacing is the same as the
original.)

—Joel Salomon

Will Robertson

unread,
Sep 25, 2009, 11:15:33 PM9/25/09
to uni...@googlegroups.com
On 26/09/2009, at 2:26 AM, Joel C. Salomon wrote:

> (I’ve change all instances of “\overset{\circ}\to” to
> “\mathbin{\ocirc\to}”

Now that I think about it some more, I wonder if the behaviour of
XeTeX is correct here.

pastedGraphic.pdf

Chris Rowley

unread,
Sep 26, 2009, 3:02:33 PM9/26/09
to Unicode maths for TeX


On Sep 25, 5:56 pm, "Joel C. Salomon" <joelcsalo...@gmail.com> wrote:
> Will Robertson wrote:
> > Joel has pointed out to me that there's no mapping for TeX's \circ in  
> > unicode (well, at least in the version of the STIX table I used to  
> > generate my slot table). The context is amsmath's testmath.
> <snip>
> > In summary, I'm going to be calling U+25CB \bigcirc and U+2218 \circ.  
> > Does this make sense to everybody and/or do you think it's a good idea?
>

> Yeah, \circ is heavily overloaded.
Says it all, I guess.
A more polite way would be to say that it is a higher-order name
rather than a glyph name: not surprising for something so easy to
think of and write.

I would therefore advise not using it directly as the name of any
character/slot.

The name model has to provide a level for such 'higher-level names',
even wgen using such a rich character set (or mnaybe because we now
have such a rich character set).

But you should check with bb on why \circ was not assigned to a slot
-- Correction: why no slot was named 'circ'.
She may also have a list of other such 'TeX names'.

Will wrote --
> but it may be something to revisit in XeTeX itself.
I am unclear in what sense 'XeTeX itself' does anything with \circ
etc.
Surely it 'itself' handles only XeTeX primitives.

Cheers, chris

Will Robertson

unread,
Sep 27, 2009, 9:25:48 PM9/27/09
to uni...@googlegroups.com, Barbara Beeton
On 27/09/2009, at 4:32 AM, Chris Rowley wrote:

> On Sep 25, 5:56 pm, "Joel C. Salomon" <joelcsalo...@gmail.com> wrote:
>> Will Robertson wrote:
>>> Joel has pointed out to me that there's no mapping for TeX's \circ
>>> in
>>> unicode (well, at least in the version of the STIX table I used to
>>> generate my slot table). The context is amsmath's testmath.
>> <snip>
>>> In summary, I'm going to be calling U+25CB \bigcirc and U+2218
>>> \circ.
>>> Does this make sense to everybody and/or do you think it's a good
>>> idea?
>>
>> Yeah, \circ is heavily overloaded.
> Says it all, I guess.
> A more polite way would be to say that it is a higher-order name
> rather than a glyph name: not surprising for something so easy to
> think of and write.
>
> I would therefore advise not using it directly as the name of any
> character/slot.

While I see what you mean here, I'd rather just define \circ as U+2218
rather than give it a longer (even more descriptive) name and then
writing \def\circ{\circlenamedescription}. Because I think the meaning
of $x\circ y$ is unambiguous enough; it's simply the overloaded uses
of it (for things like \overset{\circ}{\to} and \def\degree{$^{\circ}
$} ) that need to be phased out in favour of their modern (i.e.,
unicode) equivalents.

> But you should check with bb on why \circ was not assigned to a slot
> -- Correction: why no slot was named 'circ'.
> She may also have a list of other such 'TeX names'.

I'm sorry to keep pestering you, Barbara :)

> Will wrote --
>> but it may be something to revisit in XeTeX itself.
> I am unclear in what sense 'XeTeX itself' does anything with \circ
> etc.
> Surely it 'itself' handles only XeTeX primitives.

I have to check the behaviour of TeX in this regard, but it would be
appropriate, I think, if [math accent]+[math bin/rel/whatever] had the
same math class as [math bin/rel/...] rather than [math ord].

<goes and checks>

Oh, so regular TeX does this as well:

$x\hat=y\quad x=y$
\bye

In that case I guess I'll leave things as they are, for now.

Will

Barbara Beeton

unread,
Sep 28, 2009, 9:06:15 AM9/28/09
to Will Robertson, uni...@googlegroups.com
will robertson writes,

Joel has pointed out to me that there's no mapping for TeX's \circ in
unicode (well, at least in the version of the STIX table I used to generate

my slot table). [...]

but there is -- \circ is assigned to U+2218.
however, because of the rather large number
of sizes of geometric shapes, a proposed
sizing heirarchy was set up; see unicode
tech report 25, pp.19-22:

http://www.unicode.org/reports/tr25/

for this reason an alternate name based on
the size was also assigned for stix, and
that's what was chosen by the font packager
(who is not a tex user, and who didn't ask
before packaging).

In summary, I'm going to be calling U+25CB \bigcirc and U+2218 \circ.
Does this make sense to everybody and/or do you think it's a good idea?

i agree with these name assignments; they
are the "original" tex names used in the
stix collection. (sorry you missed that,
will.)

i also agree that in tex, \circ is badly
overloaded. consider the size restrictions
on fonts and other resources when tex was
created; even though these restrictions
have largely been lifted, habit still
results in the old usage.
-- bb

Will Robertson

unread,
Sep 28, 2009, 9:42:58 AM9/28/09
to Barbara Beeton, uni...@googlegroups.com
On 28/09/2009, at 10:36 PM, Barbara Beeton wrote:

> but there is -- \circ is assigned to U+2218.

Oops, I think my awk script got confused here; in my version of your
stix-tbl, 2218 has three lines assigned to it and my script blindly
chose the first for choosing the TeX name. Hence the long-winded one,
rather than \circ.

> however, because of the rather large number
> of sizes of geometric shapes, a proposed
> sizing heirarchy was set up; see unicode
> tech report 25, pp.19-22:
>
> http://www.unicode.org/reports/tr25/

Aha. I was obviously aware of tr25 but I missed this section while
looking into the \circ situation. (For reasons that are now apparent
to me, see below.)

> In summary, I'm going to be calling U+25CB \bigcirc and U+2218
> \circ.
> Does this make sense to everybody and/or do you think it's a good
> idea?
>
> i agree with these name assignments; they
> are the "original" tex names used in the
> stix collection. (sorry you missed that,
> will.)

Me too :)
Looking through your original sources and my generated table yields
some significant omissions (including several of these empty circle
shapes -- hence my confusion), so I need to revisit my original code.

And next time check *properly* in stix-tbl before asking!

Thanks always,
Will

Chris Rowley

unread,
Sep 29, 2009, 8:16:11 AM9/29/09
to Unicode maths for TeX
Thanks enormously for sorting us out on this one, Barbara.

But a general observation about macro-style programming (that may
generalise):

Indirection is a Good Thing^\tm

Thus, whilst it is moot in this particular example, I would in
general
disagree with Will's favoured lack of indirection here:

>> I'd rather just define \circ as U+2218
>> rather than give it a longer (even more descriptive) name and then
>> writing \def\circ{\circlenamedescription}

However, since he is the boss on this project, I will shut up
(for a few weeks/days/...:-).

chris

Will Robertson

unread,
Sep 29, 2009, 8:19:39 AM9/29/09
to uni...@googlegroups.com
On 29/09/2009, at 9:46 PM, Chris Rowley wrote:

> But a general observation about macro-style programming (that may
> generalise):
>
> Indirection is a Good Thing^\tm
>
> Thus, whilst it is moot in this particular example, I would in
> general
> disagree with Will's favoured lack of indirection here:
>
>>> I'd rather just define \circ as U+2218
>>> rather than give it a longer (even more descriptive) name and then
>>> writing \def\circ{\circlenamedescription}
>
> However, since he is the boss on this project, I will shut up
> (for a few weeks/days/...:-).

No, now that I see (and should have known about) the profusion of
different circle sizes, I think I'll go back to a less-direct naming
scheme and then define \circ and \bigcirc based on them.

(When I decided to name the slots \circ and \bigcirc directly, it was
with the mistaken assumption that there were only -- ! -- two circles
in unicode. Silly me.)

You're right, as always :)

Will

Reply all
Reply to author
Forward
0 new messages