{"route":"/en-US-v0.13.1/reference/model/par/","title":"Paragraph","description":"Documentation for the `par` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"boxes-and-blocks","name":"Boxes and blocks","children":[]},{"id":"what-becomes-a-paragraph","name":"What becomes a paragraph?","children":[]},{"id":"example","name":"Example","children":[]},{"id":"parameters","name":"Parameters","children":[{"id":"parameters-leading","name":"leading","children":[]},{"id":"parameters-spacing","name":"spacing","children":[]},{"id":"parameters-justify","name":"justify","children":[]},{"id":"parameters-linebreaks","name":"linebreaks","children":[]},{"id":"parameters-first-line-indent","name":"first-line-indent","children":[]},{"id":"parameters-hanging-indent","name":"hanging-indent","children":[]},{"id":"parameters-body","name":"body","children":[]}]},{"id":"definitions","name":"Definitions","children":[{"id":"definitions-line","name":"Paragraph Line","children":[{"id":"definitions-line-numbering","name":"numbering","children":[]},{"id":"definitions-line-number-align","name":"number-align","children":[]},{"id":"definitions-line-number-margin","name":"number-margin","children":[]},{"id":"definitions-line-number-clearance","name":"number-clearance","children":[]},{"id":"definitions-line-numbering-scope","name":"numbering-scope","children":[]}]}]}],"body":{"kind":"func","content":{"path":[],"name":"par","title":"Paragraph","keywords":[],"oneliner":"A logical subdivison of textual content.","element":true,"contextual":false,"deprecation":null,"details":"<p>A logical subdivison of textual content.</p>\n<p>Typst automatically collects <em>inline-level</em> elements into paragraphs.\nInline-level elements include <a href=\"/en-US-v0.13.1/reference/text/text/\" title=\"text\">text</a>, <a href=\"/en-US-v0.13.1/reference/layout/h/\">horizontal spacing</a>,\n<a href=\"/en-US-v0.13.1/reference/layout/box/\">boxes</a>, and <a href=\"/en-US-v0.13.1/reference/math/equation/\">inline equations</a>.</p>\n<p>To separate paragraphs, use a blank line (or an explicit <a href=\"/en-US-v0.13.1/reference/model/parbreak/\" title=\"`parbreak`\"><code>parbreak</code></a>).\nParagraphs are also automatically interrupted by any block-level element\n(like <a href=\"/en-US-v0.13.1/reference/layout/block/\" title=\"`block`\"><code>block</code></a>, <a href=\"/en-US-v0.13.1/reference/layout/place/\" title=\"`place`\"><code>place</code></a>, or anything that shows itself as one of these).</p>\n<p>The <code>par</code> element is primarily used in set rules to affect paragraph\nproperties, but it can also be used to explicitly display its argument as a\nparagraph of its own. Then, the paragraph's body may not contain any\nblock-level content.</p>\n<h2 id=\"boxes-and-blocks\">Boxes and blocks</h2>\n<p>As explained above, usually paragraphs only contain inline-level content.\nHowever, you can integrate any kind of block-level content into a paragraph\nby wrapping it in a <a href=\"/en-US-v0.13.1/reference/layout/box/\" title=\"`box`\"><code>box</code></a>.</p>\n<p>Conversely, you can separate inline-level content from a paragraph by\nwrapping it in a <a href=\"/en-US-v0.13.1/reference/layout/block/\" title=\"`block`\"><code>block</code></a>. In this case, it will not become part of any\nparagraph at all. Read the following section for an explanation of why that\nmatters and how it differs from just adding paragraph breaks around the\ncontent.</p>\n<h2 id=\"what-becomes-a-paragraph\">What becomes a paragraph?</h2>\n<p>When you add inline-level content to your document, Typst will automatically\nwrap it in paragraphs. However, a typical document also contains some text\nthat is not semantically part of a paragraph, for example in a heading or\ncaption.</p>\n<p>The rules for when Typst wraps inline-level content in a paragraph are as\nfollows:</p>\n<ul>\n<li>\n<p>All text at the root of a document is wrapped in paragraphs.</p>\n</li>\n<li>\n<p>Text in a container (like a <code>block</code>) is only wrapped in a paragraph if the\ncontainer holds any block-level content. If all of the contents are\ninline-level, no paragraph is created.</p>\n</li>\n</ul>\n<p>In the laid-out document, it's not immediately visible whether text became\npart of a paragraph. However, it is still important for various reasons:</p>\n<ul>\n<li>\n<p>Certain paragraph styling like <code>first-line-indent</code> will only apply to\nproper paragraphs, not any text. Similarly, <code>par</code> show rules of course\nonly trigger on paragraphs.</p>\n</li>\n<li>\n<p>A proper distinction between paragraphs and other text helps people who\nrely on assistive technologies (such as screen readers) navigate and\nunderstand the document properly. Currently, this only applies to HTML\nexport since Typst does not yet output accessible PDFs, but support for\nthis is planned for the near future.</p>\n</li>\n<li>\n<p>HTML export will generate a <code>&lt;p&gt;</code> tag only for paragraphs.</p>\n</li>\n</ul>\n<p>When creating custom reusable components, you can and should take charge\nover whether Typst creates paragraphs. By wrapping text in a <a href=\"/en-US-v0.13.1/reference/layout/block/\" title=\"`block`\"><code>block</code></a>\ninstead of just adding paragraph breaks around it, you can force the absence\nof a paragraph. Conversely, by adding a <a href=\"/en-US-v0.13.1/reference/model/parbreak/\" title=\"`parbreak`\"><code>parbreak</code></a> after some content in a\ncontainer, you can force it to become a paragraph even if it's just one\nword. This is, for example, what <a href=\"/en-US-v0.13.1/reference/model/list/#parameters-tight\">non-<code>tight</code></a> lists do to\nforce their items to become paragraphs.</p>\n<h2 id=\"example\">Example</h2>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">par</span><span class=\"typ-punct\">(</span>\n  first-line-indent<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1em</span><span class=\"typ-punct\">,</span>\n  spacing<span class=\"typ-punct\">:</span> <span class=\"typ-num\">0.65em</span><span class=\"typ-punct\">,</span>\n  justify<span class=\"typ-punct\">:</span> <span class=\"typ-key\">true</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n\nWe proceed by contradiction.\nSuppose that there exists a set\nof positive integers <span class=\"typ-math-delim\">$</span>a<span class=\"typ-math-delim\">$</span>, <span class=\"typ-math-delim\">$</span>b<span class=\"typ-math-delim\">$</span>, and\n<span class=\"typ-math-delim\">$</span>c<span class=\"typ-math-delim\">$</span> that satisfies the equation\n<span class=\"typ-math-delim\">$</span>a<span class=\"typ-math-op\">^</span>n + b<span class=\"typ-math-op\">^</span>n = c<span class=\"typ-math-op\">^</span>n<span class=\"typ-math-delim\">$</span> for some\ninteger value of <span class=\"typ-math-delim\">$</span>n &gt; 2<span class=\"typ-math-delim\">$</span>.\n\nWithout loss of generality,\nlet <span class=\"typ-math-delim\">$</span>a<span class=\"typ-math-delim\">$</span> be the smallest of the\nthree integers. Then, we <span class=\"typ-escape\">...</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/cab222a5bd10633b8312040d645e7baf.png\" alt=\"Preview\"></div></div>","example":null,"self":false,"params":[{"name":"leading","details":"<p>The spacing between lines.</p>\n<p>Leading defines the spacing between the <a href=\"/en-US-v0.13.1/reference/text/text/#parameters-bottom-edge\">bottom edge</a>\nof one line and the <a href=\"/en-US-v0.13.1/reference/text/text/#parameters-top-edge\">top edge</a> of the following line. By\ndefault, these two properties are up to the font, but they can also be\nconfigured manually with a text set rule.</p>\n<p>By setting top edge, bottom edge, and leading, you can also configure a\nconsistent baseline-to-baseline distance. You could, for instance, set\nthe leading to <code><span class=\"typ-num\">1em</span></code>, the top-edge to <code><span class=\"typ-num\">0.8em</span></code>, and the bottom-edge\nto <code><span class=\"typ-op\">-</span><span class=\"typ-num\">0.2em</span></code> to get a baseline gap of exactly <code><span class=\"typ-num\">2em</span></code>. The exact\ndistribution of the top- and bottom-edge values affects the bounds of\nthe first and last line.</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":"spacing","details":"<p>The spacing between paragraphs.</p>\n<p>Just like leading, this defines the spacing between the bottom edge of a\nparagraph's last line and the top edge of the next paragraph's first\nline.</p>\n<p>When a paragraph is adjacent to a <a href=\"/en-US-v0.13.1/reference/layout/block/\" title=\"`block`\"><code>block</code></a> that is not a paragraph,\nthat block's <a href=\"/en-US-v0.13.1/reference/layout/block/#parameters-above\"><code>above</code></a> or <a href=\"/en-US-v0.13.1/reference/layout/block/#parameters-below\"><code>below</code></a> property\ntakes precedence over the paragraph spacing. Headings, for instance,\nreduce the spacing below them by default for a better look.</p>","example":null,"types":["length"],"strings":[],"default":"<code><span class=\"typ-num\">1.2em</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"justify","details":"<p>Whether to justify text in its line.</p>\n<p>Hyphenation will be enabled for justified paragraphs if the\n<a href=\"/en-US-v0.13.1/reference/text/text/#parameters-hyphenate\">text function's <code>hyphenate</code> property</a> is set to\n<code><span class=\"typ-key\">auto</span></code> and the current language is known.</p>\n<p>Note that the current <a href=\"/en-US-v0.13.1/reference/layout/align/#parameters-alignment\">alignment</a> still has an effect\non the placement of the last line except if it ends with a\n<a href=\"/en-US-v0.13.1/reference/text/linebreak/#parameters-justify\">justified line break</a>.</p>","example":null,"types":["bool"],"strings":[],"default":"<code><span class=\"typ-key\">false</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"linebreaks","details":"<p>How to determine line breaks.</p>\n<p>When this property is set to <code><span class=\"typ-key\">auto</span></code>, its default value, optimized line\nbreaks will be used for justified paragraphs. Enabling optimized line\nbreaks for ragged paragraphs may also be worthwhile to improve the\nappearance of the text.</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>width<span class=\"typ-punct\">:</span> <span class=\"typ-num\">207pt</span><span class=\"typ-punct\">)</span>\n<span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">par</span><span class=\"typ-punct\">(</span>linebreaks<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;simple&quot;</span><span class=\"typ-punct\">)</span>\nSome texts feature many longer\nwords. Those are often exceedingly\nchallenging to break in a visually\npleasing way.\n\n<span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">par</span><span class=\"typ-punct\">(</span>linebreaks<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;optimized&quot;</span><span class=\"typ-punct\">)</span>\nSome texts feature many longer\nwords. Those are often exceedingly\nchallenging to break in a visually\npleasing way.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/afe7dac249a627a4a78b08bcfbe89be6.png\" alt=\"Preview\"></div></div>","types":["auto","str"],"strings":[{"string":"simple","details":"<p>Determine the line breaks in a simple first-fit style.</p>"},{"string":"optimized","details":"<p>Optimize the line breaks for the whole paragraph.</p>\n<p>Typst will try to produce more evenly filled lines of text by\nconsidering the whole paragraph when calculating line breaks.</p>"}],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"first-line-indent","details":"<p>The indent the first line of a paragraph should have.</p>\n<p>By default, only the first line of a consecutive paragraph will be\nindented (not the first one in the document or container, and not\nparagraphs immediately following other block-level elements).</p>\n<p>If you want to indent all paragraphs instead, you can pass a dictionary\ncontaining the <code>amount</code> of indent as a length and the pair\n<code>all: <span class=\"typ-key\">true</span></code>. When <code>all</code> is omitted from the dictionary, it defaults to\n<code><span class=\"typ-key\">false</span></code>.</p>\n<p>By typographic convention, paragraph breaks are indicated either by some\nspace between paragraphs or by indented first lines. Consider</p>\n<ul>\n<li>reducing the <a href=\"/en-US-v0.13.1/reference/model/par/#parameters-spacing\">paragraph <code>spacing</code></a> to the\n<a href=\"/en-US-v0.13.1/reference/model/par/#parameters-leading\"><code>leading</code></a> using <code><span class=\"typ-key\">set</span> <span class=\"typ-func\">par</span><span class=\"typ-punct\">(</span>spacing<span class=\"typ-punct\">:</span> <span class=\"typ-num\">0.65em</span><span class=\"typ-punct\">)</span></code></li>\n<li>increasing the <a href=\"/en-US-v0.13.1/reference/layout/block/#parameters-spacing\">block <code>spacing</code></a> (which inherits the\nparagraph spacing by default) to the original paragraph spacing using\n<code><span class=\"typ-key\">set</span> <span class=\"typ-func\">block</span><span class=\"typ-punct\">(</span>spacing<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1.2em</span><span class=\"typ-punct\">)</span></code></li>\n</ul>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">block</span><span class=\"typ-punct\">(</span>spacing<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1.2em</span><span class=\"typ-punct\">)</span>\n<span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">par</span><span class=\"typ-punct\">(</span>\n  first-line-indent<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1.5em</span><span class=\"typ-punct\">,</span>\n  spacing<span class=\"typ-punct\">:</span> <span class=\"typ-num\">0.65em</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n\nThe first paragraph is not affected\nby the indent.\n\nBut the second paragraph is.\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">line</span><span class=\"typ-punct\">(</span>length<span class=\"typ-punct\">:</span> <span class=\"typ-num\">100%</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">par</span><span class=\"typ-punct\">(</span>first-line-indent<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span>\n  amount<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1.5em</span><span class=\"typ-punct\">,</span>\n  all<span class=\"typ-punct\">:</span> <span class=\"typ-key\">true</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span>\n\nNow all paragraphs are affected\nby the first line indent.\n\nEven the first one.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/8d7d84d566dc85bdc1bc0863bc851879.png\" alt=\"Preview\"></div></div>","types":["length","dictionary"],"strings":[],"default":"<code><span class=\"typ-punct\">(</span>amount<span class=\"typ-punct\">:</span> <span class=\"typ-num\">0pt</span><span class=\"typ-punct\">,</span> all<span class=\"typ-punct\">:</span> <span class=\"typ-key\">false</span><span class=\"typ-punct\">)</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"hanging-indent","details":"<p>The indent that all but the first line of a paragraph should have.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">par</span><span class=\"typ-punct\">(</span>hanging-indent<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1em</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">lorem</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">15</span><span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/7bde69f34692105af6720864a7d17480.png\" alt=\"Preview\"></div></div>","types":["length"],"strings":[],"default":"<code><span class=\"typ-num\">0pt</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"body","details":"<p>The contents of the paragraph.</p>","example":null,"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false}],"returns":["content"],"scope":[{"path":["par"],"name":"line","title":"Paragraph Line","keywords":["line numbering"],"oneliner":"A paragraph line.","element":true,"contextual":false,"deprecation":null,"details":"<p>A paragraph line.</p>\n<p>This element is exclusively used for line number configuration through set\nrules and cannot be placed.</p>\n<p>The <a href=\"/en-US-v0.13.1/reference/model/par/#definitions-line-numbering\"><code>numbering</code></a> option is used to enable line\nnumbers by specifying a numbering format.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> par<span class=\"typ-punct\">.</span><span class=\"typ-func\">line</span><span class=\"typ-punct\">(</span>numbering<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;1&quot;</span><span class=\"typ-punct\">)</span>\n\nRoses are red. <span class=\"typ-escape\">\\</span>\nViolets are blue. <span class=\"typ-escape\">\\</span>\nTypst is there for you.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/6f6e7b60b1d411a81b15694f783e2013.png\" alt=\"Preview\"></div></div>\n<p>The <code>numbering</code> option takes either a predefined\n<a href=\"/en-US-v0.13.1/reference/model/numbering/\">numbering pattern</a> or a function returning styled content. You\ncan disable line numbers for text inside certain elements by setting the\nnumbering to <code><span class=\"typ-key\">none</span></code> using show-set rules.</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-comment\">// Styled red line numbers.</span>\n<span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> par<span class=\"typ-punct\">.</span><span class=\"typ-func\">line</span><span class=\"typ-punct\">(</span>\n  numbering<span class=\"typ-punct\">:</span> n <span class=\"typ-op\">=&gt;</span> <span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span>red<span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span><span class=\"typ-pol\">#</span><span class=\"typ-pol\">n</span><span class=\"typ-punct\">]</span>\n<span class=\"typ-punct\">)</span>\n\n<span class=\"typ-comment\">// Disable numbers inside figures.</span>\n<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> par<span class=\"typ-punct\">.</span><span class=\"typ-func\">line</span><span class=\"typ-punct\">(</span>\n  numbering<span class=\"typ-punct\">:</span> <span class=\"typ-key\">none</span>\n<span class=\"typ-punct\">)</span>\n\nRoses are red. <span class=\"typ-escape\">\\</span>\nViolets are blue.\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Without line numbers.<span class=\"typ-punct\">]</span>\n<span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>\n  Lorem ipsum <span class=\"typ-escape\">\\</span>\n  dolor sit amet\n<span class=\"typ-punct\">]</span>\n\nThe text above is a sample <span class=\"typ-escape\">\\</span>\noriginating from distant times.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/58937016f47739bbce0d3f8c6d6a9f94.png\" alt=\"Preview\"></div></div>\n<p>This element exposes further options which may be used to control other\naspects of line numbering, such as its <a href=\"/en-US-v0.13.1/reference/model/par/#definitions-line-number-align\">alignment</a>\nor <a href=\"/en-US-v0.13.1/reference/model/par/#definitions-line-number-margin\">margin</a>. In addition, you can control whether\nthe numbering is reset on each page through the\n<a href=\"/en-US-v0.13.1/reference/model/par/#definitions-line-numbering-scope\"><code>numbering-scope</code></a> option.</p>","self":false,"params":[{"name":"numbering","details":"<p>How to number each line. Accepts a\n<a href=\"/en-US-v0.13.1/reference/model/numbering/\">numbering pattern or function</a>.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> par<span class=\"typ-punct\">.</span><span class=\"typ-func\">line</span><span class=\"typ-punct\">(</span>numbering<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;I&quot;</span><span class=\"typ-punct\">)</span>\n\nRoses are red. <span class=\"typ-escape\">\\</span>\nViolets are blue. <span class=\"typ-escape\">\\</span>\nTypst is there for you.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/3bea09a9873e3b0128c5aa69c4ae0064.png\" alt=\"Preview\"></div></div>","types":["none","str","function"],"strings":[],"default":"<code><span class=\"typ-key\">none</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"number-align","details":"<p>The alignment of line numbers associated with each line.</p>\n<p>The default of <code><span class=\"typ-key\">auto</span></code> indicates a smart default where numbers grow\nhorizontally away from the text, considering the margin they're in and\nthe current text direction.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> par<span class=\"typ-punct\">.</span><span class=\"typ-func\">line</span><span class=\"typ-punct\">(</span>\n  numbering<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;I&quot;</span><span class=\"typ-punct\">,</span>\n  number-align<span class=\"typ-punct\">:</span> left<span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n\nHello world! <span class=\"typ-escape\">\\</span>\nToday is a beautiful day <span class=\"typ-escape\">\\</span>\nFor exploring the world.\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/5dfc01320623b767c6791805aff923e0.png\" alt=\"Preview\"></div></div>","types":["auto","alignment"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"number-margin","details":"<p>The margin at which line numbers appear.</p>\n<p><em>Note:</em> In a multi-column document, the line numbers for paragraphs\ninside the last column will always appear on the <code>end</code> margin (right\nmargin for left-to-right text and left margin for right-to-left),\nregardless of this configuration. That behavior cannot be changed at\nthis moment.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> par<span class=\"typ-punct\">.</span><span class=\"typ-func\">line</span><span class=\"typ-punct\">(</span>\n  numbering<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;1&quot;</span><span class=\"typ-punct\">,</span>\n  number-margin<span class=\"typ-punct\">:</span> right<span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n\n<span class=\"typ-heading\">= Report</span>\n<span class=\"typ-marker\">-</span> Brightness: Dark, yet darker\n<span class=\"typ-marker\">-</span> Readings: Negative\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/bdfd1906b97281550007248cb244da29.png\" alt=\"Preview\"></div></div>","types":["alignment"],"strings":[],"default":"<code>start</code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"number-clearance","details":"<p>The distance between line numbers and text.</p>\n<p>The default value of <code><span class=\"typ-key\">auto</span></code> results in a clearance that is adaptive to\nthe page width and yields reasonable results in most cases.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> par<span class=\"typ-punct\">.</span><span class=\"typ-func\">line</span><span class=\"typ-punct\">(</span>\n  numbering<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;1&quot;</span><span class=\"typ-punct\">,</span>\n  number-clearance<span class=\"typ-punct\">:</span> <span class=\"typ-num\">4pt</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n\nTypesetting <span class=\"typ-escape\">\\</span>\nStyling <span class=\"typ-escape\">\\</span>\nLayout\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/3208940772e8c44d0944e5a81c93ec96.png\" alt=\"Preview\"></div></div>","types":["auto","length"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"numbering-scope","details":"<p>Controls when to reset line numbering.</p>\n<p><em>Note:</em> The line numbering scope must be uniform across each page run (a\npage run is a sequence of pages without an explicit pagebreak in\nbetween). For this reason, set rules for it should be defined before any\npage content, typically at the very start of the document.</p>","example":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> par<span class=\"typ-punct\">.</span><span class=\"typ-func\">line</span><span class=\"typ-punct\">(</span>\n  numbering<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;1&quot;</span><span class=\"typ-punct\">,</span>\n  numbering-scope<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;page&quot;</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n\nFirst line <span class=\"typ-escape\">\\</span>\nSecond line\n<span class=\"typ-func\">#</span><span class=\"typ-func\">pagebreak</span><span class=\"typ-punct\">(</span><span class=\"typ-punct\">)</span>\nFirst line again <span class=\"typ-escape\">\\</span>\nSecond line again\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/3269883aef94076b02e0694e837a23f4.png\" alt=\"Preview\"></div></div>","types":["str"],"strings":[{"string":"document","details":"<p>Indicates that the line number counter spans the whole document, i.e.,\nit's never automatically reset.</p>"},{"string":"page","details":"<p>Indicates that the line number counter should be reset at the start of\nevery new page.</p>"}],"default":"<code><span class=\"typ-str\">&quot;document&quot;</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true}],"returns":["content"],"scope":[]}]}}}