diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-07 20:00:21 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-07 20:00:21 +0100 |
| commit | 68503b9a07b00bce3f4d377bcfe945452de815ea (patch) | |
| tree | 3719ef491b993c59b619ca215963000f4847e78f /tests/typ/layout/page.typ | |
| parent | 9730e785a885a4ab5fcc52ce705298654f82f9c2 (diff) | |
Redesigned template layout
Diffstat (limited to 'tests/typ/layout/page.typ')
| -rw-r--r-- | tests/typ/layout/page.typ | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/tests/typ/layout/page.typ b/tests/typ/layout/page.typ index 35f338f4..89d0f2fb 100644 --- a/tests/typ/layout/page.typ +++ b/tests/typ/layout/page.typ @@ -1,34 +1,33 @@ -// Test configuring page sizes and margins. +// Test the page class. + +--- +// Just empty page. +// Should result in auto-sized page, just like nothing. +#page[] + +--- +// Just empty page with styles. +// Should result in one conifer-colored A11 page. +#page("a11", flipped: true, fill: conifer)[] --- // Set width and height. +// Should result in one high and one wide page. #set page(width: 80pt, height: 80pt) [#set page(width: 40pt);High] [#set page(height: 40pt);Wide] -// Set all margins at once. -[ - #set page(margins: 5pt) - #place(top + left)[TL] - #place(bottom + right)[BR] -] - -// Set individual margins. -#set page(height: 40pt) -[#set page(left: 0pt); #align(left)[Left]] -[#set page(right: 0pt); #align(right)[Right]] -[#set page(top: 0pt); #align(top)[Top]] -[#set page(bottom: 0pt); #align(bottom)[Bottom]] - -// Ensure that specific margins override general margins. -[#set page(margins: 0pt, left: 20pt); Overriden] - // Flipped predefined paper. [#set page(paper: "a11", flipped: true);Flipped A11] --- +// Test page fill. #set page(width: 80pt, height: 40pt, fill: eastern) #text(15pt, "Roboto", fill: white, smallcaps: true)[Typst] +#page(width: 40pt, fill: none, margins: auto, top: 10pt)[Hi] -#set page(width: 40pt, fill: none, margins: auto, top: 10pt) -Hi +--- +// Just page followed by pagebreak. +// Should result in one forest-colored A11 page and one auto-sized page. +#page("a11", flipped: true, fill: forest)[] +#pagebreak() |
