8

I don't understand why \varnothing looks exactly the same than \emptyset in this MWE:

\documentclass[10pt,a4paper,french]{article}

\usepackage{babel} \usepackage{amssymb} \usepackage{mathtools} \usepackage[warnings-off={mathtools-colon,mathtools-overbracket},math-style=french]{unicode-math}

\usepackage[scale={0.75,0.8},footskip=1.5cm,heightrounded]{geometry}

\begin{document} [x\in\emptyset]

\[x\in\varnothing\]

\end{document}

Here is what I get: enter image description here

Yet, I load the package \amssymb.

Didier
  • 1,311

1 Answers1

8

Add

\show\emptyset
\show\varnothing

and you see

> \emptyset=\protected macro:
->\varnothing .
l.12 \show\emptyset

? > \varnothing=the character ∅. l.13 \show\varnothing

?

so \varnothing is the direct Unicode mapping and \emptyset is an alias to that.

You can use diameter U+2300 as the round form

enter image description here

\documentclass[10pt,a4paper,french]{article}

\usepackage{babel}

\usepackage{mathtools} \usepackage[warnings-off={mathtools-colon,mathtools-overbracket},math-style=french]{unicode-math}

\usepackage[scale={0.75,0.8},footskip=1.5cm,heightrounded]{geometry}

\begin{document} \show\emptyset \show\varnothing [x\in\emptyset]

\[x\in\varnothing\]

\[x \in ∅︀\]

\[x \in ⌀\]

\end{document}

David Carlisle
  • 757,742
  • Thank you @David. But how can I obtain the "rounded version" of \varnothing (the one we see in this post: https://tex.stackexchange.com/questions/14304/varnothing-undefined-control-sequence) – Didier Jul 01 '23 at 09:24
  • 2
    Unicode declined to consider the slashed 0 and slashed circle forms as distinct so mapped both to U+2205 you see same in HTML where ∅, ∅, ∅, ∅ all map to ∅ which is round or not depending on the font. – David Carlisle Jul 01 '23 at 09:32
  • 2
    https://unicode.org/L2/L2015/15268-slashed-zero.pdf @Didier – David Carlisle Jul 01 '23 at 09:37
  • @Didier that was accepted so in theory later unicode U+2205 U+FE00 is slashed zero but not supported by lua/xe latex (variant selectors are tricky) test your browser: ∅︀ or ∅ – David Carlisle Jul 01 '23 at 09:45
  • added Unicode 9 (2016) https://www.unicode.org/Public/9.0.0/ucd/StandardizedVariants.txt – David Carlisle Jul 01 '23 at 11:35
  • Thank you @David. Before using LuaLaTeX, I used PdfLaTeX and \varnothing was rounded like in Bourbaki (like in the pdf you mentioned). So I will read this pdf and try to obtain this rounded version. But I have doubts: if I understand you correctly (not sure about that because I am French), it depends on the font and maybe with modern Latin font, I won’t get it. Maybe with a \RenewDocumentCommand{\varnothing} and changing font, I Could get it? – Didier Jul 01 '23 at 11:59
  • @Didier I'm looking, or you could probably use diameter U+2300 ⌀ , but you do not have to use unicode-math if you prefer the ams fonts. You can use amssmb with luatex I added an example – David Carlisle Jul 01 '23 at 12:02
  • Thank you again @David. I like Unicode math because I can add French math style. And I use Latin modern Font (even though I find the characters too thin) because it uses rounded x and y in math mode (https://tex.stackexchange.com/questions/689860/rounded-y-in-unicode-fonts?noredirect=1#comment1712169_689860) – Didier Jul 01 '23 at 12:17
  • I type \AtBeginDocument{\RenewDocumentCommand{\varnothing}{}{⌀}} and it works fine – Didier Jul 01 '23 at 13:14