typst/tests/typ/insert/square.typ
Laurenz 9950627789 Even shorter error annotations
Error annotations are now relative to the first following non-comment line.
2021-07-09 10:50:25 +02:00

31 lines
643 B
XML

// Test the `square` function.
---
Auto-sized square. \
#square(fill: eastern)[
#align!(center)
#pad!(5pt)
#font!(fill: white, weight: bold)
Typst
]
---
// Length wins over width and height.
// Error: 09-20 unexpected argument
// Error: 22-34 unexpected argument
#square(width: 10cm, height: 20cm, length: 1cm, fill: rgb("eb5278"))
---
// Test height overflow.
#page!(width: 75pt, height: 100pt)
#square(fill: conifer)[
But, soft! what light through yonder window breaks?
]
---
// Test width overflow.
#page!(width: 100pt, height: 75pt)
#square(fill: conifer)[
But, soft! what light through yonder window breaks?
]