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
23 lines
264 B
Typst
23 lines
264 B
Typst
// Test strong toggle.
|
|
|
|
---
|
|
// Basic.
|
|
*Strong!*
|
|
|
|
// Inside of words.
|
|
Partly str*ength*ened.
|
|
|
|
// Scoped to body.
|
|
#rect[*Scoped] to body.
|
|
|
|
---
|
|
#let strong = emph
|
|
*Emph*
|
|
|
|
#let strong() = "Bye"
|
|
*, *!
|
|
|
|
#let strong = 123
|
|
// Error: 1-2 expected function, found integer
|
|
*
|