{"route":"/en-US-v0.13.1/tutorial/making-a-template/","title":"Making a Template","description":"Typst's tutorial.","part":null,"outline":[{"id":"toy-template","name":"Toy Template","children":[]},{"id":"set-and-show-rules","name":"Set And Show Rules","children":[]},{"id":"named-arguments","name":"Named Arguments","children":[]},{"id":"separate-file","name":"Separate File","children":[]},{"id":"review","name":"Review","children":[]}],"body":{"kind":"html","content":"<h1>Making a Template</h1>\n<p>In the previous three chapters of this tutorial, you have learned how to write a\ndocument in Typst, apply basic styles, and customize its appearance in-depth to\ncomply with a publisher's style guide. Because the paper you wrote in the\nprevious chapter was a tremendous success, you have been asked to write a\nfollow-up article for the same conference. This time, you want to take the style\nyou created in the previous chapter and turn it into a reusable template. In\nthis chapter you will learn how to create a template that you and your team can\nuse with just one show rule. Let's get started!</p>\n<h2 id=\"toy-template\">A toy template</h2>\n<p>In Typst, templates are functions in which you can wrap your whole document. To\nlearn how to do that, let's first review how to write your very own functions.\nThey can do anything you want them to, so why not go a bit crazy?</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">let</span> <span class=\"typ-func\">amazed</span><span class=\"typ-punct\">(</span>term<span class=\"typ-punct\">)</span> <span class=\"typ-op\">=</span> <span class=\"typ-func\">box</span><span class=\"typ-punct\">[</span>✨ <span class=\"typ-pol\">#</span><span class=\"typ-pol\">term</span> ✨<span class=\"typ-punct\">]</span>\n\nYou are <span class=\"typ-func\">#</span><span class=\"typ-func\">amazed</span><span class=\"typ-punct\">[</span>beautiful<span class=\"typ-punct\">]</span>!\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/85ffb432ec9336d10dbea32ea93e4896.png\" alt=\"Preview\"></div></div>\n<p>This function takes a single argument, <code>term</code>, and returns a content block with\nthe <code>term</code> surrounded by sparkles. We also put the whole thing in a box so that\nthe term we are amazed by cannot be separated from its sparkles by a line break.</p>\n<p>Many functions that come with Typst have optional named parameters. Our\nfunctions can also have them. Let's add a parameter to our function that lets us\nchoose the color of the text. We need to provide a default color in case the\nparameter isn't given.</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">let</span> <span class=\"typ-func\">amazed</span><span class=\"typ-punct\">(</span>term<span class=\"typ-punct\">,</span> color<span class=\"typ-punct\">:</span> blue<span class=\"typ-punct\">)</span> <span class=\"typ-op\">=</span> <span class=\"typ-punct\">{</span>\n  <span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span>color<span class=\"typ-punct\">,</span> <span class=\"typ-func\">box</span><span class=\"typ-punct\">[</span>✨ <span class=\"typ-pol\">#</span><span class=\"typ-pol\">term</span> ✨<span class=\"typ-punct\">]</span><span class=\"typ-punct\">)</span>\n<span class=\"typ-punct\">}</span>\n\nYou are <span class=\"typ-func\">#</span><span class=\"typ-func\">amazed</span><span class=\"typ-punct\">[</span>beautiful<span class=\"typ-punct\">]</span>!\nI am <span class=\"typ-func\">#</span><span class=\"typ-func\">amazed</span><span class=\"typ-punct\">(</span>color<span class=\"typ-punct\">:</span> purple<span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>amazed<span class=\"typ-punct\">]</span>!\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/de3b1f5b9b2c4f6a9672c242956d317.png\" alt=\"Preview\"></div></div>\n<p>Templates now work by wrapping our whole document in a custom function like\n<code>amazed</code>. But wrapping a whole document in a giant function call would be\ncumbersome! Instead, we can use an &quot;everything&quot; show rule to achieve the same\nwith cleaner code. To write such a show rule, put a colon directly behind the\nshow keyword and then provide a function. This function is given the rest of the\ndocument as a parameter. The function can then do anything with this content.\nSince the <code>amazed</code> function can be called with a single content argument, we can\njust pass it by name to the show rule. Let's try it:</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">show</span><span class=\"typ-punct\">:</span> <span class=\"typ-func\">amazed</span>\nI choose to focus on the good\nin my life and let go of any\nnegative thoughts or beliefs.\nIn fact, I am amazing!\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/808bff8bf2db750d153f0acbf0b0fbf1.png\" alt=\"Preview\"></div></div>\n<p>Our whole document will now be passed to the <code>amazed</code> function, as if we wrapped\nit around it. Of course, this is not especially useful with this particular\nfunction, but when combined with set rules and named arguments, it can be very\npowerful.</p>\n<h2 id=\"set-and-show-rules\">Embedding set and show rules</h2>\n<p>To apply some set and show rules to our template, we can use <code>set</code> and <code>show</code>\nwithin a content block in our function and then insert the document into\nthat content block.</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">let</span> <span class=\"typ-func\">template</span><span class=\"typ-punct\">(</span>doc<span class=\"typ-punct\">)</span> <span class=\"typ-op\">=</span> <span class=\"typ-punct\">[</span>\n  <span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span>font<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Inria Serif&quot;</span><span class=\"typ-punct\">)</span>\n  <span class=\"typ-key\">#</span><span class=\"typ-key\">show</span> <span class=\"typ-str\">&quot;something cool&quot;</span><span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Typst<span class=\"typ-punct\">]</span>\n  <span class=\"typ-pol\">#</span><span class=\"typ-pol\">doc</span>\n<span class=\"typ-punct\">]</span>\n\n<span class=\"typ-key\">#</span><span class=\"typ-key\">show</span><span class=\"typ-punct\">:</span> <span class=\"typ-func\">template</span>\nI am learning something cool today.\nIt&#39;s going great so far!\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/3e1c39dbdd957964b7524749bf0cfd5.png\" alt=\"Preview\"></div></div>\n<p>Just like we already discovered in the previous chapter, set rules will apply to\neverything within their content block. Since the everything show rule passes our\nwhole document to the <code>template</code> function, the text set rule and string show\nrule in our template will apply to the whole document. Let's use this knowledge\nto create a template that reproduces the body style of the paper we wrote in the\nprevious chapter.</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">let</span> <span class=\"typ-func\">conf</span><span class=\"typ-punct\">(</span>title<span class=\"typ-punct\">,</span> doc<span class=\"typ-punct\">)</span> <span class=\"typ-op\">=</span> <span class=\"typ-punct\">{</span>\n  <span class=\"typ-key\">set</span> <span class=\"typ-func\">page</span><span class=\"typ-punct\">(</span>\n    paper<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;us-letter&quot;</span><span class=\"typ-punct\">,</span>\n    header<span class=\"typ-punct\">:</span> <span class=\"typ-func\">align</span><span class=\"typ-punct\">(</span>\n      right <span class=\"typ-op\">+</span> horizon<span class=\"typ-punct\">,</span>\n      title\n    <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n    columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-op\">..</span><span class=\"typ-punct\">.</span>\n  <span class=\"typ-punct\">)</span>\n  <span class=\"typ-key\">set</span> <span class=\"typ-func\">par</span><span class=\"typ-punct\">(</span>justify<span class=\"typ-punct\">:</span> <span class=\"typ-key\">true</span><span class=\"typ-punct\">)</span>\n  <span class=\"typ-key\">set</span> <span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span>\n    font<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Libertinus Serif&quot;</span><span class=\"typ-punct\">,</span>\n    size<span class=\"typ-punct\">:</span> <span class=\"typ-num\">11pt</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">)</span>\n\n  <span class=\"typ-comment\">// Heading show rules.</span>\n  ...\n\n  doc\n<span class=\"typ-punct\">}</span>\n\n<span class=\"typ-key\">#</span><span class=\"typ-key\">show</span><span class=\"typ-punct\">:</span> doc <span class=\"typ-op\">=&gt;</span> <span class=\"typ-func\">conf</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-punct\">[</span>Paper title<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  doc<span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n\n<span class=\"typ-heading\">= Introduction</span>\n<span class=\"typ-func\">#</span><span class=\"typ-func\">lorem</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">90</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-escape\">...</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/66ad67651ea85a8fb4d680ad3f9a0a0c.png\" alt=\"Preview\"></div></div>\n<p>We copy-pasted most of that code from the previous chapter. The two differences\nare this:</p>\n<ol>\n<li>\n<p>We wrapped everything in the function <code>conf</code> using an everything show rule.\nThe function applies a few set and show rules and echoes the content it has\nbeen passed at the end.</p>\n</li>\n<li>\n<p>Moreover, we used a curly-braced code block instead of a content block. This\nway, we don't need to prefix all set rules and function calls with a <code>#</code>. In\nexchange, we cannot write markup directly in the code block anymore.</p>\n</li>\n</ol>\n<p>Also note where the title comes from: We previously had it inside of a variable.\nNow, we are receiving it as the first parameter of the template function. To do\nso, we passed a closure (that's a function without a name that is used right\naway) to the everything show rule. We did that because the <code>conf</code> function\nexpects two positional arguments, the title and the body, but the show rule will\nonly pass the body. Therefore, we add a new function definition that allows us\nto set a paper title and use the single parameter from the show rule.</p>\n<h2 id=\"named-arguments\">Templates with named arguments</h2>\n<p>Our paper in the previous chapter had a title and an author list. Let's add\nthese things to our template. In addition to the title, we want our template to\naccept a list of authors with their affiliations and the paper's abstract. To\nkeep things readable, we'll add those as named arguments. In the end, we want it\nto work like this:</p>\n<pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">show</span><span class=\"typ-punct\">:</span> doc <span class=\"typ-op\">=&gt;</span> <span class=\"typ-func\">conf</span><span class=\"typ-punct\">(</span>\n  title<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Towards Improved Modelling<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  authors<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span>\n    <span class=\"typ-punct\">(</span>\n      name<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Theresa Tungsten&quot;</span><span class=\"typ-punct\">,</span>\n      affiliation<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Artos Institute&quot;</span><span class=\"typ-punct\">,</span>\n      email<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;tung@artos.edu&quot;</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-punct\">(</span>\n      name<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Eugene Deklan&quot;</span><span class=\"typ-punct\">,</span>\n      affiliation<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Honduras State&quot;</span><span class=\"typ-punct\">,</span>\n      email<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;e.deklan@hstate.hn&quot;</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  abstract<span class=\"typ-punct\">:</span> <span class=\"typ-func\">lorem</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">80</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  doc<span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n\n<span class=\"typ-escape\">...</span>\n</code></pre>\n<p>Let's build this new template function. First, we add a default value to the\n<code>title</code> argument. This way, we can call the template without specifying a title.\nWe also add the named <code>authors</code> and <code>abstract</code> parameters with empty defaults.\nNext, we copy the code that generates title, abstract and authors from the\nprevious chapter into the template, replacing the fixed details with the\nparameters.</p>\n<p>The new <code>authors</code> parameter expects an <a href=\"/en-US-v0.13.1/reference/foundations/array/\" title=\"array\">array</a> of <a href=\"/en-US-v0.13.1/reference/foundations/dictionary/\">dictionaries</a>\nwith the keys <code>name</code>, <code>affiliation</code> and <code>email</code>. Because we can have an\narbitrary number of authors, we dynamically determine if we need one, two or\nthree columns for the author list. First, we determine the number of authors\nusing the <a href=\"/en-US-v0.13.1/reference/foundations/array/#definitions-len\"><code>.len()</code></a> method on the <code>authors</code> array. Then, we set the\nnumber of columns as the minimum of this count and three, so that we never\ncreate more than three columns. If there are more than three authors, a new row\nwill be inserted instead. For this purpose, we have also added a <code>row-gutter</code>\nparameter to the <code>grid</code> function. Otherwise, the rows would be too close\ntogether. To extract the details about the authors from the dictionary, we use\nthe <a href=\"/en-US-v0.13.1/reference/scripting/#fields\">field access syntax</a>.</p>\n<p>We still have to provide an argument to the grid for each author: Here is where\nthe array's <a href=\"/en-US-v0.13.1/reference/foundations/array/#definitions-map\"><code>map</code> method</a> comes in handy. It takes a function as an\nargument that gets called with each item of the array. We pass it a function\nthat formats the details for each author and returns a new array containing\ncontent values. We've now got one array of values that we'd like to use as\nmultiple arguments for the grid. We can do that by using the\n<a href=\"/en-US-v0.13.1/reference/foundations/arguments/\"><code>spread</code> operator</a>. It takes an array and applies each of its items\nas a separate argument to the function.</p>\n<p>The resulting template function looks like this:</p>\n<pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">let</span> <span class=\"typ-func\">conf</span><span class=\"typ-punct\">(</span>\n  title<span class=\"typ-punct\">:</span> <span class=\"typ-key\">none</span><span class=\"typ-punct\">,</span>\n  authors<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  abstract<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span><span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  doc<span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span> <span class=\"typ-op\">=</span> <span class=\"typ-punct\">{</span>\n  <span class=\"typ-comment\">// Set and show rules from before.</span>\n  ...\n\n  <span class=\"typ-key\">set</span> <span class=\"typ-func\">align</span><span class=\"typ-punct\">(</span>center<span class=\"typ-punct\">)</span>\n  <span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">17pt</span><span class=\"typ-punct\">,</span> title<span class=\"typ-punct\">)</span>\n\n  <span class=\"typ-key\">let</span> count <span class=\"typ-op\">=</span> authors<span class=\"typ-punct\">.</span><span class=\"typ-func\">len</span><span class=\"typ-punct\">(</span><span class=\"typ-punct\">)</span>\n  <span class=\"typ-key\">let</span> ncols <span class=\"typ-op\">=</span> calc<span class=\"typ-punct\">.</span><span class=\"typ-func\">min</span><span class=\"typ-punct\">(</span>count<span class=\"typ-punct\">,</span> <span class=\"typ-num\">3</span><span class=\"typ-punct\">)</span>\n  <span class=\"typ-func\">grid</span><span class=\"typ-punct\">(</span>\n    columns<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span><span class=\"typ-num\">1fr</span><span class=\"typ-punct\">,</span><span class=\"typ-punct\">)</span> <span class=\"typ-op\">*</span> ncols<span class=\"typ-punct\">,</span>\n    row-gutter<span class=\"typ-punct\">:</span> <span class=\"typ-num\">24pt</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-op\">..</span>authors<span class=\"typ-punct\">.</span><span class=\"typ-func\">map</span><span class=\"typ-punct\">(</span>author <span class=\"typ-op\">=&gt;</span> <span class=\"typ-punct\">[</span>\n      <span class=\"typ-pol\">#</span><span class=\"typ-pol\">author</span><span class=\"typ-punct\">.</span><span class=\"typ-pol\">name</span> <span class=\"typ-escape\">\\</span>\n      <span class=\"typ-pol\">#</span><span class=\"typ-pol\">author</span><span class=\"typ-punct\">.</span><span class=\"typ-pol\">affiliation</span> <span class=\"typ-escape\">\\</span>\n      <span class=\"typ-func\">#</span><span class=\"typ-func\">link</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;mailto:&quot;</span> <span class=\"typ-op\">+</span> author<span class=\"typ-punct\">.</span>email<span class=\"typ-punct\">)</span>\n    <span class=\"typ-punct\">]</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">)</span>\n\n  <span class=\"typ-func\">par</span><span class=\"typ-punct\">(</span>justify<span class=\"typ-punct\">:</span> <span class=\"typ-key\">false</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>\n    <span class=\"typ-strong\">*Abstract*</span> <span class=\"typ-escape\">\\</span>\n    <span class=\"typ-pol\">#</span><span class=\"typ-pol\">abstract</span>\n  <span class=\"typ-punct\">]</span>\n\n  <span class=\"typ-key\">set</span> <span class=\"typ-func\">align</span><span class=\"typ-punct\">(</span>left<span class=\"typ-punct\">)</span>\n  doc\n<span class=\"typ-punct\">}</span>\n</code></pre>\n<h2 id=\"separate-file\">A separate file</h2>\n<p>Most of the time, a template is specified in a different file and then imported\ninto the document. This way, the main file you write in is kept clutter free and\nyour template is easily reused. Create a new text file in the file panel by\nclicking the plus button and name it <code>conf.typ</code>. Move the <code>conf</code> function\ndefinition inside of that new file. Now you can access it from your main file by\nadding an import before the show rule. Specify the path of the file between the\n<code><span class=\"typ-key\">import</span></code> keyword and a colon, then name the function that you want to import.</p>\n<p>Another thing that you can do to make applying templates just a bit more elegant\nis to use the <a href=\"/en-US-v0.13.1/reference/foundations/function/#definitions-with\"><code>.with</code></a> method on functions to pre-populate all\nthe named arguments. This way, you can avoid spelling out a closure and\nappending the content argument at the bottom of your template list. Templates on\n<a href=\"https://typst.app/universe/\">Typst Universe</a> are designed to work with this style of function\ncall.</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">import</span> <span class=\"typ-str\">&quot;conf.typ&quot;</span><span class=\"typ-punct\">:</span> conf\n<span class=\"typ-key\">#</span><span class=\"typ-key\">show</span><span class=\"typ-punct\">:</span> conf<span class=\"typ-punct\">.</span><span class=\"typ-func\">with</span><span class=\"typ-punct\">(</span>\n  title<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>\n    Towards Improved Modelling\n  <span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  authors<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span>\n    <span class=\"typ-punct\">(</span>\n      name<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Theresa Tungsten&quot;</span><span class=\"typ-punct\">,</span>\n      affiliation<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Artos Institute&quot;</span><span class=\"typ-punct\">,</span>\n      email<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;tung@artos.edu&quot;</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-punct\">(</span>\n      name<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Eugene Deklan&quot;</span><span class=\"typ-punct\">,</span>\n      affiliation<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Honduras State&quot;</span><span class=\"typ-punct\">,</span>\n      email<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;e.deklan@hstate.hn&quot;</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  abstract<span class=\"typ-punct\">:</span> <span class=\"typ-func\">lorem</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">80</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n\n<span class=\"typ-heading\">= Introduction</span>\n<span class=\"typ-func\">#</span><span class=\"typ-func\">lorem</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">90</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-heading\">== Motivation</span>\n<span class=\"typ-func\">#</span><span class=\"typ-func\">lorem</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">140</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-heading\">== Problem Statement</span>\n<span class=\"typ-func\">#</span><span class=\"typ-func\">lorem</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">50</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-heading\">= Related Work</span>\n<span class=\"typ-func\">#</span><span class=\"typ-func\">lorem</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">200</span><span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/71965415e327348a4c69a4eed03fbdc.png\" alt=\"Preview\"></div></div>\n<p>We have now converted the conference paper into a reusable template for that\nconference! Why not share it in the <a href=\"https://forum.typst.app/\">Forum</a> or on\n<a href=\"https://discord.gg/2uDybryKPe\">Typst's Discord server</a> so that others can use\nit too?</p>\n<h2 id=\"review\">Review</h2>\n<p>Congratulations, you have completed Typst's Tutorial! In this section, you have\nlearned how to define your own functions and how to create and apply templates\nthat define reusable document styles. You've made it far and learned a lot. You\ncan now use Typst to write your own documents and share them with others.</p>\n<p>We are still a super young project and are looking for feedback. If you have any\nquestions, suggestions or you found a bug, please let us know\nin the <a href=\"https://forum.typst.app/\">Forum</a>,\non our <a href=\"https://discord.gg/2uDybryKPe\">Discord server</a>,\non <a href=\"https://github.com/typst/typst/\">GitHub</a>,\nor via the web app's feedback form (always available in the Help menu).</p>\n<p>So what are you waiting for? <a href=\"https://typst.app\">Sign up</a> and write something!</p>"}}