diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-01-13 23:19:44 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-01-13 23:19:44 +0100 |
| commit | 272a4c228976466e9fa6cc100ad89f93dc5cc371 (patch) | |
| tree | ad02a6e57b07da061432d58ff0ca46d6777bdb97 /tests/typ | |
| parent | 1b53e27f270e3c040ee095573af9a5243980191a (diff) | |
Unbounded pages 🌌
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/func-hv.typ | 10 | ||||
| -rw-r--r-- | tests/typ/func-image.typ | 4 | ||||
| -rw-r--r-- | tests/typ/func-page.typ | 28 | ||||
| -rw-r--r-- | tests/typ/headings.typ | 5 |
4 files changed, 26 insertions, 21 deletions
diff --git a/tests/typ/func-hv.typ b/tests/typ/func-hv.typ index f930bc12..b32a645c 100644 --- a/tests/typ/func-hv.typ +++ b/tests/typ/func-hv.typ @@ -12,13 +12,13 @@ Add [h 10pt] [h 10pt] up // Relative to font size. Relative [h 100%] spacing +// Missing spacing. +// Error: 1:11-1:11 missing argument: spacing +Totally [h] ignored + // Swapped axes. -[page main-dir: rtl, cross-dir: ttb][ +[page main-dir: rtl, cross-dir: ttb, height: 80pt][ 1 [h 1cm] 2 3 [v 1cm] 4 [v -1cm] 5 ] - -// Missing spacing. -// Error: 1:11-1:11 missing argument: spacing -Totally [h] ignored diff --git a/tests/typ/func-image.typ b/tests/typ/func-image.typ index b0ca0357..1f94a66f 100644 --- a/tests/typ/func-image.typ +++ b/tests/typ/func-image.typ @@ -14,7 +14,7 @@ [image "res/rhino.png"] // Fit to height of page. -[page width: 270pt][ +[page height: 40pt][ [image "res/rhino.png"] ] @@ -29,7 +29,7 @@ // Make sure the bounding-box of the image is correct. [align bottom, right][ - [image "res/tiger.jpg"] + [image "res/tiger.jpg", width: 60pt] ] --- diff --git a/tests/typ/func-page.typ b/tests/typ/func-page.typ index 465a3469..49671e14 100644 --- a/tests/typ/func-page.typ +++ b/tests/typ/func-page.typ @@ -1,28 +1,36 @@ // Test configuring page sizes and margins. -// Set width. -[page width: 50pt][High] - -// Set height. -[page height: 50pt][Wide] +// Set width and height. +[page width: 120pt, height: 120pt] +[page width: 40pt][High] +[page height: 40pt][Wide] // Set all margins at once. -[page margins: 40pt][ +[page margins: 30pt][ [align top, left][TL] [align bottom, right][BR] ] // Set individual margins. +[page height: 40pt] [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] +[page margins: 0pt, left: 20pt][Overriden] + +--- +// Test flipping. + +// Flipped predefined paper. +[page "a11", flip: true][Flipped A11] -// Flip the page. -[page "a10", flip: true][Flipped] +// Flipped custom page size. +[page width: 40pt, height: 120pt] +[page flip: true] +Wide --- // Test a combination of pages with bodies and normal content. @@ -40,7 +48,7 @@ Sixth --- // Test changing the layouting directions of pages. -[page main-dir: btt, cross-dir: rtl] +[page height: 50pt, main-dir: btt, cross-dir: rtl] Right to left! diff --git a/tests/typ/headings.typ b/tests/typ/headings.typ index de98eddb..0f364a9b 100644 --- a/tests/typ/headings.typ +++ b/tests/typ/headings.typ @@ -8,15 +8,12 @@ ####### Seven --- -// Is a heading. +// Heading vs. no heading. /**/ # Heading {[## Heading]} [box][### Heading] ---- -// Is no heading. - \# No heading Text with # hashtag |
