For completeness, I provide the original solution, on the assumption that the font needed is not already loaded by TeX. Afterward, I show a streamlined solution, since cmsy
(Computer Modern symbol font family) has already been loaded by default.
The Long Way:
Here, after mathabx
is loaded, I declare and define the cmsy
font family, found on p.431 of the TeXbook. cmsy
is the name that the Computer Modern symbol font family is known as, to TeX. It is called a font "family" because the font is provided in different sizes, and \DeclareFontShape
tells which glyph set (member of the family) to use depending on the fontsize that is requested.
I create a new symbol font Xcmsy
that points to the cmsy
font family. I then declare the symbol \cmemptyset
to be of categorymathord
, and found in slot 59 of the Xcmsy
font.
If you uncomment the two fonttable
lines of code, you will see the cmsy font printed out in tabular form, and can verify that the empty set glyph is found at slot 59.
\documentclass{article}
\usepackage{mathabx}
% =============================================
%Import symbols from font cmsy without importing the whole package
% =============================================
\DeclareFontFamily{U} {cmsy}{}
\DeclareFontShape{U}{cmsy}{m}{n}{
<-8> cmsy7
<8-9> cmsy8
<9-10> cmsy9
<10-> cmsy10}{}
\DeclareSymbolFont{Xcmsy} {U} {cmsy}{m}{n}
\DeclareMathSymbol{\cmemptyset}{\mathord}{Xcmsy}{59}
% =============================================
%\usepackage{fonttable}
\begin{document}
\centering
$\emptyset \cmemptyset$
%\tiny\fonttable{cmsy8}
\end{document}
The Short Way (for Computer Modern only):
Because Computer Modern is already loaded by TeX as the default font, much of the prior method is redundant and the answer can be streamlined (as noted by GuM):
\documentclass{article}
\usepackage{mathabx}
% =============================================
\DeclareMathSymbol{\cmemptyset}{\mathord}{symbols}{59}
% =============================================
\begin{document}
\centering
$\emptyset \cmemptyset$
\end{document}
\varnothing
(amssymb
package) what you're looking for?\emptyset
fromamssymb
. Maybe I should add it in the question.\emptyset
doesn't come from theamssymb
fonts, but from the standard Computer Modern math fonts. Its variant from theamssymb
fonts is precisely\varnothing
.\varnothing
symbol without having to load the wholeamssymb
package?