mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
- No colon between function name and arguments, just whitespace - "Named" arguments (previously "keyword" arguments) use colon instead of equals sign
24 lines
536 B
XML
24 lines
536 B
XML
// Test configuring the size and fitting behaviour of images.
|
|
|
|
// Fit to width of page.
|
|
[image "res/rhino.png"]
|
|
|
|
// Fit to height of page.
|
|
[page width: 270pt][
|
|
[image "res/rhino.png"]
|
|
]
|
|
|
|
// Set width explicitly.
|
|
[image "res/rhino.png", width: 50pt]
|
|
|
|
// Set height explicitly.
|
|
[image "res/rhino.png", height: 50pt]
|
|
|
|
// Set width and height explicitly and force stretching.
|
|
[image "res/rhino.png", width: 25pt, height: 50pt]
|
|
|
|
// Make sure the bounding-box of the image is correct.
|
|
[align bottom, right][
|
|
[image "res/tiger.jpg"]
|
|
]
|