diff options
Diffstat (limited to 'tests/typ/layout')
| -rw-r--r-- | tests/typ/layout/columns.typ | 6 | ||||
| -rw-r--r-- | tests/typ/layout/page-margin.typ | 10 | ||||
| -rw-r--r-- | tests/typ/layout/page-marginals.typ | 5 | ||||
| -rw-r--r-- | tests/typ/layout/page.typ | 2 |
4 files changed, 11 insertions, 12 deletions
diff --git a/tests/typ/layout/columns.typ b/tests/typ/layout/columns.typ index ce291fb2..1e77e6bc 100644 --- a/tests/typ/layout/columns.typ +++ b/tests/typ/layout/columns.typ @@ -16,7 +16,7 @@ // Test the `columns` function. #set page(width: auto) -#rect(width: 180pt, height: 100pt, padding: 8pt, columns(2, [ +#rect(width: 180pt, height: 100pt, inset: 8pt, columns(2, [ A special plight has befallen our document. Columns in text boxes reigned down unto the soil to waste a year's crop of rich layouts. @@ -40,7 +40,7 @@ a page for a test but it does get the job done. // Test the expansion behavior. #set page(height: 2.5cm, width: 7.05cm) -#rect(padding: 6pt, columns(2, [ +#rect(inset: 6pt, columns(2, [ ABC \ BCD #colbreak() @@ -73,7 +73,7 @@ D // Test an empty second column. #set page(width: 7.05cm, columns: 2) -#rect(width: 100%, padding: 3pt)[So there isn't anything in the second column?] +#rect(width: 100%, inset: 3pt)[So there isn't anything in the second column?] --- // Test columns when one of them is empty. diff --git a/tests/typ/layout/page-margin.typ b/tests/typ/layout/page-margin.typ index 44126d2d..290c4081 100644 --- a/tests/typ/layout/page-margin.typ +++ b/tests/typ/layout/page-margin.typ @@ -11,10 +11,10 @@ --- // 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]] +[#set page(margins: (left: 0pt)); #align(left)[Left]] +[#set page(margins: (right: 0pt)); #align(right)[Right]] +[#set page(margins: (top: 0pt)); #align(top)[Top]] +[#set page(margins: (bottom: 0pt)); #align(bottom)[Bottom]] // Ensure that specific margins override general margins. -[#set page(margins: 0pt, left: 20pt); Overriden] +[#set page(margins: (rest: 0pt, left: 20pt)); Overriden] diff --git a/tests/typ/layout/page-marginals.typ b/tests/typ/layout/page-marginals.typ index 9fd193c6..6e8e3d85 100644 --- a/tests/typ/layout/page-marginals.typ +++ b/tests/typ/layout/page-marginals.typ @@ -1,7 +1,6 @@ #set page( paper: "a8", - margins: 30pt, - horizontal: 15pt, + margins: (x: 15pt, y: 30pt), header: align(horizon, { text(eastern)[*Typst*] h(1fr) @@ -18,5 +17,5 @@ do wear it; cast it off. It is my lady, O, it is my love! O, that she knew she were! She speaks yet she says nothing: what of that? Her eye discourses; I will answer it. -#set page(header: none, height: auto, top: 15pt, bottom: 25pt) +#set page(header: none, height: auto, margins: (top: 15pt, bottom: 25pt)) The END. diff --git a/tests/typ/layout/page.typ b/tests/typ/layout/page.typ index 89d0f2fb..3157ebf9 100644 --- a/tests/typ/layout/page.typ +++ b/tests/typ/layout/page.typ @@ -24,7 +24,7 @@ // 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] +#page(width: 40pt, fill: none, margins: (top: 10pt, rest: auto))[Hi] --- // Just page followed by pagebreak. |
