Typst Page Break
One function: #pagebreak(). Pass weak: true for soft breaks and to: "odd" for chapter-style.
The basics
// Hard break (always inserts a new page)
#pagebreak()
// Soft break (only if current page has content)
#pagebreak(weak: true)
// Break to odd page (chapter style for two-sided printing)
#pagebreak(to: "odd")
// Break to even page
#pagebreak(to: "even")Section starts on new page (automatic)
// Every level-1 heading starts on a new page
#show heading.where(level: 1): it => {
pagebreak(weak: true)
it
}
= Chapter 1
This chapter starts on its own page.
= Chapter 2
This one too.Chapter on right (odd) page
// Two-sided book: chapters on right (odd) pages
#set page(paper: "us-letter")
#show heading.where(level: 1): it => {
pagebreak(to: "odd", weak: true)
it
}Keep content together (no break)
#block(breakable: false)[
This whole block stays on one page.
Even if it would normally fit better with a break,
Typst will move the entire block to the next page rather than split it.
]Common patterns
- Title page on its own:
#pagebreak()right after#title. - Bibliography on new page:
#pagebreak()before#bibliography(). - Appendix on new page:
#pagebreak()before the appendix heading. - Avoid orphan headings: Use
#show heading: set block(breakable: false).
TypeTeX is a free in-browser Typst editor — write a thesis, paper, or book with full layout control and instant preview.
Start writing in TypstFrequently Asked Questions
Use #pagebreak(). It immediately ends the current page and starts a new one. Place it in the markup where you want the break.
#pagebreak() is a hard break — always inserts a new page even if the current page is empty. #pagebreak(weak: true) only breaks if there's content on the current page; otherwise it's a no-op. Use weak breaks at section boundaries to avoid empty pages.
Use a show rule: #show heading.where(level: 1): it => { pagebreak(weak: true); it }. This says 'before every level-1 heading, insert a weak page break, then render the heading.' Targets only the level you want.
Pass the 'to' argument: #pagebreak(to: "odd") forces a break and ensures the next page is odd-numbered (right side in two-sided printing). #pagebreak(to: "even") for the left side. Used for chapter dividers in books.
Wrap content in a #block(breakable: false) — Typst won't break the page in the middle of the block. For figures and tables that should stay near their reference, use figure() with placement: auto and Typst handles flow intelligently.
#pagebreak() #pagebreak() inserts an extra blank page (the second one breaks from a fresh empty page). Or set the 'to' argument: #pagebreak(to: "odd") will insert a blank even page if needed to land on odd.
Typst uses one function — #pagebreak() — with named arguments for variations. LaTeX has \newpage (immediate), \clearpage (flush floats first), \pagebreak (suggest), \cleardoublepage (force odd) — four separate commands. Typst combines these into one function with weak: bool and to: "odd"|"even" arguments.