{"route":"/en-US-v0.13.1/reference/model/figure/","title":"Figure","description":"Documentation for the `figure` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"examples","name":"Examples","children":[]},{"id":"figure-behaviour","name":"Figure behaviour","children":[]},{"id":"caption-customization","name":"Caption customization","children":[]},{"id":"parameters","name":"Parameters","children":[{"id":"parameters-body","name":"body","children":[]},{"id":"parameters-placement","name":"placement","children":[]},{"id":"parameters-scope","name":"scope","children":[]},{"id":"parameters-caption","name":"caption","children":[]},{"id":"parameters-kind","name":"kind","children":[]},{"id":"parameters-supplement","name":"supplement","children":[]},{"id":"parameters-numbering","name":"numbering","children":[]},{"id":"parameters-gap","name":"gap","children":[]},{"id":"parameters-outlined","name":"outlined","children":[]}]},{"id":"definitions","name":"Definitions","children":[{"id":"definitions-caption","name":"Caption","children":[{"id":"definitions-caption-position","name":"position","children":[]},{"id":"definitions-caption-separator","name":"separator","children":[]},{"id":"definitions-caption-body","name":"body","children":[]}]}]}],"body":{"kind":"func","content":{"path":[],"name":"figure","title":"Figure","keywords":[],"oneliner":"A figure with an optional caption.","element":true,"contextual":false,"deprecation":null,"details":"<p>A figure with an optional caption.</p>\n<p>Automatically detects its kind to select the correct counting track. For\nexample, figures containing images will be numbered separately from figures\ncontaining tables.</p>\n<h2 id=\"examples\">Examples</h2>\n<p>The example below shows a basic figure with an image:</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-ref\">@glacier</span> shows a glacier. Glaciers\nare complex systems.\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-func\">image</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;glacier.jpg&quot;</span><span class=\"typ-punct\">,</span> width<span class=\"typ-punct\">:</span> <span class=\"typ-num\">80%</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>A curious figure.<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span> <span class=\"typ-label\">&lt;glacier&gt;</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/b9dc3c275cd6f020dfa180755d3cdd2e.png\" alt=\"Preview\"></div></div>\n<p>You can also insert <a href=\"/en-US-v0.13.1/reference/model/table/\">tables</a> into figures to give them a caption.\nThe figure will detect this and automatically use a separate counter.</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-func\">table</span><span class=\"typ-punct\">(</span>\n    columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">4</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-punct\">[</span>t<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>1<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>2<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>3<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-punct\">[</span>y<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>0.3s<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>0.4s<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>0.8s<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Timing results<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.13.1/assets/fd168e26293d3b952840ef04aba38cf6.png\" alt=\"Preview\"></div></div>\n<p>This behaviour can be overridden by explicitly specifying the figure's\n<code>kind</code>. All figures of the same kind share a common counter.</p>\n<h2 id=\"figure-behaviour\">Figure behaviour</h2>\n<p>By default, figures are placed within the flow of content. To make them\nfloat to the top or bottom of the page, you can use the\n<a href=\"/en-US-v0.13.1/reference/model/figure/#parameters-placement\"><code>placement</code></a> argument.</p>\n<p>If your figure is too large and its contents are breakable across pages\n(e.g. if it contains a large table), then you can make the figure itself\nbreakable across pages as well with this show rule:</p>\n<pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">show</span> <span class=\"typ-func\">figure</span><span class=\"typ-punct\">:</span> <span class=\"typ-key\">set</span> <span class=\"typ-func\">block</span><span class=\"typ-punct\">(</span>breakable<span class=\"typ-punct\">:</span> <span class=\"typ-key\">true</span><span class=\"typ-punct\">)</span>\n</code></pre>\n<p>See the <a href=\"/en-US-v0.13.1/reference/layout/block/#parameters-breakable\">block</a> documentation for more information about\nbreakable and non-breakable blocks.</p>\n<h2 id=\"caption-customization\">Caption customization</h2>\n<p>You can modify the appearance of the figure's caption with its associated\n<a href=\"/en-US-v0.13.1/reference/model/figure/#definitions-caption\"><code>caption</code></a> function. In the example below, we emphasize\nall captions:</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">show</span> figure<span class=\"typ-punct\">.</span><span class=\"typ-func\">caption</span><span class=\"typ-punct\">:</span> <span class=\"typ-func\">emph</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-func\">rect</span><span class=\"typ-punct\">[</span>Hello<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>I am emphasized!<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.13.1/assets/fd76214814edd5d9a3611f40e27fda0a.png\" alt=\"Preview\"></div></div>\n<p>By using a <a href=\"/en-US-v0.13.1/reference/foundations/function/#definitions-where\"><code>where</code></a> selector, we can scope such rules to\nspecific kinds of figures. For example, to position the caption above\ntables, but keep it below for all other kinds of figures, we could write the\nfollowing show-set rule:</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">show</span> figure<span class=\"typ-punct\">.</span><span class=\"typ-func\">where</span><span class=\"typ-punct\">(</span>\n  kind<span class=\"typ-punct\">:</span> table\n<span class=\"typ-punct\">)</span><span class=\"typ-punct\">:</span> <span class=\"typ-key\">set</span> figure<span class=\"typ-punct\">.</span><span class=\"typ-func\">caption</span><span class=\"typ-punct\">(</span>position<span class=\"typ-punct\">:</span> top<span class=\"typ-punct\">)</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-func\">table</span><span class=\"typ-punct\">(</span>columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>A<span class=\"typ-punct\">]</span><span class=\"typ-punct\">[</span>B<span class=\"typ-punct\">]</span><span class=\"typ-punct\">[</span>C<span class=\"typ-punct\">]</span><span class=\"typ-punct\">[</span>D<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>I&#39;m up here<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.13.1/assets/e455d8faf40a203e10d4562c478231f4.png\" alt=\"Preview\"></div></div>","example":null,"self":false,"params":[{"name":"body","details":"<p>The content of the figure. Often, an <a href=\"/en-US-v0.13.1/reference/visualize/image/\" title=\"image\">image</a>.</p>","example":null,"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false},{"name":"placement","details":"<p>The figure's placement on the page.</p>\n<ul>\n<li><code><span class=\"typ-key\">none</span></code>: The figure stays in-flow exactly where it was specified\nlike other content.</li>\n<li><code><span class=\"typ-key\">auto</span></code>: The figure picks <code>top</code> or <code>bottom</code> depending on which\nis closer.</li>\n<li><code>top</code>: The figure floats to the top of the page.</li>\n<li><code>bottom</code>: The figure floats to the bottom of the page.</li>\n</ul>\n<p>The gap between the main flow content and the floating figure is\ncontrolled by the <a href=\"/en-US-v0.13.1/reference/layout/place/#parameters-clearance\"><code>clearance</code></a> argument on the\n<code>place</code> function.</p>","example":"<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\">200pt</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-heading\">= Introduction</span>\n<span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  placement<span class=\"typ-punct\">:</span> bottom<span class=\"typ-punct\">,</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>A glacier<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-func\">image</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;glacier.jpg&quot;</span><span class=\"typ-punct\">,</span> width<span class=\"typ-punct\">:</span> <span class=\"typ-num\">60%</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n<span class=\"typ-func\">#</span><span class=\"typ-func\">lorem</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">60</span><span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/2f4d35780af931c9907c5ebccd513df.png\" alt=\"Preview\"></div></div>","types":["none","auto","alignment"],"strings":[],"default":"<code><span class=\"typ-key\">none</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"scope","details":"<p>Relative to which containing scope the figure is placed.</p>\n<p>Set this to <code><span class=\"typ-str\">&quot;parent&quot;</span></code> to create a full-width figure in a two-column\ndocument.</p>\n<p>Has no effect if <code>placement</code> is <code><span class=\"typ-key\">none</span></code>.</p>","example":"<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\">250pt</span><span class=\"typ-punct\">,</span> columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-heading\">= Introduction</span>\n<span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  placement<span class=\"typ-punct\">:</span> bottom<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  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>A glacier<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-func\">image</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;glacier.jpg&quot;</span><span class=\"typ-punct\">,</span> width<span class=\"typ-punct\">:</span> <span class=\"typ-num\">60%</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n<span class=\"typ-func\">#</span><span class=\"typ-func\">lorem</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">60</span><span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/ff35f92bd3477ddda661809e2666a0ef.png\" alt=\"Preview\"></div></div>","types":["str"],"strings":[{"string":"column","details":"<p>Place into the current column.</p>"},{"string":"parent","details":"<p>Place relative to the parent, letting the content span over all columns.</p>"}],"default":"<code><span class=\"typ-str\">&quot;column&quot;</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"caption","details":"<p>The figure's caption.</p>","example":null,"types":["none","content"],"strings":[],"default":"<code><span class=\"typ-key\">none</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"kind","details":"<p>The kind of figure this is.</p>\n<p>All figures of the same kind share a common counter.</p>\n<p>If set to <code><span class=\"typ-key\">auto</span></code>, the figure will try to automatically determine its\nkind based on the type of its body. Automatically detected kinds are\n<a href=\"/en-US-v0.13.1/reference/model/table/\">tables</a> and <a href=\"/en-US-v0.13.1/reference/text/raw/\">code</a>. In other cases, the inferred kind is\nthat of an <a href=\"/en-US-v0.13.1/reference/visualize/image/\" title=\"image\">image</a>.</p>\n<p>Setting this to something other than <code><span class=\"typ-key\">auto</span></code> will override the\nautomatic detection. This can be useful if</p>\n<ul>\n<li>you wish to create a custom figure type that is not an\n<a href=\"/en-US-v0.13.1/reference/visualize/image/\" title=\"image\">image</a>, a <a href=\"/en-US-v0.13.1/reference/model/table/\" title=\"table\">table</a> or <a href=\"/en-US-v0.13.1/reference/text/raw/\">code</a>,</li>\n<li>you want to force the figure to use a specific counter regardless of\nits content.</li>\n</ul>\n<p>You can set the kind to be an element function or a string. If you set\nit to an element function other than <a href=\"/en-US-v0.13.1/reference/model/table/\"><code>table</code></a>, <a href=\"/en-US-v0.13.1/reference/text/raw/\"><code>raw</code></a>\nor <a href=\"/en-US-v0.13.1/reference/visualize/image/\"><code>image</code></a>, you will need to manually specify the figure's\nsupplement.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-func\">circle</span><span class=\"typ-punct\">(</span>radius<span class=\"typ-punct\">:</span> <span class=\"typ-num\">10pt</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>A curious atom.<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  kind<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;atom&quot;</span><span class=\"typ-punct\">,</span>\n  supplement<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Atom<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.13.1/assets/82712152d3e540b0bd0e61dfb58e2fcd.png\" alt=\"Preview\"></div></div>","types":["auto","str","function"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"supplement","details":"<p>The figure's supplement.</p>\n<p>If set to <code><span class=\"typ-key\">auto</span></code>, the figure will try to automatically determine the\ncorrect supplement based on the <code>kind</code> and the active\n<a href=\"/en-US-v0.13.1/reference/text/text/#parameters-lang\">text language</a>. If you are using a custom figure type, you\nwill need to manually specify the supplement.</p>\n<p>If a function is specified, it is passed the first descendant of the\nspecified <code>kind</code> (typically, the figure's body) and should return\ncontent.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-punct\">[</span>The contents of my figure!<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>My custom figure<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  supplement<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Bar<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  kind<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;foo&quot;</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/fe8c37b3e778c5204de955fe9d51d5cd.png\" alt=\"Preview\"></div></div>","types":["none","auto","content","function"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"numbering","details":"<p>How to number the figure. Accepts a\n<a href=\"/en-US-v0.13.1/reference/model/numbering/\">numbering pattern or function</a>.</p>","example":null,"types":["none","str","function"],"strings":[],"default":"<code><span class=\"typ-str\">&quot;1&quot;</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"gap","details":"<p>The vertical gap between the body and caption.</p>","example":null,"types":["length"],"strings":[],"default":"<code><span class=\"typ-num\">0.65em</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"outlined","details":"<p>Whether the figure should appear in an <a href=\"/en-US-v0.13.1/reference/model/outline/\" title=\"`outline`\"><code>outline</code></a> of figures.</p>","example":null,"types":["bool"],"strings":[],"default":"<code><span class=\"typ-key\">true</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true}],"returns":["content"],"scope":[{"path":["figure"],"name":"caption","title":"Caption","keywords":[],"oneliner":"The caption of a figure. This element can be used in set and show rules to","element":true,"contextual":false,"deprecation":null,"details":"<p>The caption of a figure. This element can be used in set and show rules to\ncustomize the appearance of captions for all figures or figures of a\nspecific kind.</p>\n<p>In addition to its <code>pos</code> and <code>body</code>, the <code>caption</code> also provides the\nfigure's <code>kind</code>, <code>supplement</code>, <code>counter</code>, and <code>numbering</code> as fields. These\nparts can be used in <a href=\"/en-US-v0.13.1/reference/foundations/function/#definitions-where\"><code>where</code></a> selectors and show rules to\nbuild a completely custom caption.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">show</span> figure<span class=\"typ-punct\">.</span><span class=\"typ-func\">caption</span><span class=\"typ-punct\">:</span> <span class=\"typ-func\">emph</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-func\">rect</span><span class=\"typ-punct\">[</span>Hello<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>A rectangle<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.13.1/assets/ffd45a7b793ed7875c6f4d1b596e1c88.png\" alt=\"Preview\"></div></div>","self":false,"params":[{"name":"position","details":"<p>The caption's position in the figure. Either <code>top</code> or <code>bottom</code>.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">show</span> figure<span class=\"typ-punct\">.</span><span class=\"typ-func\">where</span><span class=\"typ-punct\">(</span>\n  kind<span class=\"typ-punct\">:</span> table\n<span class=\"typ-punct\">)</span><span class=\"typ-punct\">:</span> <span class=\"typ-key\">set</span> figure<span class=\"typ-punct\">.</span><span class=\"typ-func\">caption</span><span class=\"typ-punct\">(</span>position<span class=\"typ-punct\">:</span> top<span class=\"typ-punct\">)</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-func\">table</span><span class=\"typ-punct\">(</span>columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>A<span class=\"typ-punct\">]</span><span class=\"typ-punct\">[</span>B<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>I&#39;m up here<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\">figure</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-func\">rect</span><span class=\"typ-punct\">[</span>Hi<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>I&#39;m down here<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\">figure</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-func\">table</span><span class=\"typ-punct\">(</span>columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>A<span class=\"typ-punct\">]</span><span class=\"typ-punct\">[</span>B<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  caption<span class=\"typ-punct\">:</span> figure<span class=\"typ-punct\">.</span><span class=\"typ-func\">caption</span><span class=\"typ-punct\">(</span>\n    position<span class=\"typ-punct\">:</span> bottom<span class=\"typ-punct\">,</span>\n    <span class=\"typ-punct\">[</span>I&#39;m down here too!<span class=\"typ-punct\">]</span>\n  <span class=\"typ-punct\">)</span>\n<span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/21d14a9a26af4aa31312a9fcc145ee52.png\" alt=\"Preview\"></div></div>","types":["alignment"],"strings":[],"default":"<code>bottom</code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"separator","details":"<p>The separator which will appear between the number and body.</p>\n<p>If set to <code><span class=\"typ-key\">auto</span></code>, the separator will be adapted to the current\n<a href=\"/en-US-v0.13.1/reference/text/text/#parameters-lang\">language</a> and <a href=\"/en-US-v0.13.1/reference/text/text/#parameters-region\">region</a>.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> figure<span class=\"typ-punct\">.</span><span class=\"typ-func\">caption</span><span class=\"typ-punct\">(</span>separator<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\n<span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-func\">rect</span><span class=\"typ-punct\">[</span>Hello<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>A rectangle<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.13.1/assets/178ec0814a619978959f5da809bfc408.png\" alt=\"Preview\"></div></div>","types":["auto","content"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"body","details":"<p>The caption's body.</p>\n<p>Can be used alongside <code>kind</code>, <code>supplement</code>, <code>counter</code>, <code>numbering</code>, and\n<code>location</code> to completely customize the caption.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">show</span> figure<span class=\"typ-punct\">.</span><span class=\"typ-func\">caption</span><span class=\"typ-punct\">:</span> it <span class=\"typ-op\">=&gt;</span> <span class=\"typ-punct\">[</span>\n  <span class=\"typ-func\">#</span><span class=\"typ-func\">underline</span><span class=\"typ-punct\">(</span>it<span class=\"typ-punct\">.</span>body<span class=\"typ-punct\">)</span> |\n  <span class=\"typ-pol\">#</span><span class=\"typ-pol\">it</span><span class=\"typ-punct\">.</span><span class=\"typ-pol\">supplement</span>\n  <span class=\"typ-key\">#</span><span class=\"typ-key\">context</span> it<span class=\"typ-punct\">.</span>counter<span class=\"typ-punct\">.</span><span class=\"typ-func\">display</span><span class=\"typ-punct\">(</span>it<span class=\"typ-punct\">.</span>numbering<span class=\"typ-punct\">)</span>\n<span class=\"typ-punct\">]</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-func\">rect</span><span class=\"typ-punct\">[</span>Hello<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>A rectangle<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.13.1/assets/271203fbe1409c884010228b31516257.png\" alt=\"Preview\"></div></div>","types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false}],"returns":["content"],"scope":[]}]}}}