mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
37 lines
715 B
Typst
37 lines
715 B
Typst
// Test wrap.
|
|
|
|
---
|
|
#set page(height: 130pt)
|
|
#set text(0.7em)
|
|
|
|
#align(center)[
|
|
#text(1.3em)[*Essay on typography*] \
|
|
T. Ypst
|
|
]
|
|
|
|
#wrap body in columns(2, body)
|
|
Great typography is at the essence of great storytelling. It is the medium that
|
|
transports meaning from parchment to reader, the wave that sparks a flame
|
|
in booklovers and the great fulfiller of human need.
|
|
|
|
---
|
|
// Test wrap in content block.
|
|
A [_B #wrap c in [*#c*]; C_] D
|
|
|
|
---
|
|
// Test wrap style precedence.
|
|
#set text(fill: eastern, size: 1.5em)
|
|
#wrap body in text(fill: forest, body)
|
|
Forest
|
|
|
|
---
|
|
// Ok, whatever.
|
|
{
|
|
wrap body in 2 * body
|
|
2
|
|
}
|
|
|
|
---
|
|
// Error: 4-18 wrap is only allowed directly in code and content blocks
|
|
{ (wrap body in 2) * body }
|