{"route":"/en-US-v0.14.1/reference/model/terms/","title":"Term List","description":"Documentation for the `terms` 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-separator","name":"separator","children":[]},{"id":"parameters-indent","name":"indent","children":[]},{"id":"parameters-hanging-indent","name":"hanging-indent","children":[]},{"id":"parameters-spacing","name":"spacing","children":[]},{"id":"parameters-children","name":"children","children":[]}]},{"id":"definitions","name":"Definitions","children":[{"id":"definitions-item","name":"Term List Item","children":[{"id":"definitions-item-term","name":"term","children":[]},{"id":"definitions-item-description","name":"description","children":[]}]}]}],"body":{"kind":"func","content":{"path":[],"name":"terms","title":"Term List","keywords":[],"oneliner":"A list of terms and their descriptions.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>A list of terms and their descriptions.</p>\n<p>Displays a sequence of terms and their descriptions vertically. When the\ndescriptions span over multiple lines, they use hanging indent to\ncommunicate the visual hierarchy.</p>\n<h2 id=\"example\">Example</h2>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-marker\">/</span> <span class=\"typ-term\">Ligature</span><span class=\"typ-punct\">:</span> A merged glyph.\n<span class=\"typ-marker\">/</span> <span class=\"typ-term\">Kerning</span><span class=\"typ-punct\">:</span> A spacing adjustment\n  between two adjacent letters.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/aa37504d32456bf458b5c7eee362226b.png\" alt=\"Preview\"></div></div>\n<h2 id=\"syntax\">Syntax</h2>\n<p>This function also has dedicated syntax: Starting a line with a slash,\nfollowed by a term, a colon and a description creates a term list item.</p>"}],"self":false,"params":[{"name":"tight","details":[{"kind":"html","content":"<p>Defines the default <a href=\"/en-US-v0.14.1/reference/model/terms/#parameters-spacing\">spacing</a> of the term 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> <span class=\"typ-term\">Fact</span><span class=\"typ-punct\">:</span> If a term list has a lot\n  of text, and maybe other inline\n  content, it should not be tight\n  anymore.\n\n<span class=\"typ-marker\">/</span> <span class=\"typ-term\">Tip</span><span class=\"typ-punct\">:</span> To make it wide, simply\n  insert a blank line between the\n  items.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/b2492e47606096d9421d4cbd70fa57ee.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":"separator","details":[{"kind":"html","content":"<p>The separator between the item and the description.</p>\n<p>If you want to just separate them with a certain amount of space, use\n<code><span class=\"typ-func\">h</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">2cm</span><span class=\"typ-punct\">,</span> weak<span class=\"typ-punct\">:</span> <span class=\"typ-key\">true</span><span class=\"typ-punct\">)</span></code> as the separator and replace <code><span class=\"typ-num\">2cm</span></code> with your\ndesired amount of space.</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\">terms</span><span class=\"typ-punct\">(</span>separator<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>: <span class=\"typ-punct\">]</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-marker\">/</span> <span class=\"typ-term\">Colon</span><span class=\"typ-punct\">:</span> A nice separator symbol.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/c72c9b94c23c97ff7d953b75fe9e645a.png\" alt=\"Preview\"></div></div>","title":null}}],"types":["content"],"strings":[],"default":"<code><span class=\"typ-func\">h</span><span class=\"typ-punct\">(</span>amount<span class=\"typ-punct\">:</span> <span class=\"typ-num\">0.6em</span><span class=\"typ-punct\">,</span> weak<span class=\"typ-punct\">:</span> <span class=\"typ-key\">true</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 indentation 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":"hanging-indent","details":[{"kind":"html","content":"<p>The hanging indent of the description.</p>\n<p>This is in addition to the whole item's <code>indent</code>.</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\">terms</span><span class=\"typ-punct\">(</span>hanging-indent<span class=\"typ-punct\">:</span> <span class=\"typ-num\">0pt</span><span class=\"typ-punct\">)</span>\n<span class=\"typ-marker\">/</span> <span class=\"typ-term\">Term</span><span class=\"typ-punct\">:</span> This term list does not\n  make use of hanging indents.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/eb262b284ad3d89b51c01466a52f2be7.png\" alt=\"Preview\"></div></div>","title":null}}],"types":["length"],"strings":[],"default":"<code><span class=\"typ-num\">2em</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 term 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\nterm lists and paragraph <a href=\"/en-US-v0.14.1/reference/model/par/#parameters-spacing\"><code>spacing</code></a> for wide\n(non-tight) term lists.</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 term list's children.</p>\n<p>When using the term list syntax, adjacent items are automatically\ncollected into term 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> <span class=\"typ-punct\">(</span>year<span class=\"typ-punct\">,</span> product<span class=\"typ-punct\">)</span> <span class=\"typ-key\">in</span> <span class=\"typ-punct\">(</span>\n  <span class=\"typ-str\">&quot;1978&quot;</span><span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;TeX&quot;</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-str\">&quot;1984&quot;</span><span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;LaTeX&quot;</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-str\">&quot;2019&quot;</span><span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Typst&quot;</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span> <span class=\"typ-punct\">[</span><span class=\"typ-marker\">/</span> <span class=\"typ-term\"><span class=\"typ-pol\">#</span><span class=\"typ-pol\">product</span></span><span class=\"typ-punct\">:</span> Born in <span class=\"typ-pol\">#</span><span class=\"typ-pol\">year</span>.<span class=\"typ-punct\">]</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/c24bd033a8de4e4493468693f58d2549.png\" alt=\"Preview\"></div></div>","title":null}}],"types":["content","array"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":true,"settable":false}],"returns":["content"],"scope":[{"path":["terms"],"name":"item","title":"Term List Item","keywords":[],"oneliner":"A term list item.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>A term list item.</p>"}],"self":false,"params":[{"name":"term","details":[{"kind":"html","content":"<p>The term described by the list item.</p>"}],"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false},{"name":"description","details":[{"kind":"html","content":"<p>The description of the term.</p>"}],"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false}],"returns":["content"],"scope":[]}]}}}