# Empty set symbols confused

I am trying to typeset the symbol for empty set and using the answer of that question I chose \varnothing but when I used it I got the symbol that is described to be \emptyset and vice versa. Also when I use the amssymb package I get these errors:

Command \eth' already defined.

Command \backepsilon' already


If I don't useamssymb it still happens the same regarding those 2 symbols. What is happening? How can I get the right symbol? (Meaning the \varnothing)

\documentclass[12pt]{article}

\usepackage{fontspec}

\setmainfont
[
Ligatures=TeX,
Extension=.otf,
UprightFont=*,
BoldFont=*Bold,
ItalicFont=*It,
BoldItalicFont=*BoldIt,
Mapping=tex-text
]{GFSArtemisia}

\setsansfont[Mapping=tex-text]{GFSArtemisia.otf}

\usepackage[english,greek]{babel}

\usepackage[fleqn]{amsmath}

\usepackage{unicode-math}

\begin{document}

This is the problem:

\vspace{1cm}

$\varnothing \quad \emptyset$

\end{document}

• You should post a minimal compilable example, so we can reproduce your problem. – Manuel Oct 19 '14 at 23:36
• Ok I will edit my question. – Adam Oct 19 '14 at 23:36
• Now your question looks better. It seems that, by default \emptyset and \varnothing output the same symbol with unicode-math. – Manuel Oct 19 '14 at 23:46
• – Manuel Oct 19 '14 at 23:53
• – John Kormylo Oct 20 '14 at 3:10

There are not two distinct Unicode points for the empty set and its variant symbol (they are just different forms of the same symbol). Find a font that has the circle form and use it.

\documentclass[12pt]{article}

\usepackage[fleqn]{amsmath}
\usepackage{unicode-math}
\usepackage[english,greek]{babel}

\setmainfont[
Ligatures=TeX,
Extension=.otf,
UprightFont=*,
BoldFont=*Bold,
ItalicFont=*It,
BoldItalicFont=*BoldIt,
]{GFSArtemisia}

%\setsansfontMapping=tex-text]{GFSArtemisia.otf} %%% it's not sans serif!

\setmathfont{Latin Modern Math}
\setmathfont[range=\varnothing]{Asana Math}
\setmathfont[range=\int]{Latin Modern Math}

\begin{document}

This is the problem: $\varnothing\subseteq A\times B$

\end{document}


By the way, Latin Modern Math together with GFS Artemisia doesn't seem too nice a combination. If your document is math intensive, Artemisia for the Latin characters is not recommendable, in my opinion, because there's no matching math font.

Loading Latin Modern Math explicitly is necessary if another math font is chosen for some range of characters (it's a bug of fontspec, I'd say).

Note that, depending on the host system (say ShareLaTeX or WriteLaTeX) or your own system, the font may have to be loaded by file name and not by font name; in this case, the math fonts should be loaded with

\setmathfont{latinmodern-math.otf}
\setmathfont[range=\varnothing]{Asana-Math.otf}
\setmathfont[range=\int]{latinmodern-math.otf}

• Another thing that annoys me is the necessity of calling range=\int (or whatever) to get the correct “dimensions”. Wouldn't it be more clear if range=\varnothing imported nothing else but \varnothing? – Manuel Oct 20 '14 at 8:15
• @Manuel It's really annoying. Let's hope these bugs will be fixed soon. – egreg Oct 20 '14 at 8:45
• @egreg thank you I will try it! Can you please explain to me why except the first \setmathfont there are two more? – Adam Oct 20 '14 at 11:24
• @Adam The first and third \setmathfont shouldn't be necessary in an ideal world (Latin Modern Math is the default of unicode-math), but they're unfortunately needed if different fonts are used for some ranges. With only the second declaration, two bugs of unicode-math` show, which are corrected with the other two declarations. The order matters. – egreg Oct 20 '14 at 11:35
• @egreg I used these lines of code and I get errors: Undefined control sequence. l.37 \setmathfont {Latin Modern Math} LaTeX Error: Missing \begin{document}. Undefined control sequence. l.38 \setmathfont[range=\varnothing ]{Asana Math} Missing \$ inserted. <inserted text> – Adam Oct 20 '14 at 19:53