summaryrefslogtreecommitdiff
path: root/tests/typ/layout/pagebreak.typ
blob: df3b042383e0ed9fbf5efe1fc257d6e904c475af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Test forced page breaks.

---
// Just a pagebreak.
// Should result in two pages.
#pagebreak()

---
// Pagebreak, empty with styles and then pagebreak
// Should result in one auto-sized page and two conifer-colored 2cm wide pages.
#pagebreak()
#set page(width: 2cm, fill: conifer)
#pagebreak()

---
// Two text bodies separated with and surrounded by soft pagebreaks.
// Should result in two aqua-colored pages.
#set page(fill: aqua)
#pagebreak(soft: true)
First
#pagebreak(soft: true)
Second
#pagebreak(soft: true)

---
// Test a combination of pagebreaks, styled pages and pages with bodies.
// Should result in three five pages, with the fourth one being forest-colored.
#set page(width: 80pt, height: 30pt)
[#set page(width: 60pt); First]
#pagebreak()
#pagebreak()
Third
#page(height: 20pt, fill: forest)[]
Fif[#set page();th]

---
// Test hard and soft pagebreak followed by page with body.
// Should result in three navy-colored pages.
#set page(fill: navy)
#set text(fill: white)
First
#pagebreak()
#page[Second]
#pagebreak(soft: true)
#page[Third]