{"route":"/en-US-v0.14.1/reference/math/stretch/","title":"Stretch","description":"Documentation for the `stretch` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"parameters","name":"Parameters","children":[{"id":"parameters-body","name":"body","children":[]},{"id":"parameters-size","name":"size","children":[]}]}],"body":{"kind":"func","content":{"path":["math"],"name":"stretch","title":"Stretch","keywords":[],"oneliner":"Stretches a glyph.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>Stretches a glyph.</p>\n<p>This function can also be used to automatically stretch the base of an\nattachment, so that it fits the top and bottom attachments.</p>\n<p>Note that only some glyphs can be stretched, and which ones can depend on\nthe math font being used. However, most math fonts are the same in this\nregard.</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-math-delim\">$</span> H <span class=\"typ-func\">stretch</span><span class=\"typ-punct\">(</span>=<span class=\"typ-punct\">)</span><span class=\"typ-math-op\">^</span><span class=\"typ-str\">&quot;define&quot;</span> U + p V <span class=\"typ-math-delim\">$</span>\n<span class=\"typ-math-delim\">$</span> f : X <span class=\"typ-func\">stretch</span><span class=\"typ-punct\">(</span><span class=\"typ-escape\">-&gt;&gt;</span><span class=\"typ-punct\">,</span> size<span class=\"typ-punct\">:</span> <span class=\"typ-num\">#</span><span class=\"typ-num\">150%</span><span class=\"typ-punct\">)</span><span class=\"typ-math-op\">_</span><span class=\"typ-str\">&quot;surjective&quot;</span> Y <span class=\"typ-math-delim\">$</span>\n<span class=\"typ-math-delim\">$</span> x <span class=\"typ-func\">stretch</span><span class=\"typ-punct\">(</span><span class=\"typ-pol\">harpoons</span><span class=\"typ-punct\">.</span><span class=\"typ-pol\">ltrb</span><span class=\"typ-punct\">,</span> size<span class=\"typ-punct\">:</span> <span class=\"typ-num\">#</span><span class=\"typ-num\">3em</span><span class=\"typ-punct\">)</span> y\n    <span class=\"typ-func\">stretch</span><span class=\"typ-punct\">(</span><span class=\"typ-escape\">\\[</span><span class=\"typ-punct\">,</span> size<span class=\"typ-punct\">:</span> <span class=\"typ-num\">#</span><span class=\"typ-num\">150%</span><span class=\"typ-punct\">)</span> z <span class=\"typ-math-delim\">$</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/b3aef8dd0847dfe7ad675cbf416f9b2c.png\" alt=\"Preview\"></div></div>"}],"self":false,"params":[{"name":"body","details":[{"kind":"html","content":"<p>The glyph to stretch.</p>"}],"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false},{"name":"size","details":[{"kind":"html","content":"<p>The size to stretch to, relative to the maximum size of the glyph and\nits attachments.</p>"}],"types":["relative"],"strings":[],"default":"<code><span class=\"typ-num\">100%</span> <span class=\"typ-op\">+</span> <span class=\"typ-num\">0pt</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true}],"returns":["content"],"scope":[]}}}