typst/tests/suite/syntax/shorthand.typ
2024-04-13 08:39:45 +00:00

62 lines
759 B
Typst

// Test shorthands for unicode codepoints.
--- shorthand-nbsp-and-shy-hyphen ---
The non-breaking space~does work, soft-?hyphen also does.
--- shorthand-nbsp-width ---
// 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
--- shorthand-dashes ---
- En dash: --
- Em dash: ---
--- shorthand-ellipsis ---
#set text(font: "Roboto")
A... vs #"A..."
--- shorthands-math ---
// Check all math shorthands
$...$\
$-$\
$'$\
$*$\
$!=$\
$:=$\
$::=$\
$=:$\
$<<$\
$<<<$\
$>>$\
$>>>$\
$<=$\
$>=$\
$->$\
$-->$\
$|->$\
$>->$\
$->>$\
$<-$\
$<--$\
$<-<$\
$<<-$\
$<->$\
$<-->$\
$~>$\
$~~>$\
$<~$\
$<~~$\
$=>$\
$|=>$\
$==>$\
$<==$\
$<=>$\
$<==>$\
$[|$\
$|]$\
$||$