{"route":"/en-US-v0.14.1/reference/text/super/","title":"Superscript","description":"Documentation for the `super` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"example","name":"Example","children":[]},{"id":"parameters","name":"Parameters","children":[{"id":"parameters-typographic","name":"typographic","children":[]},{"id":"parameters-baseline","name":"baseline","children":[]},{"id":"parameters-size","name":"size","children":[]},{"id":"parameters-body","name":"body","children":[]}]}],"body":{"kind":"func","content":{"path":[],"name":"super","title":"Superscript","keywords":[],"oneliner":"Renders text in superscript.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>Renders text in superscript.</p>\n<p>The text is rendered smaller and its baseline is raised.</p>\n<h2 id=\"example\">Example</h2>\n<div class=\"previewed-code\"><pre><code>1<span class=\"typ-func\">#</span><span class=\"typ-func\">super</span><span class=\"typ-punct\">[</span>st<span class=\"typ-punct\">]</span> try!\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/d39db3c0aae4bd51ed655cd6eb958575.png\" alt=\"Preview\"></div></div>"}],"self":false,"params":[{"name":"typographic","details":[{"kind":"html","content":"<p>Whether to use superscript glyphs from the font if available.</p>\n<p>Ideally, superscripts glyphs are provided by the font (using the <code>sups</code>\nOpenType feature). Otherwise, Typst is able to synthesize superscripts\nby raising and scaling down regular glyphs.</p>\n<p>When this is set to <code><span class=\"typ-key\">false</span></code>, synthesized glyphs will be used\nregardless of whether the font provides dedicated superscript glyphs.\nWhen <code><span class=\"typ-key\">true</span></code>, synthesized glyphs may still be used in case the font\ndoes not provide the necessary superscript glyphs.</p>"},{"kind":"example","content":{"body":"<div class=\"previewed-code\"><pre><code>N<span class=\"typ-func\">#</span><span class=\"typ-func\">super</span><span class=\"typ-punct\">(</span>typographic<span class=\"typ-punct\">:</span> <span class=\"typ-key\">true</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>1<span class=\"typ-punct\">]</span>\nN<span class=\"typ-func\">#</span><span class=\"typ-func\">super</span><span class=\"typ-punct\">(</span>typographic<span class=\"typ-punct\">:</span> <span class=\"typ-key\">false</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>1<span class=\"typ-punct\">]</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/d7fcca4246d939b0d654b4f893ed8b29.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":"baseline","details":[{"kind":"html","content":"<p>The downward baseline shift for synthesized superscripts.</p>\n<p>This only applies to synthesized superscripts. In other words, this has\nno effect if <code>typographic</code> is <code><span class=\"typ-key\">true</span></code> and the font provides the\nnecessary superscript glyphs.</p>\n<p>If set to <code><span class=\"typ-key\">auto</span></code>, the baseline is shifted according to the metrics\nprovided by the font, with a fallback to <code><span class=\"typ-op\">-</span><span class=\"typ-num\">0.5em</span></code> in case the font\ndoes not define the necessary metrics.</p>\n<p>Note that, since the baseline shift is applied downward, you will need\nto provide a negative value for the content to appear as raised above\nthe normal baseline.</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":"size","details":[{"kind":"html","content":"<p>The font size for synthesized superscripts.</p>\n<p>This only applies to synthesized superscripts. In other words, this has\nno effect if <code>typographic</code> is <code><span class=\"typ-key\">true</span></code> and the font provides the\nnecessary superscript glyphs.</p>\n<p>If set to <code><span class=\"typ-key\">auto</span></code>, the size is scaled according to the metrics provided\nby the font, with a fallback to <code><span class=\"typ-num\">0.6em</span></code> in case the font does not\ndefine the necessary metrics.</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":"body","details":[{"kind":"html","content":"<p>The text to display in superscript.</p>"}],"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false}],"returns":["content"],"scope":[]}}}