{"route":"/en-US-v0.14.1/reference/layout/pagebreak/","title":"Page Break","description":"Documentation for the `pagebreak` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"example","name":"Example","children":[]},{"id":"parameters","name":"Parameters","children":[{"id":"parameters-weak","name":"weak","children":[]},{"id":"parameters-to","name":"to","children":[]}]}],"body":{"kind":"func","content":{"path":[],"name":"pagebreak","title":"Page Break","keywords":[],"oneliner":"A manual page break.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>A manual page break.</p>\n<p>Must not be used inside any containers.</p>\n<h2 id=\"example\">Example</h2>\n<div class=\"previewed-code\"><pre><code>The next page contains\nmore details on compound theory.\n<span class=\"typ-func\">#</span><span class=\"typ-func\">pagebreak</span><span class=\"typ-punct\">(</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-heading\">== Compound Theory</span>\nIn 1984, the first <span class=\"typ-escape\">...</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/3098eee9a9bf195060b49592b4463703-0.png\" alt=\"Preview page 1\"><img src=\"/en-US-v0.14.1/assets/3098eee9a9bf195060b49592b4463703-1.png\" alt=\"Preview page 2\"></div></div>\n<p>Even without manual page breaks, content will be automatically paginated\nbased on the configured page size. You can set <a href=\"/en-US-v0.14.1/reference/layout/page/#parameters-height\">the page height</a>\nto <code><span class=\"typ-key\">auto</span></code> to let the page grow dynamically until a manual page break\noccurs.</p>\n<p>Pagination tries to avoid single lines of text at the top or bottom of a\npage (these are called <em>widows</em> and <em>orphans</em>). You can adjust the\n<a href=\"/en-US-v0.14.1/reference/text/text/#parameters-costs\" title=\"`text.costs`\"><code>text.costs</code></a> parameter to disable this behavior.</p>"}],"self":false,"params":[{"name":"weak","details":[{"kind":"html","content":"<p>If <code><span class=\"typ-key\">true</span></code>, the page break is skipped if the current page is already\nempty.</p>"}],"types":["bool"],"strings":[],"default":"<code><span class=\"typ-key\">false</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"to","details":[{"kind":"html","content":"<p>If given, ensures that the next page will be an even/odd page, with an\nempty page in between if necessary.</p>"},{"kind":"example","content":{"body":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">page</span><span class=\"typ-punct\">(</span>height<span class=\"typ-punct\">:</span> <span class=\"typ-num\">30pt</span><span class=\"typ-punct\">)</span>\n\nFirst.\n<span class=\"typ-func\">#</span><span class=\"typ-func\">pagebreak</span><span class=\"typ-punct\">(</span>to<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;odd&quot;</span><span class=\"typ-punct\">)</span>\nThird.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/ff80837b479a5387b266d55477502b8a-0.png\" alt=\"Preview page 1\"><img src=\"/en-US-v0.14.1/assets/ff80837b479a5387b266d55477502b8a-1.png\" alt=\"Preview page 2\"><img src=\"/en-US-v0.14.1/assets/ff80837b479a5387b266d55477502b8a-2.png\" alt=\"Preview page 3\"></div></div>","title":null}}],"types":["none","str"],"strings":[{"string":"even","details":"<p>Next page will be an even page.</p>"},{"string":"odd","details":"<p>Next page will be an odd page.</p>"}],"default":"<code><span class=\"typ-key\">none</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true}],"returns":["content"],"scope":[]}}}