{"route":"/en-US-v0.14.1/reference/layout/columns/","title":"Columns","description":"Documentation for the `columns` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"example","name":"Example","children":[]},{"id":"page-level","name":"Page Level","children":[]},{"id":"breaking-out","name":"Breaking Out","children":[]},{"id":"parameters","name":"Parameters","children":[{"id":"parameters-count","name":"count","children":[]},{"id":"parameters-gutter","name":"gutter","children":[]},{"id":"parameters-body","name":"body","children":[]}]}],"body":{"kind":"func","content":{"path":[],"name":"columns","title":"Columns","keywords":[],"oneliner":"Separates a region into multiple equally sized columns.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>Separates a region into multiple equally sized columns.</p>\n<p>The <code>column</code> function lets you separate the interior of any container into\nmultiple columns. It will currently not balance the height of the columns.\nInstead, the columns will take up the height of their container or the\nremaining height on the page. Support for balanced columns is planned for\nthe future.</p>\n<p>When arranging content across multiple columns, use <a href=\"/en-US-v0.14.1/reference/layout/colbreak/\"><code>colbreak</code></a>\nto explicitly continue in the next column.</p>\n<h2 id=\"example\">Example</h2>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-func\">#</span><span class=\"typ-func\">columns</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">2</span><span class=\"typ-punct\">,</span> gutter<span class=\"typ-punct\">:</span> <span class=\"typ-num\">8pt</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>\n  This text is in the\n  first column.\n\n  <span class=\"typ-func\">#</span><span class=\"typ-func\">colbreak</span><span class=\"typ-punct\">(</span><span class=\"typ-punct\">)</span>\n\n  This text is in the\n  second column.\n<span class=\"typ-punct\">]</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/83bb34143540d7c5eb201906b54e330d.png\" alt=\"Preview\"></div></div>\n<h2 id=\"page-level\">Page-level columns</h2>\n<p>If you need to insert columns across your whole document, use the <code>page</code>\nfunction's <a href=\"/en-US-v0.14.1/reference/layout/page/#parameters-columns\"><code>columns</code> parameter</a> instead. This will create\nthe columns directly at the page-level rather than wrapping all of your\ncontent in a layout container. As a result, things like\n<a href=\"/en-US-v0.14.1/reference/layout/pagebreak/\">pagebreaks</a>, <a href=\"/en-US-v0.14.1/reference/model/footnote/\">footnotes</a>, and <a href=\"/en-US-v0.14.1/reference/model/par/#definitions-line\">line\nnumbers</a> will continue to work as expected. For more information,\nalso read the <a href=\"/en-US-v0.14.1/guides/page-setup/#columns\">relevant part of the page setup\nguide</a>.</p>\n<h2 id=\"breaking-out\">Breaking out of columns</h2>\n<p>To temporarily break out of columns (e.g. for a paper's title), use\nparent-scoped floating placement:</p>\n<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>columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">,</span> height<span class=\"typ-punct\">:</span> <span class=\"typ-num\">150pt</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">place</span><span class=\"typ-punct\">(</span>\n  top <span class=\"typ-op\">+</span> center<span class=\"typ-punct\">,</span>\n  scope<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;parent&quot;</span><span class=\"typ-punct\">,</span>\n  float<span class=\"typ-punct\">:</span> <span class=\"typ-key\">true</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">1.4em</span><span class=\"typ-punct\">,</span> weight<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;bold&quot;</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>\n    My document\n  <span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">lorem</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">40</span><span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/a8d4661ddb4d82cf2aa44f91511f97c9.png\" alt=\"Preview\"></div></div>"}],"self":false,"params":[{"name":"count","details":[{"kind":"html","content":"<p>The number of columns.</p>"}],"types":["int"],"strings":[],"default":"<code><span class=\"typ-num\">2</span></code>","positional":true,"named":false,"required":false,"variadic":false,"settable":true},{"name":"gutter","details":[{"kind":"html","content":"<p>The size of the gutter space between each column.</p>"}],"types":["relative"],"strings":[],"default":"<code><span class=\"typ-num\">4%</span> <span class=\"typ-op\">+</span> <span class=\"typ-num\">0pt</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"body","details":[{"kind":"html","content":"<p>The content that should be layouted into the columns.</p>"}],"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false}],"returns":["content"],"scope":[]}}}