typst/tests/typ/func-page-metrics.typ
Laurenz 1c40dc42e7 Dynamic values, Types, Arrays, and Dictionaries 🚀
- 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
2021-01-02 19:37:10 +01:00

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]