{"route":"/en-US-v0.14.1/reference/model/list/","title":"Bullet List","description":"Documentation for the `list` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"example","name":"Example","children":[]},{"id":"syntax","name":"Syntax","children":[]},{"id":"parameters","name":"Parameters","children":[{"id":"parameters-tight","name":"tight","children":[]},{"id":"parameters-marker","name":"marker","children":[]},{"id":"parameters-indent","name":"indent","children":[]},{"id":"parameters-body-indent","name":"body-indent","children":[]},{"id":"parameters-spacing","name":"spacing","children":[]},{"id":"parameters-children","name":"children","children":[]}]},{"id":"definitions","name":"Definitions","children":[{"id":"definitions-item","name":"Bullet List Item","children":[{"id":"definitions-item-body","name":"body","children":[]}]}]}],"body":{"kind":"func","content":{"path":[],"name":"list","title":"Bullet List","keywords":[],"oneliner":"A bullet list.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>A bullet list.</p>\n<p>Displays a sequence of items vertically, with each item introduced by a\nmarker.</p>\n<h2 id=\"example\">Example</h2>\n<div class=\"previewed-code\"><pre><code>Normal list.\n<span class=\"typ-marker\">-</span> Text\n<span class=\"typ-marker\">-</span> Math\n<span class=\"typ-marker\">-</span> Layout\n<span class=\"typ-marker\">-</span> <span class=\"typ-escape\">...</span>\n\nMultiple lines.\n<span class=\"typ-marker\">-</span> This list item spans multiple\n  lines because it is indented.\n\nFunction call.\n<span class=\"typ-func\">#</span><span class=\"typ-func\">list</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-punct\">[</span>Foundations<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>Calculate<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>Construct<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>Data Loading<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/74677de8cf5a4d31e8fa3289f72ef793.png\" alt=\"Preview\"></div></div>\n<h2 id=\"syntax\">Syntax</h2>\n<p>This functions also has dedicated syntax: Start a line with a hyphen,\nfollowed by a space to create a list item. A list item can contain multiple\nparagraphs and other block-level content. All content that is indented\nmore than an item's marker becomes part of that item.</p>"}],"self":false,"params":[{"name":"tight","details":[{"kind":"html","content":"<p>Defines the default <a href=\"/en-US-v0.14.1/reference/model/list/#parameters-spacing\">spacing</a> of the list. If it is\n<code><span class=\"typ-key\">false</span></code>, the items are spaced apart with\n<a href=\"/en-US-v0.14.1/reference/model/par/#parameters-spacing\">paragraph spacing</a>. If it is <code><span class=\"typ-key\">true</span></code>, they use\n<a href=\"/en-US-v0.14.1/reference/model/par/#parameters-leading\">paragraph leading</a> instead. This makes the list more\ncompact, which can look better if the items are short.</p>\n<p>In markup mode, the value of this parameter is determined based on\nwhether items are separated with a blank line. If items directly follow\neach other, this is set to <code><span class=\"typ-key\">true</span></code>; if items are separated by a blank\nline, this is set to <code><span class=\"typ-key\">false</span></code>. The markup-defined tightness cannot be\noverridden with set rules.</p>"},{"kind":"example","content":{"body":"<div class=\"previewed-code\"><pre><code><span class=\"typ-marker\">-</span> If a list has a lot of text, and\n  maybe other inline content, it\n  should not be tight anymore.\n\n<span class=\"typ-marker\">-</span> To make a list wide, simply insert\n  a blank line between the items.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/e0550f184e59c73e3e6754be9bf20509.png\" alt=\"Preview\"></div></div>","title":null}}],"types":["bool"],"strings":[],"default":"<code><span class=\"typ-key\">true</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"marker","details":[{"kind":"html","content":"<p>The marker which introduces each item.</p>\n<p>Instead of plain content, you can also pass an array with multiple\nmarkers that should be used for nested lists. If the list nesting depth\nexceeds the number of markers, the markers are cycled. For total\ncontrol, you may pass a function that maps the list's nesting depth\n(starting from <code><span class=\"typ-num\">0</span></code>) to a desired marker.</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\">list</span><span class=\"typ-punct\">(</span>marker<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span><span class=\"typ-escape\">--</span><span class=\"typ-punct\">]</span><span class=\"typ-punct\">)</span>\n<span class=\"typ-marker\">-</span> A more classic list\n<span class=\"typ-marker\">-</span> With en-dashes\n\n<span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">list</span><span class=\"typ-punct\">(</span>marker<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span><span class=\"typ-punct\">[</span>•<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span><span class=\"typ-escape\">--</span><span class=\"typ-punct\">]</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span>\n<span class=\"typ-marker\">-</span> Top-level\n  <span class=\"typ-marker\">-</span> Nested\n  <span class=\"typ-marker\">-</span> Items\n<span class=\"typ-marker\">-</span> Items\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/ac615939521f18810e441de210d068b5.png\" alt=\"Preview\"></div></div>","title":null}}],"types":["content","array","function"],"strings":[],"default":"<code><span class=\"typ-punct\">(</span><span class=\"typ-punct\">[</span>•<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>‣<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>–<span class=\"typ-punct\">]</span><span class=\"typ-punct\">)</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"indent","details":[{"kind":"html","content":"<p>The indent of each item.</p>"}],"types":["length"],"strings":[],"default":"<code><span class=\"typ-num\">0pt</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"body-indent","details":[{"kind":"html","content":"<p>The spacing between the marker and the body of each item.</p>"}],"types":["length"],"strings":[],"default":"<code><span class=\"typ-num\">0.5em</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"spacing","details":[{"kind":"html","content":"<p>The spacing between the items of the list.</p>\n<p>If set to <code><span class=\"typ-key\">auto</span></code>, uses paragraph <a href=\"/en-US-v0.14.1/reference/model/par/#parameters-leading\"><code>leading</code></a> for tight\nlists and paragraph <a href=\"/en-US-v0.14.1/reference/model/par/#parameters-spacing\"><code>spacing</code></a> for wide (non-tight)\nlists.</p>"}],"types":["auto","length"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"children","details":[{"kind":"html","content":"<p>The bullet list's children.</p>\n<p>When using the list syntax, adjacent items are automatically collected\ninto lists, even through constructs like for loops.</p>"},{"kind":"example","content":{"body":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">for</span> letter <span class=\"typ-key\">in</span> <span class=\"typ-str\">&quot;ABC&quot;</span> <span class=\"typ-punct\">[</span>\n  <span class=\"typ-marker\">-</span> Letter <span class=\"typ-pol\">#</span><span class=\"typ-pol\">letter</span>\n<span class=\"typ-punct\">]</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/b1cb6d05790b8d83af9497216eea34d3.png\" alt=\"Preview\"></div></div>","title":null}}],"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":true,"settable":false}],"returns":["content"],"scope":[{"path":["list"],"name":"item","title":"Bullet List Item","keywords":[],"oneliner":"A bullet list item.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>A bullet list item.</p>"}],"self":false,"params":[{"name":"body","details":[{"kind":"html","content":"<p>The item's body.</p>"}],"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false}],"returns":["content"],"scope":[]}]}}}