\DeclareMathSymbol{C}{\mathord}{AMSb}{`C}
The first argument is the token (control sequences are valid here) you're defining. The second is the class, \mathord
, \mathbin
, \mathop
, \mathrel
, \mathopen
, \mathclose
, \mathpunct
, and 7 for variable (there's probably some \mathfoo
for variable, but I don't know what it is). The third is the font family. The fourth is the position within that family.
As would be expected, this particular case eventually expands to a \mathcode `C="0.43
. I don't really know what the missing hex digit (the family) is. \mathcode
is one of those mysterious (to me) primitives.
I believe the basic format is: \mathcode `x="cfpp
where x
is any literal character, c
is the class (0 = ordinary through 7 = variable), f
is the family, and pp
is the position within that family. cfpp
is a hexadecimal value, of course.
It occurs to me that you might want to use 7
instead of \mathord
to get a letter in the variable class. I'm not sure. Hopefully someone else can express an opinion on the matter.
I don't think it's available as a proper symbol, but you could use TikZ to draw it. By using the units em
or ex
, the symbol will scale corresponding to the surrounding text.
\documentclass{article}
\usepackage{tikz}
\newcommand\centerofmass{%
\tikz[radius=0.4em] {%
\fill (0,0) -- ++(0.4em,0) arc [start angle=0,end angle=90] -- ++(0,-0.8em) arc [start angle=270, end angle=180];%
\draw (0,0) circle;%
}%
}
\begin{document}
Center of Mass: \centerofmass
\Huge It scales! \centerofmass
\end{document}
Best Answer
As I said in my earlier comment, I think
\not
is supposed to work with\mathrel
objects, of which A is not (it is\mathord
).With that in mind, here are two possible ways.