Closed CarrotDLaw closed 4 months ago
Thanks! I'll update the document in the near future.
I couldn't find a good way to express it while keeping 2-page layout, so I decided to 'invite' readers to read Typst Examples Book 😝 .
In the latest version of Typst, the following code can correctly output
nothing
in slashed circle shaped without any semantic ambiguities using the default New Computer Modern Math font. Alternative fonts or usingdiameter
asnothing
is no longer needed. More reference here.#show math.equation: text.with(features: ("cv01",)) $ nothing quad &"nothing" &"U+2205" \ diameter quad &"diameter" &"U+2300" $
The documentation of New Computer Modern font has been updated so the referenced section number might need to be updated as well.
Would the updated one be a bit misleading? When using cv01
, nothing
is not diameter
U+2300. nothing
can be correctly shown as U+2205 in slashed circle shape. The updated solution (let varnothing = math.diamter
) will makevarnothing
to be U+2300, which is wrong in semantic. The best solution should be simply enabling on cv01
for New Computer Modern font in Typst.
Would the updated one be a bit misleading? When using
CV01
,nothing
is NOTdiameter
U+2300.nothing
CAN be correctly shown as U+2205 in slashed circle shape. The updated solution (let varnothing = math.diamter
) will makevarnothing
to be U+2300, which is wrong in semantic. The best solution should be simply enabling onCV01
for New Computer Modern font in Typst.
I'm not so sure, but let's do a quick check:
copy-paste your code and add a Fira Math version duplication (https://typst.app/project/rZiKl-oIw0jTMEb5IAJ1p5) and download the compiled PDF.
#set page(width: auto, height: auto, margin: 1em)
#show math.equation: text.with(features: ("cv01",))
$
nothing quad &"nothing" &"U+2205" \
diameter quad &"diameter" &"U+2300"
$
#show math.equation: text.with(features: (:), font: "Fira Math")
$
nothing quad &"nothing" &"U+2205" \
diameter quad &"diameter" &"U+2300"
$
copy the two New Computer Modern Math symbols and paste them one by one to https://www.compart.com/en/unicode. It turns out that the two symbols are all “⌀” U+2300 Diameter Sign Unicode Character
.
do the same check with the two Fira Math symbols. It turns out that the first symbol is “∅” U+2205 Empty Set Unicode Character
and the second “⌀” U+2300 Diameter Sign Unicode Character
.
I have tried and you are right!! The reason my code works as expected is that I have been using the (Typst Preview Extension)[https://github.com/Enter-tainer/typst-preview] to check the output. It is correctly nothing
on the preview output, but not the final PDF output. Now I'm not sure whose fault it is.
Guiding readers to read the possible solutions and let them choose their own way is good enough.
In the latest version of Typst, the following code can correctly output
nothing
in slashed circle shaped without any semantic ambiguities using the default New Computer Modern Math font. Alternative fonts or usingdiameter
asnothing
is no longer needed. More reference here.The documentation of New Computer Modern font has been updated so the referenced section number might need to be updated as well.