mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
This adds overridable functions that markup desugars into. Specifically: - \ desugars into linebreak - Two newlines desugar into parbreak - * desugars into strong - _ desugars into emph - = .. desugars into heading - `..` desugars into raw
24 lines
266 B
Typst
24 lines
266 B
Typst
// Test emphasis toggle.
|
|
|
|
---
|
|
// Basic.
|
|
_Emphasized!_
|
|
|
|
// Inside of words.
|
|
Partly em_phas_ized.
|
|
|
|
// Scoped to body.
|
|
#rect[_Scoped] to body.
|
|
|
|
---
|
|
#let emph = strong
|
|
_Strong_
|
|
|
|
#let emph() = "Hi"
|
|
_, _!
|
|
|
|
#let emph = "hi"
|
|
|
|
// Error: 1-2 expected function, found string
|
|
_
|