{"route":"/en-US-v0.13.1/changelog/0.8.0/","title":"0.8.0","description":"Changes in Typst 0.8.0","part":null,"outline":[{"id":"scripting","name":"Scripting","children":[]},{"id":"export","name":"Export","children":[]},{"id":"text-and-layout","name":"Text and Layout","children":[]},{"id":"math","name":"Math","children":[]},{"id":"tooling-and-diagnostics","name":"Tooling and Diagnostics","children":[]},{"id":"command-line-interface","name":"Command line interface","children":[]},{"id":"miscellaneous-improvements","name":"Miscellaneous Improvements","children":[]},{"id":"development","name":"Development","children":[]},{"id":"contributors","name":"Contributors","children":[]}],"body":{"kind":"html","content":"<h1>Version 0.8.0 (September 13, 2023)</h1>\n<h2 id=\"scripting\">Scripting</h2>\n<ul>\n<li>Plugins (thanks to <a href=\"https://github.com/astrale-sharp\">@astrale-sharp</a> and\n<a href=\"https://github.com/arnaudgolfouse\">@arnaudgolfouse</a>)\n<ul>\n<li>Typst can now load <a href=\"/en-US-v0.13.1/reference/foundations/plugin/\">plugins</a> that are compiled to WebAssembly</li>\n<li>Anything that can be compiled to WebAssembly can thus be loaded as a plugin</li>\n<li>These plugins are fully encapsulated (no access to file system or network)</li>\n<li>Plugins can be shipped as part of <a href=\"/en-US-v0.13.1/reference/scripting/#packages\">packages</a></li>\n<li>Plugins work just the same in the web app</li>\n</ul>\n</li>\n<li>Types are now first-class values <strong>(Breaking change)</strong>\n<ul>\n<li>A <a href=\"/en-US-v0.13.1/reference/foundations/type/\" title=\"type\">type</a> is now itself a value</li>\n<li>Some types can be called like functions (those that have a constructor),\ne.g. <a href=\"/en-US-v0.13.1/reference/foundations/int/\" title=\"`int`\"><code>int</code></a> and <a href=\"/en-US-v0.13.1/reference/foundations/str/\" title=\"`str`\"><code>str</code></a></li>\n<li>Type checks are now of the form <code><span class=\"typ-func\">type</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">10</span><span class=\"typ-punct\">)</span> <span class=\"typ-op\">==</span> int</code> instead of the old\n<code><span class=\"typ-func\">type</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">10</span><span class=\"typ-punct\">)</span> <span class=\"typ-op\">==</span> <span class=\"typ-str\">&quot;integer&quot;</span></code>. <a href=\"/en-US-v0.13.1/reference/foundations/type/#compatibility\">Compatibility</a> with the\nold way will remain for a while to give package authors time to upgrade, but\nit will be removed at some point.</li>\n<li>Methods are now syntax sugar for calling a function scoped to a type,\nmeaning that <code><span class=\"typ-str\">&quot;hello&quot;</span><span class=\"typ-punct\">.</span><span class=\"typ-func\">len</span><span class=\"typ-punct\">(</span><span class=\"typ-punct\">)</span></code> is equivalent to <code>str<span class=\"typ-punct\">.</span><span class=\"typ-func\">len</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;hello&quot;</span><span class=\"typ-punct\">)</span></code></li>\n</ul>\n</li>\n<li>Added support for <a href=\"/en-US-v0.13.1/reference/scripting/#modules\"><code>import</code></a> renaming with <code>as</code></li>\n<li>Added a <a href=\"/en-US-v0.13.1/reference/foundations/duration/\" title=\"`duration`\"><code>duration</code></a> type</li>\n<li>Added support for <a href=\"/en-US-v0.13.1/reference/data-loading/cbor/\">CBOR</a> encoding and decoding</li>\n<li>Added encoding and decoding functions from and to bytes for data formats:\n<a href=\"/en-US-v0.13.1/reference/data-loading/json/#definitions-decode\"><code>json.decode</code></a>, <a href=\"/en-US-v0.13.1/reference/data-loading/json/#definitions-encode\"><code>json.encode</code></a>, and similar\nfunctions for other formats</li>\n<li>Added <a href=\"/en-US-v0.13.1/reference/foundations/array/#definitions-intersperse\"><code>array.intersperse</code></a> function</li>\n<li>Added <a href=\"/en-US-v0.13.1/reference/foundations/str/#definitions-rev\"><code>str.rev</code></a> function</li>\n<li>Added <code>calc.tau</code> constant</li>\n<li>Made <a href=\"/en-US-v0.13.1/reference/foundations/bytes/\" title=\"bytes\">bytes</a> joinable and addable</li>\n<li>Made <a href=\"/en-US-v0.13.1/reference/foundations/array/#definitions-zip\"><code>array.zip</code></a> function variadic</li>\n<li>Fixed bug with <a href=\"/en-US-v0.13.1/reference/foundations/eval/\" title=\"`eval`\"><code>eval</code></a> when the <code>mode</code> was set to <code><span class=\"typ-str\">&quot;math&quot;</span></code></li>\n<li>Fixed bug with <a href=\"/en-US-v0.13.1/reference/foundations/str/#definitions-ends-with\"><code>ends-with</code></a> function on strings</li>\n<li>Fixed bug with destructuring in combination with break, continue, and return</li>\n<li>Fixed argument types of <a href=\"/en-US-v0.13.1/reference/foundations/calc/#functions-cosh\">hyperbolic functions</a>, they don't allow\nangles anymore <strong>(Breaking change)</strong></li>\n<li>Renamed some color methods: <code>rgba</code> becomes <code>to-rgba</code>, <code>cmyk</code> becomes\n<code>to-cmyk</code>, and <code>luma</code> becomes <code>to-luma</code> <strong>(Breaking change)</strong></li>\n</ul>\n<h2 id=\"export\">Export</h2>\n<ul>\n<li>Added SVG export (thanks to <a href=\"https://github.com/Enter-tainer\">@Enter-tainer</a>)</li>\n<li>Fixed bugs with PDF font embedding</li>\n<li>Added support for page labels that reflect the\n<a href=\"/en-US-v0.13.1/reference/layout/page/#parameters-numbering\">page numbering</a> style in the PDF</li>\n</ul>\n<h2 id=\"text-and-layout\">Text and Layout</h2>\n<ul>\n<li>Added <a href=\"/en-US-v0.13.1/reference/text/highlight/\" title=\"`highlight`\"><code>highlight</code></a> function for highlighting text with a background color</li>\n<li>Added <a href=\"/en-US-v0.13.1/reference/visualize/polygon/#definitions-regular\"><code>polygon.regular</code></a> function for drawing a regular\npolygon</li>\n<li>Added support for tabs in <a href=\"/en-US-v0.13.1/reference/text/raw/\" title=\"`raw`\"><code>raw</code></a> elements alongside\n<a href=\"/en-US-v0.13.1/reference/text/raw/#parameters-tab-size\"><code>tab-width</code></a> parameter</li>\n<li>The layout engine now tries to prevent &quot;runts&quot; (final lines consisting of just\na single word)</li>\n<li>Added Finnish translations</li>\n<li>Added hyphenation support for Polish</li>\n<li>Improved handling of consecutive smart quotes of different kinds</li>\n<li>Fixed vertical alignments for <a href=\"/en-US-v0.13.1/reference/layout/page/#parameters-number-align\"><code>number-align</code></a> argument on\npage function <strong>(Breaking change)</strong></li>\n<li>Fixed weak pagebreaks after counter updates</li>\n<li>Fixed missing text in SVG when the text font is set to &quot;New Computer Modern&quot;</li>\n<li>Fixed translations for Chinese</li>\n<li>Fixed crash for empty text in show rule</li>\n<li>Fixed leading spaces when there's a linebreak after a number and a comma</li>\n<li>Fixed placement of floating elements in columns and other containers</li>\n<li>Fixed sizing of block containing just a single box</li>\n</ul>\n<h2 id=\"math\">Math</h2>\n<ul>\n<li>Added support for <a href=\"/en-US-v0.13.1/reference/math/mat/#parameters-augment\">augmented matrices</a></li>\n<li>Removed support for automatic matching of fences like <code>|</code> and <code>||</code> as\nthere were too many false positives. You can use functions like\n<a href=\"/en-US-v0.13.1/reference/math/lr/#functions-abs\"><code>abs</code></a> or <a href=\"/en-US-v0.13.1/reference/math/lr/#functions-norm\"><code>norm</code></a> or an explicit <a href=\"/en-US-v0.13.1/reference/math/lr/#functions-lr\"><code>lr</code></a>\ncall instead. <strong>(Breaking change)</strong></li>\n<li>Fixed spacing after number with decimal point in math</li>\n<li>Fixed bug with primes in subscript</li>\n<li>Fixed weak spacing</li>\n<li>Fixed crash when text within math contains a newline</li>\n</ul>\n<h2 id=\"tooling-and-diagnostics\">Tooling and Diagnostics</h2>\n<ul>\n<li>Added hints when trying to call a function stored in a dictionary without\nextra parentheses</li>\n<li>Fixed hint when referencing an equation without numbering</li>\n<li>Added more details to some diagnostics (e.g. when SVG decoding fails)</li>\n</ul>\n<h2 id=\"command-line-interface\">Command line interface</h2>\n<ul>\n<li>Added <code>typst update</code> command for self-updating the CLI\n(thanks to <a href=\"https://github.com/jimvdl\">@jimvdl</a>)</li>\n<li>Added download progress indicator for packages and updates</li>\n<li>Added <code>--format</code> argument to explicitly specify the output format</li>\n<li>The CLI now respects proxy configuration through environment variables and has\na new <code>--cert</code> option for setting a custom CA certificate</li>\n<li>Fixed crash when field wasn't present and <code>--one</code> is passed to <code>typst query</code></li>\n</ul>\n<h2 id=\"miscellaneous-improvements\">Miscellaneous Improvements</h2>\n<ul>\n<li>Added <a href=\"/en-US-v0.13.1/guides/page-setup-guide/\">page setup guide</a></li>\n<li>Added <a href=\"/en-US-v0.13.1/reference/model/figure/#definitions-caption\"><code>figure.caption</code></a> function that can be used for\nsimpler figure customization (<strong>Breaking change</strong> because <code>it.caption</code> now\nrenders the full caption with supplement in figure show rules and manual\noutlines)</li>\n<li>Moved <code>caption-pos</code> argument to <code>figure.caption</code> function and renamed it to\n<code>position</code> <strong>(Breaking change)</strong></li>\n<li>Added <a href=\"/en-US-v0.13.1/reference/model/figure/#definitions-caption-separator\"><code>separator</code></a> argument to <code>figure.caption</code>\nfunction</li>\n<li>Added support for combination of and/or and before/after\n<a href=\"/en-US-v0.13.1/reference/foundations/selector/\">selectors</a></li>\n<li>Packages can now specify a\n<a href=\"https://github.com/typst/packages#package-format\">minimum compiler version</a>\nthey require to work</li>\n<li>Fixed parser bug where method calls could be moved onto their own line for\n<code><span class=\"typ-key\">#</span><span class=\"typ-key\">let</span></code> expressions in markup <strong>(Breaking change)</strong></li>\n<li>Fixed bugs in sentence and title case conversion for bibliographies</li>\n<li>Fixed supplements for alphanumeric and author-title bibliography styles</li>\n<li>Fixed off-by-one error in APA bibliography style</li>\n</ul>\n<h2 id=\"development\">Development</h2>\n<ul>\n<li>Made <code>Span</code> and <code>FileId</code> more type-safe so that all error conditions must be\nhandled by <code>World</code> implementors</li>\n</ul>\n<h2 id=\"contributors\">Contributors</h2>"}}