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
32 lines
442 B
Typst
32 lines
442 B
Typst
// Test forced line breaks.
|
|
|
|
---
|
|
// Directly after word.
|
|
Line\ Break
|
|
|
|
// Spaces around.
|
|
Line \ Break
|
|
|
|
// Directly before word does not work.
|
|
No \Break
|
|
|
|
---
|
|
// Leading line break.
|
|
\ Leading
|
|
|
|
// Trailing before paragraph break.
|
|
Trailing 1 \
|
|
|
|
Trailing 2
|
|
|
|
// Trailing before end of document.
|
|
Trailing 3 \
|
|
|
|
---
|
|
#let linebreak() = [
|
|
// Inside the old line break definition is still active.
|
|
#circle(radius: 2pt, fill: #000) \
|
|
]
|
|
|
|
A \ B \ C \
|