johanvx / typst-undergradmath

A Typst port of undergradmath
Creative Commons Attribution Share Alike 4.0 International
109 stars 7 forks source link

varnothing used by LaTeX #10

Closed Myriad-Dreamin closed 1 year ago

Myriad-Dreamin commented 1 year ago

The \varnothing used by LaTeX is not essentially a "nothing", which is stolen from the symbol "diameter", e.g. ⌀10cm.

Try it:

#let varnothing = $\u{2300}$

See also unimath and search U+02300 or \diameter

johanvx commented 1 year ago

While it's semantically bad, I'll use the Typst symbol diameter in the document for the \varnothing in LaTeX. Thanks for letting me know the \varnothing thing!

My observations

If copy the characters in Line U+02205 of newcm-unimath-symbols and paste them in Compart/Unicode, it can be easily found that they're all Empty Set U+2205. The characters in Line U+02300 are Diameter Sign U+2300. Both are reasonable.

varnothing

diameter

In Subsection 13.3 of newcm-doc, however, the \varnothing character $\varnothing$ is Diameter Sign U+2300. This is a case of stealing the symbol \diameter.

Subsection 13.3 of newcm-doc

Myriad-Dreamin commented 1 year ago

By your comment, I found that some fonts tried to make the shape of nothing look like diameter. It brings a good news that the builtin font "Fira Sans" can help us define the varnothing with correct semantics, and without using unicode.

#let varnothing = $text(font: "Fira Sans", nothing)$

I compared 3 different approaches to defining varnothing. Though, I still prefer the diameter symbol.

#let big = $text(font: "Fira Sans", nothing)$
#let regular = $diameter$
// diameter is undefined in Fira Sans
#let small = $text(font: "", diameter)$
johanvx commented 1 year ago

Sorry for the late reply. Would you mind creating a PR into main for this issue? The PR may need to:

Feel free to modify anything as long as necessary.