2

I am trying to use the unicode character ⦡ (U+29A1) as a binary operator. I almost got it to work using the following:

\usepackage{fontspec}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{unicode-math}
\setmathfont{Symbola}

\newcommand{\ang}{\mathbin{⦡}}

Example: $x\ang y$ works great.

Problem: $\mathbb{R}^n$ looks weird.

As indicated, the issue is the side-effect on exponents. Any tips?

EDIT

Issue is almost fixed, but I can't help but notice this weird placement of the n:

New settings:

enter image description here

Default amssymb:

enter image description here

Admittedly now I'm getting obsessive.

1 Answer 1

2

Set the math font for that one symbol only, not all math symbols. As Symbola has no OpenType math table, math layout will break in many ways. The following should work:

\setmathfont{Latin Modern Math} % Or your math font of choice
\setmathfont{Symbola}[range=\sphericalangleup,
                      Scale=MatchUppercase]

\newcommand{\ang}{\mathbin{\sphericalangleup}}

The unicode-math package declares U+29A1 as \sphericalangleup, but gives it \mathord spacing. The default math font does not have it, but some math fonts that do are: XITS Math, STIX Two Math, Fira Math and New Computer Modern Math. The albatross command can give you a complete list. Usually, if you want to stick with a clone of Computer Modern, New Computer Modern is your best bet. So,

% Load amsmath, fontspec, unicode-math, etc. first if they need
% special options.

\usepackage{newcomputermodern} % Add [regular] for the original weight

\newcommand{\ang}{\mathbin{\sphericalangleup}}
5
  • Thanks, that is much better. However, my $\mathbb R$ is now sans-serif for some reason. Any way to fix that?
    – WillG
    Commented Jun 5, 2021 at 1:29
  • @WillG Load another \mathbb alphabet you like better. For example, \setmathfont{TeX Gyre Pagella Math}[range=bb, Scale=MatchUppercase] has a serif \mathbb.
    – Davislor
    Commented Jun 5, 2021 at 1:32
  • Thanks that helps. Now I'm getting obsessive, but the n in the R^n is weirdly floating off to the side, noticeably farther right and lower down than it appears by default with amssymb. Is this fixable?
    – WillG
    Commented Jun 5, 2021 at 1:46
  • @WillG Not easily, without choosing a different font.
    – Davislor
    Commented Jun 5, 2021 at 4:39
  • Got it. I'm having a separate but related issue now, for which I've started another question: tex.stackexchange.com/q/600025/179653
    – WillG
    Commented Jun 5, 2021 at 8:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .