mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
31 lines
541 B
Typst
31 lines
541 B
Typst
// Test that a heading doesn't become an orphan.
|
|
|
|
---
|
|
#set page(height: 100pt)
|
|
#lorem(12)
|
|
|
|
= Introduction
|
|
This is the start and it goes on.
|
|
|
|
---
|
|
#set page("a8", height: 150pt)
|
|
#set text(weight: 700)
|
|
|
|
// Fits fully onto the first page.
|
|
#set text(blue)
|
|
#lorem(27)
|
|
|
|
// The first line would fit, but is moved to the second page.
|
|
#lorem(20)
|
|
|
|
// The second-to-last line is moved to the third page so that the last is isn't
|
|
// as lonely.
|
|
#set text(maroon)
|
|
#lorem(11)
|
|
|
|
#lorem(13)
|
|
|
|
// All three lines go to the next page.
|
|
#set text(olive)
|
|
#lorem(10)
|