mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
62 lines
636 B
Typst
62 lines
636 B
Typst
// Test shorthands for unicode codepoints.
|
|
|
|
---
|
|
The non-breaking space~does work, soft-?hyphen also does.
|
|
|
|
---
|
|
// Make sure non-breaking and normal space always
|
|
// have the same width. Even if the font decided
|
|
// differently.
|
|
#set text(font: "New Computer Modern")
|
|
a b \
|
|
a~b
|
|
|
|
---
|
|
- En dash: --
|
|
- Em dash: ---
|
|
|
|
---
|
|
#set text(font: "Roboto")
|
|
A... vs #"A..."
|
|
|
|
---
|
|
// Check all math shorthands
|
|
$...$\
|
|
$-$\
|
|
$'$\
|
|
$*$\
|
|
$!=$\
|
|
$:=$\
|
|
$::=$\
|
|
$=:$\
|
|
$<<$\
|
|
$<<<$\
|
|
$>>$\
|
|
$>>>$\
|
|
$<=$\
|
|
$>=$\
|
|
$->$\
|
|
$-->$\
|
|
$|->$\
|
|
$>->$\
|
|
$->>$\
|
|
$<-$\
|
|
$<--$\
|
|
$<-<$\
|
|
$<<-$\
|
|
$<->$\
|
|
$<-->$\
|
|
$~>$\
|
|
$~~>$\
|
|
$<~$\
|
|
$<~~$\
|
|
$=>$\
|
|
$|=>$\
|
|
$==>$\
|
|
$<==$\
|
|
$<=>$\
|
|
$<==>$\
|
|
$[|$\
|
|
$|]$\
|
|
$||$
|