{"route":"/en-US-v0.13.1/changelog/0.4.0/","title":"0.4.0","description":"Changes in Typst 0.4.0","part":null,"outline":[{"id":"footnotes","name":"Footnotes","children":[]},{"id":"documentation","name":"Documentation","children":[]},{"id":"math","name":"Math","children":[]},{"id":"scripting","name":"Scripting","children":[]},{"id":"text-and-layout","name":"Text and Layout","children":[]},{"id":"export","name":"Export","children":[]},{"id":"web-app","name":"Web app","children":[]},{"id":"miscellaneous-improvements","name":"Miscellaneous Improvements","children":[]},{"id":"contributors","name":"Contributors","children":[]}],"body":{"kind":"html","content":"<h1>Version 0.4.0 (May 20, 2023)</h1>\n<h2 id=\"footnotes\">Footnotes</h2>\n<ul>\n<li>Implemented support for footnotes</li>\n<li>The <a href=\"/en-US-v0.13.1/reference/model/footnote/\" title=\"`footnote`\"><code>footnote</code></a> function inserts a footnote</li>\n<li>The <a href=\"/en-US-v0.13.1/reference/model/footnote/#definitions-entry\"><code>footnote.entry</code></a> function can be used to customize the\nfootnote listing</li>\n<li>The <code><span class=\"typ-str\">&quot;chicago-notes&quot;</span></code> <a href=\"/en-US-v0.13.1/reference/model/cite/#parameters-style\">citation style</a> is now available</li>\n</ul>\n<h2 id=\"documentation\">Documentation</h2>\n<ul>\n<li>Added a <a href=\"/en-US-v0.13.1/guides/guide-for-latex-users/\">Guide for LaTeX users</a></li>\n<li>Now shows default values for optional arguments</li>\n<li>Added richer outlines in &quot;On this Page&quot;</li>\n<li>Added initial support for search keywords: &quot;Table of Contents&quot; will now find\nthe <a href=\"/en-US-v0.13.1/reference/model/outline/\" title=\"outline\">outline</a> function. Suggestions for more keywords are welcome!</li>\n<li>Fixed issue with search result ranking</li>\n<li>Fixed many more small issues</li>\n</ul>\n<h2 id=\"math\">Math</h2>\n<ul>\n<li><strong>Breaking change</strong>: Alignment points (<code>&amp;</code>) in equations now alternate between\nleft and right alignment</li>\n<li>Added support for writing roots with Unicode: For example, <code><span class=\"typ-math-delim\">$</span><span class=\"typ-func\">root</span><span class=\"typ-punct\">(</span>x+y<span class=\"typ-punct\">)</span><span class=\"typ-math-delim\">$</span></code> can\nnow also be written as <code><span class=\"typ-math-delim\">$</span><span class=\"typ-math-op\">√</span><span class=\"typ-punct\">(</span>x+y<span class=\"typ-punct\">)</span><span class=\"typ-math-delim\">$</span></code></li>\n<li>Fixed uneven vertical <a href=\"/en-US-v0.13.1/reference/math/attach/#functions-attach\"><code>attachment</code></a> alignment</li>\n<li>Fixed spacing on decorated elements (e.g., spacing around a\n<a href=\"/en-US-v0.13.1/reference/math/cancel/\">canceled</a> operator)</li>\n<li>Fixed styling for stretchable symbols</li>\n<li>Added <code>tack.r.double</code>, <code>tack.l.double</code>, <code>dotless.i</code> and <code>dotless.j</code>\n<a href=\"/en-US-v0.13.1/reference/symbols/sym/\">symbols</a></li>\n<li>Fixed show rules on symbols (e.g. <code><span class=\"typ-key\">show</span> sym<span class=\"typ-punct\">.</span><span class=\"typ-func\">tack</span><span class=\"typ-punct\">:</span> <span class=\"typ-key\">set</span> <span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span>blue<span class=\"typ-punct\">)</span></code>)</li>\n<li>Fixed missing rename from <code>ast.op</code> to <code>ast</code> that should have been in the\nprevious release</li>\n</ul>\n<h2 id=\"scripting\">Scripting</h2>\n<ul>\n<li>Added function scopes: A function can now hold related definitions in its own\nscope, similar to a module. The new <a href=\"/en-US-v0.13.1/reference/foundations/assert/#definitions-eq\"><code>assert.eq</code></a> function, for\ninstance, is part of the <a href=\"/en-US-v0.13.1/reference/foundations/assert/\" title=\"`assert`\"><code>assert</code></a> function's scope. Note that function\nscopes are currently only available for built-in functions.</li>\n<li>Added <a href=\"/en-US-v0.13.1/reference/foundations/assert/#definitions-eq\"><code>assert.eq</code></a> and <a href=\"/en-US-v0.13.1/reference/foundations/assert/#definitions-ne\"><code>assert.ne</code></a> functions for\nsimpler equality and inequality assertions with more helpful error messages</li>\n<li>Exposed <a href=\"/en-US-v0.13.1/reference/model/list/#definitions-item\">list</a>, <a href=\"/en-US-v0.13.1/reference/model/enum/#definitions-item\">enum</a>, and <a href=\"/en-US-v0.13.1/reference/model/terms/#definitions-item\">term list</a>\nitems in their respective functions' scope</li>\n<li>The <code>at</code> methods on <a href=\"/en-US-v0.13.1/reference/foundations/str/#definitions-at\">strings</a>, <a href=\"/en-US-v0.13.1/reference/foundations/array/#definitions-at\">arrays</a>,\n<a href=\"/en-US-v0.13.1/reference/foundations/dictionary/#definitions-at\">dictionaries</a>, and <a href=\"/en-US-v0.13.1/reference/foundations/content/#definitions-at\">content</a> now support\nspecifying a default value</li>\n<li>Added support for passing a function to <a href=\"/en-US-v0.13.1/reference/foundations/str/#definitions-replace\"><code>replace</code></a> that is\ncalled with each match.</li>\n<li>Fixed <a href=\"/en-US-v0.13.1/reference/foundations/str/#definitions-replace\">replacement</a> strings: They are now inserted completely\nverbatim instead of supporting the previous (unintended) magic dollar syntax\nfor capture groups</li>\n<li>Fixed bug with trailing placeholders in destructuring patterns</li>\n<li>Fixed bug with underscore in parameter destructuring</li>\n<li>Fixed crash with nested patterns and when hovering over an invalid pattern</li>\n<li>Better error messages when casting to an <a href=\"/en-US-v0.13.1/reference/foundations/int/\">integer</a> or <a href=\"/en-US-v0.13.1/reference/foundations/float/\">float</a>\nfails</li>\n</ul>\n<h2 id=\"text-and-layout\">Text and Layout</h2>\n<ul>\n<li>Implemented sophisticated CJK punctuation adjustment</li>\n<li>Disabled <a href=\"/en-US-v0.13.1/reference/text/text/#parameters-overhang\">overhang</a> for CJK punctuation</li>\n<li>Added basic translations for Traditional Chinese</li>\n<li>Fixed <a href=\"/en-US-v0.13.1/reference/text/raw/#parameters-align\">alignment</a> of text inside raw blocks (centering a raw\nblock, e.g. through a figure, will now keep the text itself left-aligned)</li>\n<li>Added support for passing a array instead of a function to configure table\ncell <a href=\"/en-US-v0.13.1/reference/model/table/#parameters-align\">alignment</a> and <a href=\"/en-US-v0.13.1/reference/model/table/#parameters-fill\">fill</a> per column</li>\n<li>Fixed automatic figure <a href=\"/en-US-v0.13.1/reference/model/figure/#parameters-kind\"><code>kind</code></a> detection</li>\n<li>Made alignment of <a href=\"/en-US-v0.13.1/reference/model/enum/#parameters-number-align\">enum numbers</a> configurable, defaulting\nto <code>end</code></li>\n<li>Figures can now be made breakable with a show-set rule for blocks in figure</li>\n<li>Initial fix for smart quotes in RTL languages</li>\n</ul>\n<h2 id=\"export\">Export</h2>\n<ul>\n<li>Fixed ligatures in PDF export: They are now copyable and searchable</li>\n<li>Exported PDFs now embed ICC profiles for images that have them</li>\n<li>Fixed export of strokes with zero thickness</li>\n</ul>\n<h2 id=\"web-app\">Web app</h2>\n<ul>\n<li>Projects can now contain folders</li>\n<li>Added upload by drag-and-drop into the file panel</li>\n<li>Files from the file panel can now be dragged into the editor to insert them\ninto a Typst file</li>\n<li>You can now copy-paste images and other files from your computer directly into\nthe editor</li>\n<li>Added a button to resend confirmation email</li>\n<li>Added an option to invert preview colors in dark mode</li>\n<li>Added tips to the loading screen and the Help menu. Feel free to propose more!</li>\n<li>Added syntax highlighting for YAML files</li>\n<li>Allowed middle mouse button click on many buttons to navigate into a new tab</li>\n<li>Allowed more project names</li>\n<li>Fixed overridden Vim mode keybindings</li>\n<li>Fixed many bugs regarding file upload and more</li>\n</ul>\n<h2 id=\"miscellaneous-improvements\">Miscellaneous Improvements</h2>\n<ul>\n<li>Improved performance of counters, state, and queries</li>\n<li>Improved incremental parsing for more efficient recompilations</li>\n<li>Added support for <code>.yaml</code> extension in addition to <code>.yml</code> for bibliographies</li>\n<li>The CLI now emits escape codes only if the output is a TTY</li>\n<li>For users of the <code>typst</code> crate: The <code>Document</code> is now <code>Sync</code> again and the\n<code>World</code> doesn't have to be <code>'static</code> anymore</li>\n</ul>\n<h2 id=\"contributors\">Contributors</h2>"}}