mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
- Identifiers are now evaluated as variables instead of being plain values - Constants like `left` or `bold` are stored as dynamic values containing the respective rust types - We now distinguish between arrays and dictionaries to make things more intuitive (at the cost of a bit more complex parsing) - Spans were removed from collections (arrays, dictionaries), function arguments still have spans for the top-level values to enable good diagnostics
26 lines
574 B
XML
26 lines
574 B
XML
// Test configuring page sizes and margins.
|
|
|
|
// Set width.
|
|
[page width: 50pt][High]
|
|
|
|
// Set height.
|
|
[page height: 50pt][Wide]
|
|
|
|
// Set all margins at once.
|
|
[page margins: 40pt][
|
|
[align top, left][TL]
|
|
[align bottom, right][BR]
|
|
]
|
|
|
|
// Set individual margins.
|
|
[page left: 0pt | align left][Left]
|
|
[page right: 0pt | align right][Right]
|
|
[page top: 0pt | align top][Top]
|
|
[page bottom: 0pt | align bottom][Bottom]
|
|
|
|
// Ensure that specific margins override general margins.
|
|
[page margins: 0pt, left: 40pt][Overriden]
|
|
|
|
// Flip the page.
|
|
[page "a10", flip: true][Flipped]
|