diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-06-26 15:47:37 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-06-26 15:47:37 +0200 |
| commit | d53c933e4d56e6c0484d81814779ddb1597ee032 (patch) | |
| tree | 493aa2f8397a26b11a1137d2882994686b5ac7de /tests/typ/layout/containers.typ | |
| parent | 784018124d13a4cfb050b8bf1fecd283cdc309db (diff) | |
Add box and block functions
Diffstat (limited to 'tests/typ/layout/containers.typ')
| -rw-r--r-- | tests/typ/layout/containers.typ | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/typ/layout/containers.typ b/tests/typ/layout/containers.typ new file mode 100644 index 00000000..b2835b5e --- /dev/null +++ b/tests/typ/layout/containers.typ @@ -0,0 +1,42 @@ +// Test the `box` and `block` containers. + +--- +// Test box in paragraph. +A #box[B \ C] D. + +// Test box with height. +Spaced \ +#box(height: 0.5cm) \ +Apart + +--- +// Test block over multiple pages. + +#page(height: 60pt) + +First! +#block[ + But, soft! what light through yonder window breaks? It is the east, and Juliet + is the sun. +] + +--- +// Test shrink-to-fit vs expand. + +// Top-level paragraph fills page +L #align(right)[R] + +// Block also fills page. +#block[ + L #align(right)[R] +] + +// Boxed paragraph respects width. +#box(width: 50pt)[ + L #align(right)[R] +] + +// Boxed paragraph without width doesn't expand. +#box[ + L #align(right)[R] +] |
