feat: initial commit

This commit is contained in:
johannes committed 2026-07-26 11:42:17 +02:00
commit b802ff49ab
454 files changed
+52429

No files matched your search

@@ -0,0 +1,64 @@
# 0.1.0
## Breaking changes
- When using the CLI, you now have to use subcommands:
- `typst compile file.typ` or `typst c file.typ` to create a PDF
- `typst watch file.typ` or `typst w file.typ` to compile and watch
- `typst fonts` to list all fonts
- Manual counters now start at zero. Read the "How to step" section [here](/docs/reference/introspection/counter/) for more details
- The [bibliography styles](/docs/reference/model/bibliography/#parameters-style) `"author-date"` and `"author-title"` were renamed to `"chicago-author-date"` and `"chicago-author-title"`
## Figure improvements
- Figures now automatically detect their content and adapt their behavior. Figures containing tables, for instance, are automatically prefixed with "Table X" and have a separate counter
- The figure's supplement (e.g. "Figure" or "Table") can now be customized
- In addition, figures can now be completely customized because the show rule gives access to the automatically resolved kind, supplement, and counter
## Bibliography improvements
- The [`bibliography`](/docs/reference/model/bibliography/) now also accepts multiple bibliography paths (as an array)
- Parsing of BibLaTeX files is now more permissive (accepts non-numeric edition, pages, volumes, dates, and Jabref-style comments; fixed abbreviation parsing)
- Labels and references can now include `:` and `.` except at the end
- Fixed APA bibliography ordering
## Drawing additions
- Added [`polygon`](/docs/reference/visualize/polygon/) function for drawing polygons
- Added support for clipping in [boxes](/docs/reference/layout/box/#parameters-clip) and [blocks](/docs/reference/layout/block/#parameters-clip)
## Command line interface
- Now returns with non-zero status code if there is an error
- Now watches the root directory instead of the current one
- Now puts the PDF file next to input file by default
- Now accepts more kinds of input files (e.g. `/dev/stdin`)
- Added `--open` flag to directly open the PDF
## Miscellaneous improvements
- Added [`yaml`](/docs/reference/data-loading/yaml/) function to load data from YAML files
- Added basic i18n for a few more languages (IT, RU, ZH, FR, PT)
- Added numbering support for Hebrew
- Added support for [integers](/docs/reference/foundations/int/) with base 2, 8, and 16
- Added symbols for double bracket and laplace operator
- The [`link`](/docs/reference/model/link/) function now accepts [labels](/docs/reference/foundations/label/)
- The link syntax now allows more characters
- Improved justification of Japanese and Chinese text
- Calculation functions behave more consistently w.r.t to non-real results
- Replaced deprecated angle brackets
- Reduced maximum function call depth from 256 to 64
- Fixed [`first-line-indent`](/docs/reference/model/par/#parameters-first-line-indent) being not applied when a paragraph starts with styled text
- Fixed extraneous spacing in unary operators in equations
- Fixed block spacing, e.g. in `block(above: 1cm, below: 1cm, ..)`
- Fixed styling of text operators in math
- Fixed invalid parsing of language tag in raw block with a single backtick
- Fixed bugs with displaying counters and state
- Fixed crash related to page counter
- Fixed crash when [`symbol`](/docs/reference/foundations/symbol/) function was called without arguments
- Fixed crash in bibliography generation
- Fixed access to label of certain content elements
- Fixed line number in error message for CSV parsing
- Fixed invalid autocompletion after certain markup elements
## Contributors
@@ -0,0 +1,110 @@
# 0.10.0
## Bibliography management
- Added support for citation collapsing (e.g. `[1]-[3]` instead of `[1], [2], [3]`) if requested by a CSL style
- Fixed bug where an additional space would appear after a group of citations
- Fixed link show rules for links in the bibliography
- Fixed show-set rules on citations
- Fixed bibliography-related crashes that happened on some systems
- Corrected name of the GB/T 7714 family of styles from 7114 to 7714
- Fixed missing title in some bibliography styles
- Fixed printing of volumes in some styles
- Fixed delimiter order for contributors in some styles (e.g. APA)
- Fixed behavior of alphanumeric style
- Fixed multiple bugs with GB/T 7714 style
- Fixed escaping in Hayagriva values
- Fixed crashes with empty dates in Hayagriva files
- Fixed bug with spacing around math blocks
- Fixed title case formatting after verbatim text and apostrophes
- Page ranges in `.bib` files can now be arbitrary strings
- Multi-line values in `.bib` files are now parsed correctly
- Entry keys in `.bib` files now allow more characters
- Fixed error message for empty dates in `.bib` files
- Added support for years of lengths other than 4 without leading zeros in `.bib` files
- More LaTeX commands (e.g. for quotes) are now respected in `.bib` files
## Visualization
- Added support for [patterns](/docs/reference/visualize/tiling/) as fills and strokes
- The `alpha` parameter of the [`components`](/docs/reference/visualize/color/#definitions-components) function on colors is now a named parameter **(Breaking change)**
- Added support for the [Oklch](/docs/reference/visualize/color/#definitions-oklch) color space
- Improved conversions between colors in different color spaces
- Removed restrictions on [Oklab](/docs/reference/visualize/color/#definitions-oklab) chroma component
- Fixed [clipping](/docs/reference/layout/block/#parameters-clip) on blocks and boxes without a stroke
- Fixed bug with [gradients](/docs/reference/visualize/gradient/) on math
- Fixed bug with gradient rotation on text
- Fixed bug with gradient colors in PDF
- Fixed relative base of Oklab chroma ratios
- Fixed Oklab color negation
## Text and Layout
- CJK text can now be emphasized with the `*` and `_` syntax even when there are no spaces
- Added basic i18n for Greek and Estonian
- Improved default [figure caption separator](/docs/reference/model/figure/#definitions-caption-separator) for Chinese, French, and Russian
- Changed default [figure supplement](/docs/reference/model/figure/#parameters-supplement) for Russian to short form
- Fixed [CJK-Latin-spacing](/docs/reference/text/text/#parameters-cjk-latin-spacing) before line breaks and in [`locate`](/docs/reference/introspection/locate/) calls
- Fixed line breaking at the end of links
## Math
- Added [`mid`](/docs/reference/math/lr/#functions-mid) function for scaling a delimiter up to the height of the surrounding [`lr`](/docs/reference/math/lr/#functions-lr) group
- The [`op`](/docs/reference/math/op/) function can now take any content, not just strings
- Improved documentation for [math alignment](/docs/reference/math/#alignment)
- Fixed swallowing of trailing comma when a symbol is used in a function-like way (e.g. `pi(a,b,)`)
## Scripting
- Any non-identifier dictionary key is now interpreted as an expression: For instance, `((key): value)` will create a dictionary with a dynamic key
- The [`stroke`](/docs/reference/visualize/stroke/) type now has a constructor that converts a value to a stroke or creates one from its parts
- Added constructor for [`arguments`](/docs/reference/foundations/arguments/) type
- Added [`calc.div-euclid`](/docs/reference/foundations/calc/#functions-div-euclid) and [`calc.rem-euclid`](/docs/reference/foundations/calc/#functions-rem-euclid) functions
- Fixed equality of [`arguments`](/docs/reference/foundations/arguments/)
- Fixed [`repr`](/docs/reference/foundations/repr/)of [`cmyk`](/docs/reference/visualize/color/#definitions-cmyk) colors
- Fixed crashes with provided elements like figure captions, outline entries, and footnote entries
## Tooling and Diagnostics
- Show rules that match on their own output now produce an appropriate error message instead of a crash (this is a first step, in the future they will just work)
- Too highly or infinitely nested layouts now produce error messages instead of crashes
- Added hints for invalid identifiers
- Added hint when trying to use a manually constructed footnote or outline entry
- Added missing details to autocompletions for types
- Improved error message when passing a named argument where a positional one is expected
- Jump from click now works on raw blocks
## Export
- PDF compilation output is now again fully byte-by-byte reproducible if the document's [`date`](/docs/reference/model/document/#parameters-date) is set manually
- Fixed color export in SVG
- Fixed PDF metadata encoding of multiple [authors](/docs/reference/model/document/#parameters-author)
## Command line interface
- Fixed a major bug where `typst watch` would confuse files and fail to pick up updates
- Fetching of the release metadata in `typst update` now respects proxies
- Fixed bug with `--open` flag on Windows when the path contains a space
- The `TYPST_FONT_PATHS` environment variable can now contain multiple paths (separated by `;` on Windows and `:` elsewhere)
- Updated embedded New Computer Modern fonts to version 4.7
- The watching process doesn't stop anymore when the main file contains invalid UTF-8
## Miscellaneous Improvements
- Parallelized image encoding in PDF export
- Improved the internal representation of content for improved performance
- Optimized introspection (query, counter, etc.) performance
- The [document title](/docs/reference/model/document/#parameters-title) can now be arbitrary content instead of just a string
- The [`number-align`](/docs/reference/model/enum/#parameters-number-align) parameter on numbered lists now also accepts vertical alignments
- Fixed selectors on [quote](/docs/reference/model/quote/) elements
- Fixed parsing of `#return` expression in markup
- Fixed bug where inline equations were displayed in equation outlines
- Fixed potential CRLF issue in [`raw`](/docs/reference/text/raw/) blocks
- Fixed a bug where Chinese numbering couldn't exceed the number 255
## Development
- Merged `typst` and `typst-library` and extracted `typst-pdf`, `typst-svg`, and `typst-render` into separate crates
- The Nix flake now includes the git revision when running `typst --version`
## Contributors
@@ -0,0 +1,203 @@
# 0.11.0
## Tables
- Tables are now _much_ more flexible, read the new [Table Guide](/docs/guides/tables/) to get started
- Added [`table.cell`](/docs/reference/model/table/#definitions-cell) element for per-cell configuration
- Cells can now span multiple [columns](/docs/reference/model/table/#definitions-cell-colspan) or [rows](/docs/reference/model/table/#definitions-cell-rowspan)
- The [stroke](/docs/reference/model/table/#definitions-cell-stroke) of individual cells can now be customized
- The [`align`](/docs/reference/model/table/#parameters-align) and [`inset`](/docs/reference/model/table/#parameters-inset) arguments of the table function now also take `(x, y) => ..` functions
- Added [`table.hline`](/docs/reference/model/table/#definitions-hline) and [`table.vline`](/docs/reference/model/table/#definitions-vline) for convenient line customization
- Added [`table.header`](/docs/reference/model/table/#definitions-header) element for table headers that repeat on every page
- Added [`table.footer`](/docs/reference/model/table/#definitions-footer) element for table footers that repeat on every page
- All the new table functionality is also available for [grids](/docs/reference/layout/grid/)
- Fixed gutter-related bugs
_Thanks to @PgBiel for his work on tables!_
## Templates
- You can now use template packages to get started with new projects. Click _Start from template_ on the web app's dashboard and choose your preferred template or run the `typst init <template>` command in the CLI. You can [browse the available templates here](https://typst.app/universe/search/?kind=templates).
- Switching templates after the fact has become easier. You can just import a styling function from a different template package.
- Package authors can now submit their own templates to the [package repository](https://github.com/typst/packages). Share a template for a paper, your institution, or an original work to help the community get a head start on their projects.
- Templates and packages are now organized by category and discipline. Filter packages by either taxonomy in the _Start from template_ wizard. If you are a package author, take a look at the new documentation for [categories](https://github.com/typst/packages/blob/main/docs/CATEGORIES.md) and [disciplines](https://github.com/typst/packages/blob/main/docs/DISCIPLINES.md).
## Context
- Added _context expressions:_ Read the chapter on [context](/docs/reference/context/) to get started
- With context, you can access settable properties, e.g. `context text.lang` to access the language set via `set text(lang: "..")`
- The following existing functions have been made contextual: [`query`](/docs/reference/introspection/query/), [`locate`](/docs/reference/introspection/locate/), [`measure`](/docs/reference/layout/measure/), [`counter.display`](/docs/reference/introspection/counter/#definitions-display), [`counter.at`](/docs/reference/introspection/counter/#definitions-at), [`counter.final`](/docs/reference/introspection/counter/#definitions-final), [`state.at`](/docs/reference/introspection/state/#definitions-at), and [`state.final`](/docs/reference/introspection/state/#definitions-final)
- Added contextual methods [`counter.get`](/docs/reference/introspection/counter/#definitions-get) and [`state.get`](/docs/reference/introspection/state/#definitions-get) to retrieve the value of a counter or state in the current context
- Added contextual function [`here`](/docs/reference/introspection/here/) to retrieve the [location](/docs/reference/introspection/location/) of the current context
- The [`locate`](/docs/reference/introspection/locate/) function now returns the location of a selector's unique match. Its old behavior has been replaced by context expressions and only remains temporarily available for compatibility.
- The [`counter.at`](/docs/reference/introspection/counter/#definitions-at) and [`state.at`](/docs/reference/introspection/state/#definitions-at) methods are now more flexible: They directly accept any kind of [locatable](/docs/reference/introspection/location/#locatable) selector with a unique match (e.g. a label) instead of just locations
- When context is available, [`counter.display`](/docs/reference/introspection/counter/#definitions-display) now directly returns the result of applying the numbering instead of yielding opaque content. It should not be used anymore without context. (Deprecation planned)
- The `state.display` function should not be used anymore, use [`state.get`](/docs/reference/introspection/state/#definitions-get) instead (Deprecation planned)
- The `location` argument of [`query`](/docs/reference/introspection/query/), [`counter.final`](/docs/reference/introspection/counter/#definitions-final), and [`state.final`](/docs/reference/introspection/state/#definitions-final) should not be used anymore (Deprecation planned)
- The `styles` argument of the `measure` function should not be used anymore (Deprecation planned)
- The `style` function should not be used anymore, use context instead (Deprecation planned)
- The correct context is now also provided in various other places where it is available, e.g. in show rules, layout callbacks, and numbering functions in the outline
## Styling
- Fixed priority of multiple [show-set rules](/docs/reference/styling/#show-rules): They now apply in the same order as normal set rules would
- Show-set rules on the same element (e.g. `show heading.where(level: 1): set heading(numbering: "1.")`) now work properly
- Setting properties on an element within a transformational show rule (e.g. `show heading: it => \{ set heading(..); it \}`) is **not** supported anymore (previously it also only worked sometimes); use show-set rules instead **(Breaking change)**
- Text show rules that match their own output now work properly (e.g. `show "cmd": `cmd``)
- The elements passed to show rules and returned by queries now contain all fields of their respective element functions rather than just specific ones
- All settable properties can now be used in [where](/docs/reference/foundations/function/#definitions-where) selectors
- [And](/docs/reference/foundations/selector/#definitions-and) and [or](/docs/reference/foundations/selector/#definitions-or) selectors can now be used with show rules
- Errors within show rules and context expressions are now ignored in all but the last introspection iteration, in line with the behavior of the old [`locate`](/docs/reference/introspection/locate/)
- Fixed a bug where document set rules were allowed after content
## Layout
- Added `reflow` argument to [`rotate`](/docs/reference/layout/rotate/) and [`scale`](/docs/reference/layout/scale/) which lets them affect the layout
- Fixed a bug where [floating placement](/docs/reference/layout/place/#parameters-float) or [floating figures](/docs/reference/model/figure/#parameters-placement) could end up out of order
- Fixed overlap of text and figure for full-page floating figures
- Fixed various cases where the [`hide`](/docs/reference/layout/hide/) function didn't hide its contents properly
- Fixed usage of [`h`](/docs/reference/layout/h/) and [`v`](/docs/reference/layout/v/) in [stacks](/docs/reference/layout/stack/)
- Invisible content like a counter update will no longer force a visible block for just itself
- Fixed a bug with horizontal spacing followed by invisible content (like a counter update) directly at the start of a paragraph
## Text
- Added [`stroke`](/docs/reference/text/text/#parameters-stroke) property for text
- Added basic i18n for Serbian and Catalan
- Added support for contemporary Japanese [numbering](/docs/reference/model/numbering/) method
- Added patches for various wrong metadata in specific fonts
- The [text direction](/docs/reference/text/text/#parameters-dir) can now be overridden within a paragraph
- Fixed Danish [smart quotes](/docs/reference/text/smartquote/)
- Fixed font fallback next to a line break
- Fixed width adjustment of JIS-style Japanese punctuation
- Fixed Finnish translation of "Listing"
- Fixed Z-ordering of multiple text decorations (underlines, etc.)
- Fixed a bug due to which text [features](/docs/reference/text/text/#parameters-features) could not be overridden in consecutive set rules
## Model
- Added [`depth`](/docs/reference/model/heading/#parameters-depth) and [`offset`](/docs/reference/model/heading/#parameters-offset) arguments to heading to increase or decrease the heading level for a bunch of content; the heading syntax now sets `depth` rather than `level` **(Breaking change)**
- List [markers](/docs/reference/model/list/#parameters-marker) now cycle by default
- The [`quote`](/docs/reference/model/quote/) function now more robustly selects the correct quotes based on language and nesting
- Fixed indent bugs related to the default show rule of [terms](/docs/reference/model/terms/)
## Math
- Inline equations now automatically linebreak at appropriate places
- Added [`number-align`](/docs/reference/math/equation/#parameters-number-align) argument to equations
- Added support for adjusting the [`size`](/docs/reference/math/accent/#parameters-size) of accents relative to their base
- Improved positioning of accents
- [Primes](/docs/reference/math/primes/) are now always attached as [scripts](/docs/reference/math/attach/#functions-scripts) by default
- Exposed [`math.primes`](/docs/reference/math/primes/) element which backs the `$f'$` syntax in math
- Math mode is not affected by [`strong`](/docs/reference/model/strong/) and [`emph`](/docs/reference/model/emph/) anymore
- Fixed [`attach`](/docs/reference/math/attach/#functions-attach) under [fractions](/docs/reference/math/frac/)
- Fixed that [`math.class`](/docs/reference/math/class/) did not affect smart limit placement
- Fixed weak spacing in [`lr`](/docs/reference/math/lr/#functions-lr) groups
- Fixed layout of large operators for Cambria Math font
- Fixed math styling of Hebrew symbol codepoints
## Symbols
- Added `gradient` as an alias for `nabla`
- Added `partial` as an alias for `diff`, `diff` will be deprecated in the future
- Added `colon.double`, `gt.approx`, `gt.napprox`, `lt.approx`, and `lt.napprox`
- Added `arrow.r.tilde` and `arrow.l.tilde`
- Added `tilde.dot`
- Added `forces` and `forces.not`
- Added `space.nobreak.narrow`
- Added `lrm` (Left-to-Right Mark) and `rlm` (Right-to-Left Mark)
- Fixed `star.stroked` symbol (which previously had the wrong codepoint)
## Scripting
- Arrays can now be compared lexicographically
- Added contextual method [`to-absolute`](/docs/reference/layout/length/#definitions-to-absolute) to lengths
- Added [`calc.root`](/docs/reference/foundations/calc/#functions-root)
- Added [`int.signum`](/docs/reference/foundations/int/#definitions-signum) and [`float.signum`](/docs/reference/foundations/float/#definitions-signum) methods
- Added [`float.is-nan`](/docs/reference/foundations/float/#definitions-is-nan) and [`float.is-infinite`](/docs/reference/foundations/float/#definitions-is-infinite) methods
- Added [`int.bit-not`](/docs/reference/foundations/int/#definitions-bit-not), [`int.bit-and`](/docs/reference/foundations/int/#definitions-bit-and), [`int.bit-or`](/docs/reference/foundations/int/#definitions-bit-or), [`int.bit-xor`](/docs/reference/foundations/int/#definitions-bit-xor), [`int.bit-lshift`](/docs/reference/foundations/int/#definitions-bit-lshift), and [`int.bit-rshift`](/docs/reference/foundations/int/#definitions-bit-rshift) methods
- Added [`array.chunks`](/docs/reference/foundations/array/#definitions-chunks) method
- A module can now be converted to a dictionary with the [dictionary constructor](/docs/reference/foundations/dictionary/#constructor) to access its contents dynamically
- Added [`row-type`](/docs/reference/data-loading/csv/#parameters-row-type) argument to `csv` function to configure how rows will be represented
- [XML parsing](/docs/reference/data-loading/xml/) now allows DTDs (document type definitions)
- Improved formatting of negative numbers with [`str`](/docs/reference/foundations/str/) and [`repr`](/docs/reference/foundations/repr/)
- For loops can now iterate over [bytes](/docs/reference/foundations/bytes/)
- Fixed a bug with pattern matching in for loops
- Fixed a bug with labels not being part of [`.fields()`](/docs/reference/foundations/content/#definitions-fields) dictionaries
- Fixed a bug where unnamed argument sinks wouldn't capture excess arguments
- Fixed typo in `repr` output of strokes
## Syntax
- Added support for nested [destructuring patterns](/docs/reference/scripting/#bindings)
- Special spaces (like thin or non-breaking spaces) are now parsed literally instead of being collapsed into normal spaces **(Breaking change)**
- Korean text can now use emphasis syntax without adding spaces **(Breaking change)**
- The token [`context`](/docs/reference/context/) is now a keyword and cannot be used as an identifier anymore **(Breaking change)**
- Nested line comments aren't allowed anymore in block comments **(Breaking change)**
- Fixed a bug where `x.)` would be treated as a field access
- Text elements can now span across curly braces in markup
- Fixed silently wrong parsing when function name is parenthesized
- Fixed various bugs with parsing of destructuring patterns, arrays, and dictionaries
## Tooling & Diagnostics
- Click-to-jump now works properly within [`raw`](/docs/reference/text/raw/) text
- Added suggestion for accessing a field if a method doesn't exist
- Improved hint for calling a function stored in a dictionary
- Improved errors for mutable accessor functions on arrays and dictionaries
- Fixed error message when calling constructor of type that doesn't have one
- Fixed confusing error message with nested dictionaries for strokes on different sides
- Fixed autocompletion for multiple packages with the same name from different namespaces
## Visualization
- The [`image`](/docs/reference/visualize/image/) function doesn't upscale images beyond their natural size anymore
- The [`image`](/docs/reference/visualize/image/) function now respects rotation stored in EXIF metadata
- Added support for SVG filters
- Added alpha component to [`luma`](/docs/reference/visualize/color/#definitions-luma) colors
- Added [`color.transparentize`](/docs/reference/visualize/color/#definitions-transparentize) and [`color.opacify`](/docs/reference/visualize/color/#definitions-opacify) methods
- Improved [`color.negate`](/docs/reference/visualize/color/#definitions-negate) function
- Added [`stroke`](/docs/reference/text/highlight/#parameters-stroke) and [`radius`](/docs/reference/text/highlight/#parameters-radius) arguments to `highlight` function
- Changed default [`highlight`](/docs/reference/text/highlight/) color to be transparent
- CMYK to RGB conversion is now color-managed
- Fixed crash with gradients in Oklch color space
- Fixed color-mixing for hue-based spaces
- Fixed bugs with color conversion
- SVG sizes are not rounded anymore, preventing slightly wrong aspect ratios
- Fixed a few other SVG-related bugs
- [`color.components`](/docs/reference/visualize/color/#definitions-components) doesn't round anything anymore
## Export
- PDFs now contain named destinations for headings derived from their labels
- The internal PDF structure was changed to make it easier for external tools to extract or modify individual pages, avoiding a bug with Typst PDFs in Apple Preview
- PDFs produced by Typst should now be byte-by-byte reproducible when `set document(date: none)` is set
- Added missing flag to PDF annotation
- Fixed multiple bugs with gradients in PDF export
- Fixed a bug with patterns in PDF export
- Fixed a bug with embedding of grayscale images in PDF export
- Fixed a bug with To-Unicode mapping of CFF fonts in PDF export
- Fixed a bug with the generation of the PDF outline
- Fixed a sorting bug in PDF export leading to non-reproducible output
- Fixed a bug with transparent text in PNG export
- Exported SVG files now include units in their top-level `width` and `height`
## Command line interface
- Added support for passing [inputs](/docs/reference/foundations/sys/) via a CLI flag
- When passing the filename `-`, Typst will now read input from stdin
- Now uses the system-native TLS implementation for network fetching which should be generally more robust
- Watch mode will now properly detect when a previously missing file is created
- Added `--color` flag to configure whether to print colored output
- Fixed user agent with which packages are downloaded
- Updated bundled fonts to the newest versions
## Development
- Added `--vendor-openssl` to CLI to configure whether to link OpenSSL statically instead of dynamically (not applicable to Windows and Apple platforms)
- Removed old tracing (and its verbosity) flag from the CLI
- Added new `--timings` flag which supersedes the old flamegraph profiling in the CLI
- Added minimal CLI to `typst-docs` crate for extracting the language and standard library documentation as JSON
- The `typst_pdf::export` function's `ident` argument switched from `Option` to `Smart`. It should only be set to `Smart::Custom` if you can provide a stable identifier (like the web app can). The CLI sets `Smart::Auto`.
## Contributors
@@ -0,0 +1,55 @@
# 0.11.1
## Security
- Fixed a vulnerability where image files at known paths could be embedded into the PDF even if they were outside of the project directory
## Bibliography
- Fixed et-al handling in subsequent citations
- Fixed suppression of title for citations and bibliography references with no author
- Fixed handling of initials in citation styles without a delimiter
- Fixed bug with citations in footnotes
## Text and Layout
- Fixed interaction of [`first-line-indent`](/docs/reference/model/par/#parameters-first-line-indent) and [`outline`](/docs/reference/model/outline/)
- Fixed compression of CJK punctuation marks at line start and end
- Fixed handling of [rectangles](/docs/reference/visualize/rect/) with negative dimensions
- Fixed layout of [`path`](/docs/reference/visualize/path/) in explicitly sized container
- Fixed broken [`raw`](/docs/reference/text/raw/) text in right-to-left paragraphs
- Fixed tab rendering in `raw` text with language `typ` or `typc`
- Fixed highlighting of multi-line `raw` text enclosed by single backticks
- Fixed indentation of overflowing lines in `raw` blocks
- Fixed extra space when `raw` text ends with a backtick
## Math
- Fixed broken [equations](/docs/reference/math/equation/) in right-to-left paragraphs
- Fixed missing [blackboard bold](/docs/reference/math/variants/#functions-bb) letters
- Fixed error on empty arguments in 2D math argument list
- Fixed stretching via [`mid`](/docs/reference/math/lr/#functions-mid) for various characters
- Fixed that alignment points in equations were affected by `set align(..)`
## Export
- Fixed [smart quotes](/docs/reference/text/smartquote/) in PDF outline
- Fixed [patterns](/docs/reference/visualize/tiling/) with spacing in PDF
- Fixed wrong PDF page labels when [page numbering](/docs/reference/layout/page/#parameters-numbering) was disabled after being previously enabled
## Scripting
- Fixed overflow for large numbers in external data files (by converting to floats instead)
- Fixed [`str.trim(regex, at: end)`](/docs/reference/foundations/str/#definitions-trim) when the whole string is matched
## Miscellaneous
- Fixed deformed strokes for specific shapes and thicknesses
- Fixed newline handling in code mode: There can now be comments within chained method calls and between an `if` branch and the `else` keyword
- Fixed inefficiency with incremental reparsing
- Fixed autocompletions for relative file imports
- Fixed crash in autocompletion handler
- Fixed a bug where the path and entrypoint printed by `typst init` were not properly escaped
- Fixed various documentation errors
## Contributors
@@ -0,0 +1,274 @@
# 0.12.0
## Highlights
- Added support for multi-column floating [placement](/docs/reference/layout/place/#parameters-scope) and [figures](/docs/reference/model/figure/#parameters-scope)
- Added support for automatic [line numbering](/docs/reference/model/par/#definitions-line) (often used in academic papers)
- Typst's layout engine is now multithreaded. Typical speedups are 2-3x for larger documents. The multithreading operates on page break boundaries, so explicit page breaks are necessary for it to kick in.
- Paragraph justification was optimized with a new two-pass algorithm. Speedups are larger for shorter paragraphs and go up to 6x.
- Highly reduced PDF file sizes due to better font subsetting (thanks to [@LaurenzV](https://github.com/LaurenzV))
- Emoji are now exported properly in PDF
- Added initial support for PDF/A. For now, only the PDF/A-2b profile is supported, but more is planned for the future.
- Added various options for configuring the CLI's environment (fonts, package paths, etc.)
- Text show rules now match across multiple text elements
- Block-level equations can now optionally break over multiple pages
- Fixed a bug where some fonts would not print correctly on professional printers
- Fixed a long-standing bug which could cause headings to be orphaned at the bottom of the page
## Layout
- Added support for multi-column floating placement and figures via [`place.scope`](/docs/reference/layout/place/#parameters-scope) and [`figure.scope`](/docs/reference/model/figure/#parameters-scope). Two-column documents should now prefer `set page(columns: 2)` over `show: column.with(2)` (see the [Page Setup Guide](/docs/guides/page-setup/#columns)).
- Added support for automatic [line numbering](/docs/reference/model/par/#definitions-line) (often used in academic papers)
- Added [`par.spacing`](/docs/reference/model/par/#parameters-spacing) property for configuring paragraph spacing. This should now be used instead of `show par: set block(spacing: ..)` **(Breaking change)**
- Block-level elements like lists, grids, and stacks now show themselves as blocks and are thus affected by all block properties (e.g. `stroke`) rather than just `spacing` **(Breaking change)**
- Added [`block.sticky`](/docs/reference/layout/block/#parameters-sticky) property which prevents a page break after a block
- Added [`place.flush`](/docs/reference/layout/place/#definitions-flush) function which forces all floating figures to be placed before any further content
- Added [`skew`](/docs/reference/layout/skew/) function
- Added `auto` option for [`page.header`](/docs/reference/layout/page/#parameters-header) and [`page.footer`](/docs/reference/layout/page/#parameters-footer) which results in an automatic header/footer based on the numbering (which was previously inaccessible after a change)
- Added `gap` and `justify` parameters to [`repeat`](/docs/reference/layout/repeat/) function
- Added `width` and `height` parameters to the [`measure`](/docs/reference/layout/measure/) function to define the space in which the content should be measured. Especially useful in combination with [`layout`](/docs/reference/layout/layout/).
- The height of a `block`, `image`, `rect`, `square`, `ellipse`, or `circle` can now be specified in [fractional units](/docs/reference/layout/fraction/)
- The [`scale`](/docs/reference/layout/scale/) function now supports absolute lengths for `x`, `y`, `factor`. This way an element of unknown size can be scaled to a fixed size.
- The values of `block.above` and `block.below` can now be retrieved in context expressions.
- Increased accuracy of conversions between absolute units (pt, mm, cm, in)
- Fixed a bug which could cause headings to be orphaned at the bottom of the page
- Fixed footnotes within breakable blocks appearing on the page where the breakable block ends instead of at the page where the footnote marker is
- Fixed numbering of nested footnotes and footnotes in floats
- Fixed empty pages appearing when a [context](/docs/reference/context/) expression wraps whole pages
- Fixed `set block(spacing: x)` behaving differently from `set block(above: x, below: x)`
- Fixed behavior of [`rotate`](/docs/reference/layout/rotate/) and [`scale`](/docs/reference/layout/scale/) with `reflow: true`
- Fixed interaction of `align(horizon)` and `v(1fr)`
- Fixed various bugs where floating placement would yield overlapping results
- Fixed a bug where widow/orphan prevention would unnecessarily move text into the next column
- Fixed [weak spacing](/docs/reference/layout/h/#parameters-weak) not being trimmed at the start and end of lines in a paragraph (only at the start and end of paragraphs)
- Fixed interaction of weak page break and [`pagebreak.to`](/docs/reference/layout/pagebreak/#parameters-to)
- Fixed compilation output of a single weak page break
- Fixed crash when [padding](/docs/reference/layout/pad/) by `100%`
## Text
- Tuned hyphenation: It is less eager by default and hyphenations close to the edges of words are now discouraged more strongly **(May lead to larger layout reflows)**
- New default font: Libertinus Serif. This is the maintained successor to the old default font Linux Libertine. **(May lead to smaller reflows)**
- Setting the font to an unavailable family will now result in a warning
- Implemented a new smart quote algorithm, fixing various bugs where smart quotes weren't all that smart
- Added [`text.costs`](/docs/reference/text/text/#parameters-costs) parameter for tweaking various parameters that affect the choices of the layout engine during text layout
- Added `typm` highlighting mode for math in [raw blocks](/docs/reference/text/raw/#parameters-lang)
- Added basic i18n for Galician, Catalan, Latin, Icelandic, Hebrew
- Implemented hyphenation duplication for Czech, Croatian, Lower Sorbian, Polish, Portuguese, Slovak, and Spanish.
- The [`smallcaps`](/docs/reference/text/smallcaps/) function is now an element function and can thereby be used in show(-set) rules.
- The [`raw.theme`](/docs/reference/text/raw/#parameters-theme) parameter can now be set to `none` to disable highlighting even in the presence of a language tag, and to `auto` to reset to the default
- Multiple [stylistic sets](/docs/reference/text/text/#parameters-stylistic-set) can now be enabled at once
- Fixed the Chinese translation for "Equation"
- Fixed that hyphenation could occur outside of words
- Fixed incorrect layout of bidirectional text in edge cases
- Fixed layout of paragraphs with explicit trailing whitespace
- Fixed bugs related to empty paragraphs created via `#""`
- Fixed accidental trailing spaces for line breaks immediately preceding an inline equation
- Fixed [`text.historical-ligatures`](/docs/reference/text/text/#parameters-historical-ligatures) not working correctly
- Fixed accidental repetition of Thai characters around line breaks in some circumstances
- Fixed [smart quotes](/docs/reference/text/smartquote/) for Swiss French
- New font metadata exceptions for Archivo, Kaiti SC, and Kaiti TC
- Updated bundled New Computer Modern fonts to version 6.0
## Math
- Block-level equations can now break over multiple pages if enabled via `show math.equation: set block(breakable: true)`.
- Matrix and vector sizing is now more consistent across different cell contents
- Added [`stretch`](/docs/reference/math/stretch/) function for manually or automatically stretching characters like arrows or parentheses horizontally or vertically
- Improved layout of attachments on parenthesized as well as under- or overlined expressions
- Improved layout of nested attachments resulting from code like `#let a0 = $a_0$; $a0^1$`
- Improved layout of primes close to superscripts
- Improved layout of fractions
- Typst now makes use of math-specific height-dependent kerning information in some fonts for better attachment layout
- The `floor` and `ceil` functions in math are now callable symbols, such that `$ floor(x) = lr(floor.l x floor.r) $`
- The [`mat.delim`](/docs/reference/math/mat/#parameters-delim), [`vec.delim`](/docs/reference/math/vec/#parameters-delim), and [`cases.delim`](/docs/reference/math/cases/#parameters-delim) parameters now allow any character that is considered a delimiter or "fence" (e.g. |) by Unicode. The `delim: "||"` notation is _not_ supported anymore and should be replaced by `delim: bar.double` **(Minor breaking change)**
- Added [`vec.align`](/docs/reference/math/vec/#parameters-align) and [`mat.align`](/docs/reference/math/mat/#parameters-align) parameters
- Added [`underparen`](/docs/reference/math/underover/#functions-underparen), [`overparen`](/docs/reference/math/underover/#functions-overparen), [`undershell`](/docs/reference/math/underover/#functions-undershell), and [`overshell`](/docs/reference/math/underover/#functions-overshell)
- Added `~` shorthand for `tilde.op` in math mode **(Minor breaking change)**
- Fixed baseline alignment of equation numbers
- Fixed positioning of corner brackets (⌜, ⌝, ⌞, ⌟)
- Fixed baseline of large roots
- Fixed multiple minor layout bugs with attachments
- Fixed that alignment points could affect line height in math
- Fixed that spaces could show up between text and invisible elements like [`metadata`](/docs/reference/introspection/metadata/) in math
- Fixed a crash with recursive show rules in math
- Fixed [`lr.size`](/docs/reference/math/lr/#functions-lr-size) not affecting characters enclosed in [`mid`](/docs/reference/math/lr/#functions-mid) in some cases
- Fixed resolving of em units in sub- and superscripts
- Fixed bounding box of inline equations when a [text edge](/docs/reference/text/text/#parameters-top-edge) is set to `"bounds"`
## Introspection
- Implemented a new system by which Typst tracks where elements end up on the pages. This may lead to subtly different behavior in introspections. **(Breaking change)**
- Fixed various bugs with wrong counter behavior in complex layout situations, through a new, more principled implementation
- Counter updates can now be before the first, in between, and after the last page when isolated by weak page breaks. This allows, for instance, updating a counter before the first page header and background.
- Fixed logical ordering of introspections within footnotes and figures
- Fixed incorrect [`here().position()`](/docs/reference/introspection/here/) when [`place`](/docs/reference/layout/place/) was used in a context expression
- Fixed resolved positions of elements (in particular, headings) whose show rule emits an invisible element (like a state update) before a page break
- Fixed behavior of stepping a counter at a deeper level than its current state has
- Fixed citation formatting not working in table headers and a few other places
- Displaying the footnote counter will now respect the footnote numbering style
## Model
- Document set rules do not need to be at the very start of the document anymore. The only restriction is that they must not occur inside of layout containers.
- The `spacing` property of [lists](/docs/reference/model/list/#parameters-spacing), [enumerations](/docs/reference/model/enum/#parameters-spacing), and [term lists](/docs/reference/model/terms/#parameters-spacing) is now also respected for tight lists
- Tight lists now only attach (with tighter spacing) to preceding paragraphs, not arbitrary blocks
- The [`quote`](/docs/reference/model/quote/) element is now locatable (can be used in queries)
- The bibliography heading now uses `depth` instead of `level` so that its level can still be configured via a show-set rule
- Added support for more [numbering](/docs/reference/model/numbering/) formats: Devanagari, Eastern Arabic, Bengali, and circled numbers
- Added [`hanging-indent`](/docs/reference/model/heading/#parameters-hanging-indent) parameter to heading function to tweak the appearance of multi-line headings and improved default appearance of multi-line headings
- Improved handling of bidirectional text in outline entry
- Fixed document set rules being ignored in an otherwise empty document
- Fixed document set rules not being usable in context expressions
- Fixed bad interaction between `set document` and `set page`
- Fixed `show figure: set align(..)`. Since the default figure alignment is now a show-set rule, it is not revoked by `show figure: it => it.body` anymore. **(Minor breaking change)**
- Fixed numbering of footnote references
- Fixed spacing after bibliography heading
## Bibliography
- The Hayagriva YAML `publisher` field can now accept a dictionary with a `location` key. The top-level `location` key is now primarily intended for event and item locations.
- Multiple page ranges with prefixes and suffixes are now allowed
- Added `director` and catch-all editor types to BibLaTeX parsing
- Added support for disambiguation to alphanumeric citation style
- The year 0 will now render as 1BC
- Fixes for sorting of bibliography entries
- Fixed pluralization of page range labels
- Fixed sorting of citations by their number
- Fixed how citation number ranges collapse
- Fixed when the short form of a title is used
- Fixed parsing of unbalanced dollars in BibLaTeX `url` field
- Updated built-in citation styles
## Visualization
- Added `fill-rule` parameter to [`path`](/docs/reference/visualize/path/#parameters-fill-rule) and [`polygon`](/docs/reference/visualize/polygon/#parameters-fill-rule) functions
- Fixed color mixing and gradients for [Luma colors](/docs/reference/visualize/color/#definitions-luma)
- Fixed conversion from Luma to CMYK colors
- Fixed offset gradient strokes in PNG export
- Fixed unintended cropping of some SVGs
- SVGs with foreign objects now produce a warning as they will likely not render correctly in Typst
## Syntax
- Added support for nested imports like `import "file.typ": module.item`
- Added support for parenthesized imports like `import "file.typ": (a, b, c)`. With those, the import list can break over multiple lines.
- Fixed edge case in parsing of reference syntax
- Fixed edge case in parsing of heading, list, enum, and term markers immediately followed by comments
- Fixed rare crash in parsing of parenthesized expressions
## Scripting
- Added new fixed-point [`decimal`](/docs/reference/foundations/decimal/) number type for highly precise arithmetic on numbers in base 10, as needed for finance
- Added `std` module for accessing standard library definitions even when a variable with the same name shadows/overwrites it
- Added [`array.to-dict`](/docs/reference/foundations/array/#definitions-to-dict), [`array.reduce`](/docs/reference/foundations/array/#definitions-reduce), [`array.windows`](/docs/reference/foundations/array/#definitions-windows) methods
- Added `exact` argument to [`array.zip`](/docs/reference/foundations/array/#definitions-zip)
- Added [`arguments.at`](/docs/reference/foundations/arguments/#definitions-at) method
- Added [`int.from-bytes`](/docs/reference/foundations/int/#definitions-from-bytes), [`int.to-bytes`](/docs/reference/foundations/int/#definitions-to-bytes), [`float.from-bytes`](/docs/reference/foundations/float/#definitions-from-bytes), and [`float.to-bytes`](/docs/reference/foundations/float/#definitions-to-bytes)
- Added proper support for negative values of the `digits` parameter of [`calc.round`](/docs/reference/foundations/calc/#functions-round) (the behaviour existed before but was subtly broken)
- Conversions from [`int`](/docs/reference/foundations/int/) to [`float`](/docs/reference/foundations/float/) will now error instead of saturating if the float is too large **(Minor breaking change)**
- Added `float.nan` and `float.inf`, removed `calc.nan` **(Minor breaking change)**
- Certain symbols are now generally callable like functions and not only specifically in math. Examples are accents or [`floor`](/docs/reference/math/lr/#functions-floor) and [`ceil`](/docs/reference/math/lr/#functions-ceil).
- Improved [`repr`](/docs/reference/foundations/repr/) of relative values, sequences, infinities, NaN, `type(none)` and `type(auto)`
- Fixed crash on whole packages (rather than just files) cyclically importing each other
- Fixed return type of [`calc.round`](/docs/reference/foundations/calc/#functions-round) on integers when a non-zero value is provided for `digits`
## Styling
- Text show rules now match across multiple text elements
- The string `"` in a text show rule now matches smart quotes
- Fixed a long-standing styling bug where the header and footer would incorrectly inherit styles from a lone element on the page (e.g. a heading)
- Fixed `set page` not working directly after a counter/state update
- Page fields configured via an explicit `page(..)[..]` call can now be properly retrieved in context expressions
## Export
- Highly reduced PDF file sizes due to better font subsetting
- Emoji are now exported properly in PDF
- Added initial support for PDF/A. For now, only the standard PDF/A-2b is supported, but more is planned for the future. Enabled via `--pdf-standard a-2b` in the CLI and via the UI in File \> Export as \> PDF in the web app.
- Setting [`page.fill`](/docs/reference/layout/page/#parameters-fill) to `none` will now lead to transparent pages instead of white ones in PNG and SVG. The new default of `auto` means transparent for PDF and white for PNG and SVG.
- Improved text copy-paste from PDF in complex scenarios
- Exported SVGs now contain the `data-typst-label` attribute on groups resulting from labelled [boxes](/docs/reference/layout/box/) and [blocks](/docs/reference/layout/block/)
- Fixed a bug where some fonts would not print correctly on professional printers
- Fixed a bug where transparency could leak from one PDF object to another
- Fixed a bug with CMYK gradients in PDF
- Fixed various bugs with export of Oklab gradients in PDF
- Fixed crashes related to rendering of non-outline glyphs
- Two small fixes for PDF standard conformance
## Performance
- Typst's layout engine is now multithreaded. Typical speedups are 2-3x for larger documents. The multithreading operates on page break boundaries, so explicit page breaks are necessary for it to kick in.
- Paragraph justification was optimized with a new two-pass algorithm. Speedups are larger for shorter paragraphs and range from 1-6x.
## Command Line Interface
- Added `--pages` option to select specific page ranges to export
- Added `--package-path` and `--package-cache-path` as well as `TYPST_PACKAGE_PATH` and `TYPST_PACKAGE_CACHE_PATH` environment variables for configuring where packages are loaded from and cached in, respectively
- Added `--ignore-system-fonts` flag to disable system fonts fully for better reproducibility
- Added `--make-deps` argument for outputting the dependencies of the current compilation as a Makefile
- Added `--pretty` option to `typst query`, with the default now being to minify (only applies to JSON format)
- Added `--backup-path` to `typst update` to configure where the previous version is backed up
- Added useful links to help output
- The CLI will now greet users who invoke just `typst` for the first time
- The document can now be written to stdout by passing `-` as the output filename (for PDF or single-page image export)
- Typst will now emit a proper error message instead of failing silently when the certificate specified by `--cert` or `TYPST_CERT` could not be loaded
- The CLI now respects the `SOURCE_DATE_EPOCH` environment variable for better reproducibility
- When exporting multiple images, you can now use `t` (total pages), `p` (current page), and `0p` (zero-padded current page, same as current `n`) in the output path
- The input and output paths now allow non-UTF-8 values
- Times are now formatted more consistently across the CLI
- Fixed a bug related to the `--open` flag
- Fixed path completions for `typst` not working in zsh
## Tooling and Diagnostics
- The "compiler" field for specifying the minimum Typst version required by a package now supports imprecise bounds like 0.11 instead of 0.11.0
- Added warning when a label is ignored by Typst because no preceding labellable element exists
- Added hint when trying to apply labels in code mode
- Added hint when trying to call a standard library function that has been shadowed/overwritten by a local definition
- Added hint when trying to set both the language and the region in the `lang` parameter
- Added hints when trying to compile non-Typst files (e.g. after having typed `typst c file.pdf` by accident)
- Added hint when a string is used where a label is expected
- Added hint when a stray end of a block comment (`*/`) is encountered
- Added hints when destructuring arrays with the wrong number of elements
- Improved error message when trying to use a keyword as an identifier in a let binding
- Improved error messages when accessing nonexistent fields
- Improved error message when a package exists, but not the specified version
- Improved hints for unknown variables
- Improved hint when trying to convert a length with non-zero em component to an absolute unit
- Fixed a crash that could be triggered by certain hover tooltips
- Fixed an off-by-one error in to-source jumps when first-line-indent is enabled
- Fixed suggestions for `.` after the end of an inline code expressions
- Fixed autocompletions being duplicated in a specific case
## Symbols
- New: `parallelogram`, `original`, `image`, `crossmark`, `rest`, `natural`, `flat`, `sharp`, `tiny`, `miny`, `copyleft`, `trademark`, `emoji.beet`, `emoji.fingerprint`, `emoji.harp`, `emoji.shovel`, `emoji.splatter`, `emoji.tree.leafless`,
- New variants: `club.stroked`, `diamond.stroked`, `heart.stroked`, `spade.stroked`, `gt.neq`, `lt.neq`, `checkmark.heavy`, `paren.double`, `brace.double`, `shell.double`, `arrow.turn`, `plus.double`, `plus.triple`, `infinity.bar`, `infinity.incomplete`, `infinity.tie`, `multimap.double`, `ballot.check`, `ballot.check.heavy`, `emptyset.bar`, `emptyset.circle`, `emptyset.arrow.l`, `emptyset.arrow.r`, `parallel.struck`, `parallel.eq`, `parallel.equiv`, `parallel.slanted`, `parallel.tilde`, `angle.l.curly`, `angle.l.dot`, `angle.r.curly`, `angle.r.dot`, `angle.oblique`, `angle.s`, `em.two`, `em.three`
- Renamed: `turtle` to `shell`, `notes` to `note`, `ballot.x` to `ballot.cross`, `succ.eq` to `succ.curly.eq`, `prec.eq` to `prec.curly.eq`, `servicemark` to `trademark.service`, `emoji.face.tired` to `emoji.face.distress` **(Breaking change)**
- Changed codepoint: `prec.eq`, `prec.neq`, `succ.eq`, `succ.neq`, `triangle` from ▷ to △, `emoji.face.tired` **(Breaking change)**
- Removed: `lt.curly` in favor of `prec`, `gt.curly` in favor of `succ` **(Breaking change)**
## Deprecations
- [`counter.display`](/docs/reference/introspection/counter/#definitions-display) without an established context
- [`counter.final`](/docs/reference/introspection/counter/#definitions-final) with a location
- [`state.final`](/docs/reference/introspection/state/#definitions-final) with a location
- `state.display`
- [`query`](/docs/reference/introspection/query/) with a location as the second argument
- [`locate`](/docs/reference/introspection/locate/) with a callback function
- [`measure`](/docs/reference/layout/measure/) with styles
- `style`
## Development
- Added `typst-kit` crate which provides useful APIs for `World` implementors
- Added go-to-definition API in `typst-ide`
- Added package manifest parsing APIs to `typst-syntax`
- As the compiler is now capable of multithreading, `World` implementations must satisfy `Send` and `Sync`
- Changed signature of `World::main` to allow for the scenario where the main file could not be loaded
- Removed `Tracer` in favor of `Warned<T>` and `typst::trace` function
- The `xz2` dependency used by the self-updater is now statically linked
- The Dockerfile now has an `ENTRYPOINT` directive
## Contributors
@@ -0,0 +1,247 @@
# 0.13.0
## Highlights
- There is now a distinction between [proper paragraphs](/docs/reference/model/par/) and just inline-level content. This is important for future work on accessibility and means that [first line indent](/docs/reference/model/par/#parameters-first-line-indent) can now be enabled for all paragraphs instead of just consecutive ones.
- The [`outline`](/docs/reference/model/outline/) has a better out-of-the-box look and is more customizable
- The new [`curve`](/docs/reference/visualize/curve/) function (that supersedes the `path` function) provides a simpler and more flexible interface for creating Bézier curves
- The `image` function now supports raw [pixel raster formats](/docs/reference/visualize/image/#parameters-format) for generating images from within Typst
- Functions that accept [file paths](/docs/reference/syntax/#paths) now also accept raw [bytes](/docs/reference/foundations/bytes/), for full flexibility
- WebAssembly [plugins](/docs/reference/foundations/plugin/) are more flexible and automatically run multi-threaded
- Fixed a long-standing bug where single-letter strings in math (`$"a"$`) would be displayed in italics
- You can now specify which charset should be [covered](/docs/reference/text/text/#parameters-font) by which font family
- The [`pdf.embed`](/docs/reference/pdf/attach/) function lets you embed arbitrary files in the exported PDF
- HTML export is currently under active development. The feature is still _very_ incomplete, but already available for experimentation behind a feature flag.
## Model
- There is now a distinction between [proper paragraphs](/docs/reference/model/par/) and just inline-level content **(Breaking change)**
- All text at the root of a document is wrapped in paragraphs. Meanwhile, text in a container (like a block) is only wrapped in a paragraph if the container holds any block-level content. If all of the content is inline-level, no paragraph is created.
- In the laid-out document, it's not immediately visible whether text became part of a paragraph. However, it is still important for accessibility, HTML export, and for properties like `first-line-indent`.
- Show rules on `par` now only affect proper paragraphs
- The `first-line-indent` and `hanging-indent` properties also only affect proper paragraphs
- Creating a `par[..]` with body content that is not fully inline-level will result in a warning
- The default show rules of various built-in elements like lists, quotes, etc. were adjusted to ensure they produce/don't produce paragraphs as appropriate
- Removed support for booleans and content in [`outline.indent`](/docs/reference/model/outline/#parameters-indent)
- The [`outline`](/docs/reference/model/outline/) function was fully reworked to improve its out-of-the-box behavior **(Breaking change)**
- [Outline entries](/docs/reference/model/outline/#definitions-entry) are now [blocks](/docs/reference/layout/block/) and are thus affected by block spacing
- The `auto` indentation mode now aligns numberings and titles outline-wide for a grid-like look
- Automatic indentation now also indents entries without a numbering
- Titles wrapping over multiple lines now have hanging indent
- The page number won't appear alone on its own line anymore
- The link now spans the full entry instead of just the title and page number
- The default spacing between outline leader dots was increased
- The [`fill`](/docs/reference/model/outline/#definitions-entry-fill) parameter was moved from `outline` to `outline.entry` and can thus be configured through show-set rules
- Removed `body` and `page` fields from outline entry
- Added `indented`, `prefix`, `inner`, `body`, and `page` methods on outline entries to simplify writing of show rules
- Added configuration to [`par.first-line-indent`](/docs/reference/model/par/#parameters-first-line-indent) for indenting all paragraphs instead of just consecutive ones
- Added [`form`](/docs/reference/model/ref/#parameters-form) parameter to `ref` function. Setting the form to `"page"` will produce a page reference instead of a textual one.
- Added [`document.description`](/docs/reference/model/document/#parameters-description) field, which results in corresponding PDF and HTML metadata
- Added [`enum.reversed`](/docs/reference/model/enum/#parameters-reversed) parameter
- Added support for Greek [numbering](/docs/reference/model/numbering/)
- When the [`link`](/docs/reference/model/link/) function wraps around a container like a [block](/docs/reference/layout/block/), it will now generate only one link for the whole block instead of individual links for all the visible leaf elements. This significantly reduces PDF file sizes when combining `link` and [`repeat`](/docs/reference/layout/repeat/).
- The [`link`](/docs/reference/model/link/) function will now only strip one prefix (like `mailto:` or `tel:`) instead of multiple
- The link function now suppresses hyphenation via a built-in show-set rule rather than through its default show rule
- Displaying the page counter without a specified numbering will now take the page numbering into account
## Visualization
- Added new [`curve`](/docs/reference/visualize/curve/) function that supersedes the [`path`](/docs/reference/visualize/path/) function and provides a simpler and more flexible interface. The `path` function is now deprecated.
- The `image` function now supports raw [pixel raster formats](/docs/reference/visualize/image/#parameters-format). This can be used to generate images from within Typst without the need for encoding in an image exchange format.
- Added [`image.scaling`](/docs/reference/visualize/image/#parameters-scaling) parameter for configuring how an image is scaled by PNG export and PDF viewers (smooth or pixelated)
- Added [`image.icc`](/docs/reference/visualize/image/#parameters-icc) parameter for providing or overriding the ICC profile of an image
- Renamed `pattern` to [`tiling`](/docs/reference/visualize/tiling/). The name `pattern` remains as a deprecated alias.
- Added [`gradient.center`](/docs/reference/visualize/gradient/#definitions-center), [`gradient.radius`](/docs/reference/visualize/gradient/#definitions-radius), [`gradient.focal-center`](/docs/reference/visualize/gradient/#definitions-focal-center), and [`gradient.focal-radius`](/docs/reference/visualize/gradient/#definitions-focal-radius) methods
- Fixed interaction of clipping and outset on [`box`](/docs/reference/layout/box/) and [`block`](/docs/reference/layout/block/)
- Fixed panic with [`path`](/docs/reference/visualize/path/) of infinite length
- Fixed non-solid (e.g. tiling) text fills in clipped blocks
- Fixed a crash for images with a DPI value of zero
- Fixed floating-point error in [`gradient.repeat`](/docs/reference/visualize/gradient/#definitions-repeat)
- Auto-detection of image formats from a raw buffer now has support for SVGs
## Scripting
- Functions that accept [file paths](/docs/reference/syntax/#paths) now also accept raw [bytes](/docs/reference/foundations/bytes/)
- [`image`](/docs/reference/visualize/image/), [`cbor`](/docs/reference/data-loading/cbor/), [`csv`](/docs/reference/data-loading/csv/), [`json`](/docs/reference/data-loading/json/), [`toml`](/docs/reference/data-loading/toml/), [`xml`](/docs/reference/data-loading/xml/), and [`yaml`](/docs/reference/data-loading/yaml/) now support a path string or bytes and their `.decode` variants are deprecated
- [`plugin`](/docs/reference/foundations/plugin/), [`bibliography`](/docs/reference/model/bibliography/), [`bibliography.style`](/docs/reference/model/bibliography/#parameters-style), [`cite.style`](/docs/reference/model/cite/#parameters-style), [`raw.theme`](/docs/reference/text/raw/#parameters-theme), and [`raw.syntaxes`](/docs/reference/text/raw/#parameters-syntaxes) now accept bytes in addition to path strings. These did not have `.decode` variants, so this adds new flexibility.
- The `path` argument/field of [`image`](/docs/reference/visualize/image/) and [`bibliography`](/docs/reference/model/bibliography/) was renamed to `source` and `sources`, respectively **(Minor breaking change)**
- Improved WebAssembly [plugins](/docs/reference/foundations/plugin/)
- The `plugin` type is replaced by a [`plugin` function](/docs/reference/foundations/plugin/) that returns a [module](/docs/reference/foundations/module/) containing normal Typst functions. This module can be used with import syntax. **(Breaking change)**
- Plugins now automatically run in multiple threads without any changes by plugin authors
- A new [`plugin.transition`](/docs/reference/foundations/plugin/#definitions-transition) API is introduced which allows plugins to run impure initialization in a way that doesn't break Typst's purity guarantees
- The variable name bound by a bare import (no renaming, no import list) is now determined statically and dynamic imports without `as` renaming (e.g. `import "ot" + "her.typ"`) are a hard error **(Breaking change)**
- Values of the [`arguments`](/docs/reference/foundations/arguments/) type can now be added with `+` and [joined](/docs/reference/scripting/#blocks) in curly-braced code blocks
- Functions in an element function's scope can now be called with method syntax, bringing elements and types closer (in anticipation of a future full unification of the two). Currently, this is only useful for [`outline.entry`](/docs/reference/model/outline/#definitions-entry) as no other element function defines methods.
- Added [`calc.norm`](/docs/reference/foundations/calc/#functions-norm) function
- Added support for 32-bit floats in [`float.from-bytes`](/docs/reference/foundations/float/#definitions-from-bytes) and [`float.to-bytes`](/docs/reference/foundations/float/#definitions-to-bytes)
- The [`decimal`](/docs/reference/foundations/decimal/) constructor now also accepts decimal values
- Improved `repr` of [symbols](/docs/reference/foundations/symbol/), [arguments](/docs/reference/foundations/arguments/), and [types](/docs/reference/foundations/type/)
- Duplicate [symbol](/docs/reference/foundations/symbol/) variants and modifiers are now a hard error **(Breaking change)**
## Math
- Fixed a bug where single letter strings in math (`$"a"$`) would be displayed in italics
- Math function calls can now have hyphenated named arguments and support [argument spreading](/docs/reference/foundations/arguments/#spreading)
- Better looking accents thanks to support for the `flac` (Flattened Accent Forms) and `dtls` (Dotless Forms) OpenType features
- Added `lcm` [text operator](/docs/reference/math/op/)
- The [`bold`](/docs/reference/math/styles/#functions-bold) function now works with ϝ and Ϝ
- The [`italic`](/docs/reference/math/styles/#functions-italic) function now works with ħ
- Fixed a bug where the extent of a math equation was wrongly affected by internal metadata
- Fixed interaction of [`lr`](/docs/reference/math/lr/#functions-lr) and [context](/docs/reference/context/) expressions
- Fixed weak spacing being unconditionally ignored in [`lr`](/docs/reference/math/lr/#functions-lr)
- Fixed sub/superscripts sometimes being in the wrong position with [`lr`](/docs/reference/math/lr/#functions-lr)
- Fixed multi-line annotations (e.g. overbrace) changing the math baseline
- Fixed merging of attachments when the base is a nested equation
- Fixed resolving of contextual (em-based) text sizes within math
- Fixed spacing around up tacks (⊥)
## Bibliography
- Prose and author-only citations now use editor names if the author names are unavailable
- Some non-standard but widely used BibLaTeX `editortype`s like `producer`, `writer`, `scriptwriter`, and `none` (defined by widespread style `biblatex-chicago` to mean performers within `music` and `video` entries) are now recognized
- CSL styles can now render affixes around the bibliography
- For BibTeX entries with `eprinttype = \{pubmed\}`, the PubMed ID will now be correctly processed
- Whitespace handling for strings delimiting initialized names has been improved
- Uppercase spelling after apostrophes used as quotation marks is now possible
- Fixed bugs around the handling of CSL delimiting characters
- Fixed a problem with parsing multibyte characters in page ranges that could prevent Hayagriva from parsing some BibTeX page ranges
- Updated CSL APA style
- Updated CSL locales for Finnish, Swiss German, Austrian German, German, and Arabic
## Text
- Added support for specifying which charset should be [covered](/docs/reference/text/text/#parameters-font) by which font family
- Added [`all`](/docs/reference/text/smallcaps/#parameters-all) parameter to `smallcaps` function that also enables small capitals on uppercase letters
- Added basic i18n for Basque and Bulgarian
- [Justification](/docs/reference/model/par/#parameters-justify) does not affect [raw](/docs/reference/text/raw/) blocks anymore
- [CJK-Latin-spacing](/docs/reference/text/text/#parameters-cjk-latin-spacing) does not affect [raw](/docs/reference/text/raw/) text anymore
- Fixed wrong language codes being used for Greek and Ukrainian
- Fixed default quotes for Croatian and Bulgarian
- Fixed crash in RTL text handling
- Added support for [`raw`](/docs/reference/text/raw/) syntax highlighting for a few new languages: CFML, NSIS, and WGSL
- New font metadata exception for New Computer Modern Sans Math
- Updated bundled New Computer Modern fonts to version 7.0.1
## Layout
- Fixed various bugs with footnotes
- Fixed footnotes getting lost when multiple footnotes were nested within another footnote
- Fixed endless loops with empty and overlarge footnotes
- Fixed crash with overlarge footnotes within a floating placement
- Fixed sizing of quadratic shapes ([`square`](/docs/reference/visualize/square/) and [`circle`](/docs/reference/visualize/circle/))
- Fixed [`block.sticky`](/docs/reference/layout/block/#parameters-sticky) not working properly at the top of a container
- Fixed crash due to consecutive weak spacing
- Fixed crash when a [block](/docs/reference/layout/block/) or text have negative sizes
- Fixed unnecessary hyphenations occurring in rare scenarios due to a bad interaction between padding and paragraph optimization
- Fixed lone [citations](/docs/reference/model/cite/) in [`align`](/docs/reference/layout/align/) not becoming their own paragraph
## Syntax
- Top-level closing square brackets that do not have a matching opening square bracket are now a hard error **(Minor breaking change)**
- Adding a space between the identifier and the parentheses in a set rule is not allowed anymore **(Minor breaking change)**
- Numbers with a unit cannot have a base prefix anymore, e.g. `0b100000pt` is not allowed anymore. Previously, it was syntactically allowed but always resolved to a value of zero. **(Minor breaking change)**
- Using `is` as an identifier will now warn as it might become a keyword in the future
- Fixed minor whitespace handling bugs
- in math mode argument lists
- at the end of headings
- between a term list's term and description
- Fixed parsing of empty single line raw blocks with 3+ backticks and a language tag
- Fixed minor bug with parentheses parsing in math
- Markup that can only appear at the start of the line (headings, lists) can now also appear at the start of a list item
- A shebang `#!` at the very start of a file is now ignored
## PDF export
- Added [`pdf.embed`](/docs/reference/pdf/attach/) function for embedding arbitrary files in the exported PDF
- Added support for PDF/A-3b export
- The PDF timestamp will now contain the timezone by default
## HTML export
**Note:** HTML export is currently under active development. The feature is still _very_ incomplete, but already available for experimentation behind a feature flag.
- Added HTML output support for some (but not all) of the built-in elements
- Added [`html.elem`](/docs/reference/html/elem/) function for outputting an arbitrary HTML element
- Added [`html.frame`](/docs/reference/html/frame/) function for integrating content that requires layout into HTML (by embedding an SVG)
- Added [`target`](/docs/reference/foundations/target/) function which returns either `"paged"` or `"html"` depending on the export target
## Tooling and Diagnostics
- Autocompletion improvements
- Added autocompletion for file paths
- Smarter autocompletion of variables: Completing `rect(fill: |)` will now only show variables which contain a valid fill (either directly or nested, e.g. a dictionary containing a valid fill)
- Different functions will now autocomplete with different brackets (round vs square) depending on which kind is more useful
- Positional parameters which are already provided aren't autocompleted again anymore
- Fixed variable autocompletion not considering parameters
- Added autocompletion snippets for common figure usages
- Fixed autocompletion after half-completed import item
- Fixed autocompletion for `cite` function
- Added warning when an unconditional return in a code block discards joined content
- Fixed error message when accessing non-existent label
- Fixed handling of nested imports in IDE functionality
## Command Line Interface
- Added `--features` argument and `TYPST_FEATURES` environment variable for opting into experimental features. The only feature so far is `html`.
- Added a live reloading HTTP server to `typst watch` when targeting HTML
- Fixed self-update not being aware about certain target architectures
- Fixed crash when piping `typst fonts` output to another command
- Fixed handling of relative paths in `--make-deps` output
- Fixed handling of multipage SVG and PNG export in `--make-deps` output
- Colons in filenames are now correctly escaped in `--make-deps` output
## Symbols
- New
- `inter`, `inter.and`, `inter.big`, `inter.dot`, `inter.double`, `inter.sq`, `inter.sq.big`, `inter.sq.double`, `integral.inter`
- `asymp`, `asymp.not`
- `mapsto`, `mapsto.long`
- `divides.not.rev`, `divides.struck`
- `interleave`, `interleave.big`, `interleave.struck`
- `eq.triple.not`, `eq.dots`, `eq.dots.down`, `eq.dots.up`
- `smt`, `smt.eq`, `lat`, `lat.eq`
- `colon.tri`, `colon.tri.op`
- `dagger.triple`, `dagger.l`, `dagger.r`, `dagger.inv`
- `hourglass.stroked`, `hourglass.filled`
- `die.six`, `die.five`, `die.four`, `die.three`, `die.two`, `die.one`
- `errorbar.square.stroked`, `errorbar.square.filled`, `errorbar.diamond.stroked`, `errorbar.diamond.filled`, `errorbar.circle.stroked`, `errorbar.circle.filled`
- `numero`
- Renamed **(Breaking change)**
- `ohm.inv` to `Omega.inv`
- Changed codepoint **(Breaking change)**
- `angle.l.double` from `《` to `⟪`
- `angle.r.double` from `》` to `⟫`
- `angstrom` from U+212B (`Å`) to U+00C5 (`Å`)
- Deprecated
- `sect` and all its variants in favor of `inter`
- `integral.sect` in favor of `integral.inter`
- Removed **(Breaking change)**
- `degree.c` in favor of `°C` (`$upright(°C)$` or `$upright(degree C)$` in math)
- `degree.f` in favor of `°F` (`$upright(°F)$` or `$upright(degree F)$` in math)
- `kelvin` in favor of just K (`$upright(K)$` in math)
- `ohm` in favor of `Omega`
## Deprecations
- The [`path`](/docs/reference/visualize/path/) function in favor of the [`curve`](/docs/reference/visualize/curve/) function
- The name `pattern` for tiling patterns in favor of the new name [`tiling`](/docs/reference/visualize/tiling/)
- [`image.decode`](/docs/reference/visualize/image/#definitions-decode), [`cbor.decode`](/docs/reference/data-loading/cbor/#definitions-decode), [`csv.decode`](/docs/reference/data-loading/csv/#definitions-decode), [`json.decode`](/docs/reference/data-loading/json/#definitions-decode), [`toml.decode`](/docs/reference/data-loading/toml/#definitions-decode), [`xml.decode`](/docs/reference/data-loading/xml/#definitions-decode), [`yaml.decode`](/docs/reference/data-loading/yaml/#definitions-decode) in favor of the top-level functions directly accepting both paths and bytes
- The `sect` and its variants in favor of `inter`, and `integral.sect` in favor of `integral.inter`
- The compatibility behavior of type/str comparisons (e.g. `int == "integer"`) which was temporarily introduced in Typst 0.8 now emits warnings. It will be removed in Typst 0.14.
## Removals
- Removed `style` function and `styles` argument of [`measure`](/docs/reference/layout/measure/), use a [context](/docs/reference/context/) expression instead **(Breaking change)**
- Removed `state.display` function, use [`state.get`](/docs/reference/introspection/state/#definitions-get) instead **(Breaking change)**
- Removed `location` argument of [`state.at`](/docs/reference/introspection/state/#definitions-at), [`counter.at`](/docs/reference/introspection/counter/#definitions-at), and [`query`](/docs/reference/introspection/query/) **(Breaking change)**
- Removed compatibility behavior where [`counter.display`](/docs/reference/introspection/counter/#definitions-display) worked without [context](/docs/reference/context/) **(Breaking change)**
- Removed compatibility behavior of [`locate`](/docs/reference/introspection/locate/) **(Breaking change)**
## Development
- The `typst::compile` function is now generic and can return either a `PagedDocument` or an `HtmlDocument`
- `typst-timing` now supports WebAssembly targets via `web-sys` when the `wasm` feature is enabled
- Increased minimum supported Rust version to 1.80
- Fixed linux/arm64 Docker image
## Contributors
@@ -0,0 +1,25 @@
# 0.13.1
## Command Line Interface
- Fixed high CPU usage for `typst watch` on Linux. Depending on the project size, CPU usage would spike for varying amounts of time. This bug appeared with 0.13.0 due to a behavioral change in the inotify file watching backend.
## HTML export
- Fixed export of tables with [gutters](/docs/reference/model/table/#parameters-gutter)
- Fixed usage of `<html>` and `<body>` element within [context](/docs/reference/context/)
- Fixed querying of [metadata](/docs/reference/introspection/metadata/) next to `<html>` and `<body>` element
## Visualization
- Fixed [curves](/docs/reference/visualize/curve/) with multiple non-closed components
## Introspection
- Fixed a regression where labelled [symbols](/docs/reference/foundations/symbol/) could not be [queried](/docs/reference/introspection/query/) by label
## Deprecations
- Fixed false positives in deprecation warnings for type/str comparisons
## Contributors
@@ -0,0 +1,311 @@
# 0.14.0
## Highlights
- Typst now produces [_accessible_ PDFs](/docs/guides/accessibility/) out of the box, with opt-in support for stricter checks and conformance to PDF/UA-1
- Typst now supports all [PDF/A standards](/docs/reference/pdf/#pdf-a)
- PDFs can now be used as [images](/docs/reference/visualize/image/#parameters-format) (thanks to [@LaurenzV](https://github.com/LaurenzV))
- Added support for [character-level justification](/docs/reference/model/par/#parameters-justification-limits) (can significantly improve the appearance of justified text)
- Added support for many more built-in elements in HTML export
- Added typed HTML API (e.g. [`html.div`](/docs/reference/html/typed/#functions-div)) with individually typed attributes
- Added support for multiple [headers](/docs/reference/model/table/#definitions-header) and subheaders in tables
- Added [`title`](/docs/reference/model/title/) element for displaying the document title
- Added [`frac.style`](/docs/reference/math/frac/#parameters-style) property for producing skewed and inline fractions
## PDF export
PDF export was fully rewritten to use the new [`krilla`](https://github.com/LaurenzV/krilla) library, fixing various bugs and enabling many improvements. Known fixes are listed below, but there will likely be other changes in how the output behaves. If you spot any regressions, please [report them on GitHub](https://github.com/typst/typst/issues). _(Thanks to @LaurenzV for creating krilla!)_ [#5420](https://github.com/typst/typst/issues/5420)
- Typst now produces _accessible_ PDFs out of the box. Such documents are suitable for consumption in a wide range of circumstances. That not only includes consumption by people with permanent or temporary disabilities, but also by those with different devices or preferences.
- Typst PDFs are now _tagged_ by default. _Tags_ are rich metadata that PDF viewers can use to make the document consumable in other ways than visually (e.g., through a screen reader).
- In addition, Typst can now emit documents conforming to the PDF/UA-1 standard. (PDF/UA-2 is not yet supported, but planned.)
- There is an increasing amount of existing and upcoming legislation requiring documents to be accessible, for instance, the European Accessibility Act and the Americans with Disabilities Act.
- For more details on all of this, read the new [Accessibility Guide](/docs/guides/accessibility/).
- Typst now supports all PDF/A standards: PDF/A-1b, PDF/A-1a, PDF/A-2b, PDF/A-2u, PDF/A-2a, PDF/A-3b, PDF/A-3u, PDF/A-3a, PDF/A-4, PDF/A-4f, and PDF/A-4e. See the [expanded PDF/A documentation](/docs/reference/pdf/#pdf-a) for guidance on how to select a suitable standard. [#5420](https://github.com/typst/typst/issues/5420) [#7038](https://github.com/typst/typst/issues/7038)
- Typst now supports the PDF versions 1.4, 1.5, 1.6, and 2.0 in addition to PDF 1.7. See the [relevant section of the PDF documentation](/docs/reference/pdf/#pdf-versions) for details. [#5420](https://github.com/typst/typst/issues/5420)
- Added [`pdf.artifact`](/docs/reference/pdf/artifact/) function for marking content as not semantically meaningful [#6619](https://github.com/typst/typst/issues/6619)
- Added experimental [`pdf.header-cell`](/docs/reference/pdf/header-cell/), [`pdf.data-cell`](/docs/reference/pdf/data-cell/), and [`pdf.table-summary`](/docs/reference/pdf/table-summary/) functions for enhancing accessibility of documents with complex tables. These functions are guarded by the `a11y-extras` feature. They do not have a final interface and will be removed in the future, either through integration into table functions or through full removal. [#6619](https://github.com/typst/typst/issues/6619)
- PDF heading bookmarks now contain the heading's numbering [#6622](https://github.com/typst/typst/issues/6622)
- [Attachments](/docs/reference/pdf/attach/)
- Renamed `pdf.embed` to [`pdf.attach`](/docs/reference/pdf/attach/) (the old name will remain as a deprecated alias until Typst 0.15) [#6705](https://github.com/typst/typst/issues/6705)
- The [`mime`](/docs/reference/pdf/attach/#parameters-mime-type) property of `pdf.attach` is now checked for syntactical correctness **(Minor breaking change)**
- Fixed parsing of the [`data`](/docs/reference/pdf/attach/#parameters-data) argument of `pdf.attach` [#6435](https://github.com/typst/typst/issues/6435)
- Attachments now smartly determine whether they should be compressed [#6256](https://github.com/typst/typst/issues/6256)
- Text extraction (i.e. copy paste)
- Now works correctly even when multiple different characters result in the same glyph [#5420](https://github.com/typst/typst/issues/5420)
- Spaces between words at which a natural line break occurred are now correctly retained for text extraction [#6866](https://github.com/typst/typst/issues/6866)
- Fixed mapping of hyphenation artifacts to Unicode text [#6799](https://github.com/typst/typst/issues/6799)
- Images
- CMYK images now work properly in PDF export [#5420](https://github.com/typst/typst/issues/5420)
- Improved export of text in SVG images with a filter [#5420](https://github.com/typst/typst/issues/5420)
- Improved compatibility of SVG images with Quartz rendering engine (the engine used in Apple Preview) [#5420](https://github.com/typst/typst/issues/5420)
- Improved handling of SVG images with high group nesting depth [#5420](https://github.com/typst/typst/issues/5420)
- Fixed a bug with text in patterns [#5420](https://github.com/typst/typst/issues/5420)
- Fixed gradients with transparency [#5420](https://github.com/typst/typst/issues/5420)
## HTML export
- Added support for many more built-in elements (the [_Model_ category](/docs/reference/model/) is now fully covered)
- The [`image`](/docs/reference/visualize/image/) element [#6578](https://github.com/typst/typst/issues/6578)
- The [`footnote`](/docs/reference/model/footnote/) and [`footnote.entry`](/docs/reference/model/footnote/#definitions-entry) element [#6917](https://github.com/typst/typst/issues/6917)
- The [`outline`](/docs/reference/model/outline/) and [`outline.entry`](/docs/reference/model/outline/#definitions-entry) element [#6606](https://github.com/typst/typst/issues/6606)
- The [`bibliography`](/docs/reference/model/bibliography/) element [#6952](https://github.com/typst/typst/issues/6952)
- The [`smartquote`](/docs/reference/text/smartquote/) element [#6710](https://github.com/typst/typst/issues/6710)
- The [`sub`](/docs/reference/text/sub/) and [`super`](/docs/reference/text/super/) elements [#6422](https://github.com/typst/typst/issues/6422)
- The [`underline`](/docs/reference/text/underline/), [`overline`](/docs/reference/text/overline/), [`strike`](/docs/reference/text/strike/), and [`highlight`](/docs/reference/text/highlight/) elements [#6510](https://github.com/typst/typst/issues/6510)
- The [`smallcaps`](/docs/reference/text/smallcaps/) element [#6600](https://github.com/typst/typst/issues/6600)
- The [`lower`](/docs/reference/text/lower/) and [`upper`](/docs/reference/text/upper/) functions [#6585](https://github.com/typst/typst/issues/6585)
- Added typed HTML API (e.g. [`html.div`](/docs/reference/html/typed/#functions-div)) with individually typed attributes [#6476](https://github.com/typst/typst/issues/6476)
- For example, to generate a `video` element you can now write `#html.video(width: 400, src: "sunrise.mp4")` instead of `#html.elem("video", attrs: (width: "400", src: "sunrise.mp4"))`. Note how the `width` attribute takes an integer instead of a string.
- Added support for intra-doc [`link`](/docs/reference/model/link/) targets [#6602](https://github.com/typst/typst/issues/6602)
- The [`raw`](/docs/reference/text/raw/) element
- Added syntax highlighting support [#6691](https://github.com/typst/typst/issues/6691)
- Block-level `raw` elements now emit both a `<code>` and a `<pre>` tag [#6701](https://github.com/typst/typst/issues/6701)
- The [language tag](/docs/reference/text/raw/#parameters-lang) of `raw` elements is now preserved as a `data-lang` attribute on the `<code>` tag [#6702](https://github.com/typst/typst/issues/6702)
- The [`authors`](/docs/reference/model/document/#parameters-author) and [`keywords`](/docs/reference/model/document/#parameters-keywords) properties of the `document` function now yield corresponding HTML `<meta>` tags [#6134](https://github.com/typst/typst/issues/6134)
- The [`html.elem`](/docs/reference/html/elem/) function now supports custom HTML element names [#6676](https://github.com/typst/typst/issues/6676)
- Improved encoding of [`html.frame`](/docs/reference/html/frame/) [#6605](https://github.com/typst/typst/issues/6605)
- Empty attributes are now encoded with shorthand syntax (e.g. `<div hidden></div>`) [#6479](https://github.com/typst/typst/issues/6479)
- Zero-sized horizontal weak spacing (`h(0pt, weak: true)`) does not cause a "was ignored during HTML export" warning anymore, so it can be used to destruct surrounding spaces without producing any output, as in paged export [#6917](https://github.com/typst/typst/issues/6917)
- Fixed encoding of `<pre>` and `<textarea>` elements that start with a newline [#6487](https://github.com/typst/typst/issues/6487) [#6497](https://github.com/typst/typst/issues/6497)
- Fixed encoding of [raw text elements](https://html.spec.whatwg.org/#raw-text-elements) [#6487](https://github.com/typst/typst/issues/6487) [#6720](https://github.com/typst/typst/issues/6720)
- Fixed sizing of [`html.frame`](/docs/reference/html/frame/) [#6505](https://github.com/typst/typst/issues/6505)
- Fixed [`measure`](/docs/reference/layout/measure/) in HTML export [#7186](https://github.com/typst/typst/issues/7186)
- Fixed nested [`html.frame`s](/docs/reference/html/frame/) [#6509](https://github.com/typst/typst/issues/6509)
- Fixed that a [`box`](/docs/reference/layout/box/) without a body was ignored in HTML export [#6709](https://github.com/typst/typst/issues/6709)
- Fixed encoding of whitespace in HTML [#6750](https://github.com/typst/typst/issues/6750)
## SVG export
- Added support for COLR-flavored color glyphs [#6693](https://github.com/typst/typst/issues/6693)
- Reduced amount of `<g>` grouping elements that are generated [#6247](https://github.com/typst/typst/issues/6247)
## PNG export
- Fixed crash when [text size](/docs/reference/text/text/#parameters-size) is negative [#5940](https://github.com/typst/typst/issues/5940)
## Visualize
- Added support for using PDFs as [images](/docs/reference/visualize/image/) using the new [`hayro`](https://github.com/LaurenzV/hayro) library. PDFs will be embedded directly in PDF export, rasterized in PNG export, and turned into SVGs in SVG and HTML export. _(Thanks to @LaurenzV for creating hayro!)_ [#6623](https://github.com/typst/typst/issues/6623)
- Added support for WebP images [#6311](https://github.com/typst/typst/issues/6311)
- Various minor improvements for SVG images (see the [resvg 0.44 and 0.45 changelogs](https://github.com/linebender/resvg/blob/v0.45.1/CHANGELOG.md#0450---2025-02-26))
- SVG images can now refer to external image files [#6794](https://github.com/typst/typst/issues/6794)
- Clip paths are now properly anti-aliased [#6570](https://github.com/typst/typst/issues/6570)
- Fixed gradients on curves where the last segment is [`curve.line`](/docs/reference/visualize/curve/#definitions-line) [#6647](https://github.com/typst/typst/issues/6647)
- Fixed stroke cap handling of shapes with partial strokes [#5688](https://github.com/typst/typst/issues/5688)
- Fixed corner radius handling of shapes with partial strokes [#6976](https://github.com/typst/typst/issues/6976)
- Fixed crash when sampling across two coinciding gradient stops [#6166](https://github.com/typst/typst/issues/6166)
## Layout
- Added opt-in support for character-level justification in addition to word-level justification, configured via the new [`par.justification-limits`](/docs/reference/model/par/#parameters-justification-limits) property. This is an impactful microtypographical technique that can significantly improve the appearance of justified text. [#6161](https://github.com/typst/typst/issues/6161)
- Fixed wrong linebreak opportunities related to object replacement characters [#6251](https://github.com/typst/typst/issues/6251)
- Fixed an issue where a breakable block would still produce an empty segment even if nothing fit into the first segment, leading to various undesirable behaviors in combination with fills, strokes, and [stickiness](/docs/reference/layout/block/#parameters-sticky) [#6335](https://github.com/typst/typst/issues/6335)
- Fixed crash with set rule for column or rowspan on a grid cell [#6401](https://github.com/typst/typst/issues/6401)
- Fixed [CJK-Latin-spacing](/docs/reference/text/text/#parameters-cjk-latin-spacing) at manual line breaks [#6700](https://github.com/typst/typst/issues/6700) and at sub- and superscript boundaries [#7175](https://github.com/typst/typst/issues/7175)
## Math
- Added [`frac.style`](/docs/reference/math/frac/#parameters-style) property with new options for skewed and inline fractions [#6672](https://github.com/typst/typst/issues/6672)
- Added [`math.equation.alt`](/docs/reference/math/equation/#parameters-alt) property for setting an alternative description for an equation [#6619](https://github.com/typst/typst/issues/6619)
- Text handling
- A single equation can now use multiple fonts [#6365](https://github.com/typst/typst/issues/6365)
- Glyph layout in math now uses proper text shaping, leading to better handling of more complex Unicode features [#6336](https://github.com/typst/typst/issues/6336)
- Generated characters in an equation (e.g. the `√` produced by `sqrt`) can now be targeted by text show rules [#6365](https://github.com/typst/typst/issues/6365)
- Added [`scr`](/docs/reference/math/variants/#functions-scr) function for roundhand script font style [#6309](https://github.com/typst/typst/issues/6309)
- Added `dotless` parameter to [`accent`](/docs/reference/math/accent/) (typically for rendering a dotless accented i or j) [#5939](https://github.com/typst/typst/issues/5939)
- Script-style glyphs are now preferred at reduced math sizes [#6320](https://github.com/typst/typst/issues/6320)
- Fixed [`text.stroke`](/docs/reference/text/text/#parameters-stroke) in math [#6243](https://github.com/typst/typst/issues/6243)
- Broken glyph assemblies are now prevented even when font data is incorrect [#6688](https://github.com/typst/typst/issues/6688)
- Layout
- Fixed a bug with vertical accent positioning [#5941](https://github.com/typst/typst/issues/5941)
- Fixed positioning of bottom accents [#6187](https://github.com/typst/typst/issues/6187)
- Fixed a bug with layout of roots [#6021](https://github.com/typst/typst/issues/6021)
- Improved layout of [`vec`](/docs/reference/math/vec/) and [`cases`](/docs/reference/math/cases/), making it consistent with [`mat`](/docs/reference/math/mat/) [#5934](https://github.com/typst/typst/issues/5934)
- Removed linebreak opportunity before closing bracket in inline math [#6216](https://github.com/typst/typst/issues/6216)
- An [`augment`](/docs/reference/math/mat/#parameters-augment) line can now exist at the start and end of a matrix, not only in between columns and rows [#5806](https://github.com/typst/typst/issues/5806)
- Shorthands and multi-character numbers do not bind more tightly than fractions anymore in cases like `$x>=(y)/z$` [#5925](https://github.com/typst/typst/issues/5925) [#5996](https://github.com/typst/typst/issues/5996) **(Minor breaking change)**
- Named arguments passed to symbols used as function now raise an error instead of being silently ignored [#6192](https://github.com/typst/typst/issues/6192) **(Minor breaking change)**
- The [`mid`](/docs/reference/math/lr/#functions-mid) element does not force the [`"large"` math class](/docs/reference/math/class/) upon its contents anymore and instead defaults to `"relation"` [#5980](https://github.com/typst/typst/issues/5980)
- Fixed error in math parsing when `..` isn't followed by anything [#7105](https://github.com/typst/typst/issues/7105)
- Fixed the default math class of ⅋, ⎰, ⟅, ⎱, ⟆, ⟇, and ، [#5949](https://github.com/typst/typst/issues/5949) [#6537](https://github.com/typst/typst/issues/6537)
_Thanks to @mkorje for his work on math!_
## Model
- Tables
- Added support for multiple [headers](/docs/reference/model/table/#definitions-header) and subheaders in tables [#6168](https://github.com/typst/typst/issues/6168)
- Table headers now force a rowbreak, i.e. an incomplete row before a header will not be filled with cells after the header [#6687](https://github.com/typst/typst/issues/6687)
- Fixed a bug where [headers](/docs/reference/model/table/#definitions-header) and footers could accidentally expand to contain non-header cells [#5919](https://github.com/typst/typst/issues/5919)
- Added [`title`](/docs/reference/model/title/) element for displaying the document title [#5618](https://github.com/typst/typst/issues/5618)
- Added [`figure.alt`](/docs/reference/model/figure/#parameters-alt) property for setting an alternative description for a figure [#6619](https://github.com/typst/typst/issues/6619)
- [Link](/docs/reference/model/link/) hit boxes for text are now vertically a bit larger to avoid issues with automatic link detection in PDF viewers [#6252](https://github.com/typst/typst/issues/6252)
- The [`link`](/docs/reference/model/link/) function will now produce an error when passed an empty string as a URL [#7049](https://github.com/typst/typst/issues/7049) **(Minor breaking change)**
- The value of the [`number`](/docs/reference/model/enum/#definitions-item-number) argument of `enum.item` now takes `auto` instead of `none` for automatic numbering [#6609](https://github.com/typst/typst/issues/6609) **(Minor breaking change)**
- Improved spacing of nested tight lists [#6242](https://github.com/typst/typst/issues/6242)
- Fixed that `quotes: false` was ignored for [inline-level quotes](/docs/reference/model/quote/#parameters-block) [#5991](https://github.com/typst/typst/issues/5991)
- Fixed [hanging indent](/docs/reference/model/heading/#parameters-hanging-indent) for centered, numbered headings [#6839](https://github.com/typst/typst/issues/6839)
- Fixed [`footnote.entry`](/docs/reference/model/footnote/#definitions-entry) show rules breaking links from footnote to entry [#6912](https://github.com/typst/typst/issues/6912)
- Hebrew numbering does not add Geresh and Gershayim anymore [#6122](https://github.com/typst/typst/issues/6122)
## Bibliography
- Built-in styles
- Updated styles to their latest upstream CSL versions [typst/hayagriva#350](https://github.com/typst/hayagriva/issues/350)
- Renamed `"chicago-fullnotes"` to `"chicago-notes"` (the old name remains as a deprecated alias) [#6920](https://github.com/typst/typst/issues/6920)
- Renamed `"modern-humanities-research-association"` to `"modern-humanities-research-association-notes"` (the old name remains as a deprecated alias) [#6994](https://github.com/typst/typst/issues/6994)
- Added support for locator/supplement in alphanumeric style [typst/hayagriva#307](https://github.com/typst/hayagriva/issues/307)
- Hayagriva format
- Added [`chapter` field](https://github.com/typst/hayagriva/blob/v0.9.1/docs/file-format.md#chapter) corresponding to CSL `chapter-number` and BibLaTeX `chapter` [typst/hayagriva#383](https://github.com/typst/hayagriva/issues/383)
- BibLaTeX format
- Fixed parsing of alphanumeric page ranges [typst/biblatex#86](https://github.com/typst/biblatex/issues/86)
- Added support for `%` comment syntax [typst/biblatex#80](https://github.com/typst/biblatex/issues/80)
- Fixed parsing of space-separated single character commands [typst/biblatex#71](https://github.com/typst/biblatex/issues/71)
- Added "primaryclass" alias for "eprintclass" field [typst/biblatex#75](https://github.com/typst/biblatex/issues/75)
- Added support for BibLaTeX `language` field [typst/hayagriva#317](https://github.com/typst/hayagriva/issues/317)
- Improved translation of BibLaTeX fields to `genre` and `serial-number` [typst/hayagriva#296](https://github.com/typst/hayagriva/issues/296) [typst/hayagriva#369](https://github.com/typst/hayagriva/issues/369)
- CSL handling
- The bibliography rendering now uses [`strong`](/docs/reference/model/strong/), [`emph`](/docs/reference/model/emph/), and [`smallcaps`](/docs/reference/text/smallcaps/) to express CSL font styling instead of directly adjusting the [`text`](/docs/reference/text/text/) style, making styling easier [#6984](https://github.com/typst/typst/issues/6984)
- Added support for date seasons, which are displayed when the month is missing [typst/hayagriva#391](https://github.com/typst/hayagriva/issues/391)
- Terms for "AD" and "BC" are now correctly used from the chosen locale [typst/hayagriva#364](https://github.com/typst/hayagriva/issues/364)
- Fixed how subsequent citations with differing supplements translate into CSL `ibid` and `ibid-with-locator` positions [#6171](https://github.com/typst/typst/issues/6171)
- Fixed handling of `ibid` and `ibid-with-locator` positions in styles [typst/hayagriva#301](https://github.com/typst/hayagriva/issues/301)
- Fixed the `location` conditional in CSL styles for citations with no locator [typst/hayagriva#399](https://github.com/typst/hayagriva/issues/399)
- Fixed accesses of the year suffix resulting in wrong CSL renders [typst/hayagriva#400](https://github.com/typst/hayagriva/issues/400)
- Fixed regression where page variables were no longer supported in styles' `<number>` elements [typst/hayagriva#289](https://github.com/typst/hayagriva/issues/289)
- Fixed sorting and formatting of name parts [typst/hayagriva#287](https://github.com/typst/hayagriva/issues/287) [typst/hayagriva#313](https://github.com/typst/hayagriva/issues/313)
- Fixed year suffix collapsing [typst/hayagriva#367](https://github.com/typst/hayagriva/issues/367)
- Fixed delimiters in locale-specific date formatting [typst/hayagriva#385](https://github.com/typst/hayagriva/issues/385)
- Fixed rendering of date ordinals [typst/hayagriva#366](https://github.com/typst/hayagriva/issues/366)
- Fixed rendering and sorting of dates with BC years [typst/hayagriva#334](https://github.com/typst/hayagriva/issues/334) [typst/hayagriva#368](https://github.com/typst/hayagriva/issues/368)
- Fixed sorting for empty sort values [typst/hayagriva#390](https://github.com/typst/hayagriva/issues/390)
## Text
- The [`sub`](/docs/reference/text/sub/) and [`super`](/docs/reference/text/super/) functions now use the `subs` and `sups` OpenType font features instead of special Unicode characters for typographic scripts, fixing semantical, sizing, and positioning issues [#5777](https://github.com/typst/typst/issues/5777)
- The [`raw`](/docs/reference/text/raw/) element
- Tweaked default syntax-highlighting color scheme of [`raw`](/docs/reference/text/raw/) text to make the colors more accessible [#6754](https://github.com/typst/typst/issues/6754)
- JSON keys and string values now use different colors in the default `raw` syntax highlighting [theme](/docs/reference/text/raw/#parameters-theme) [#6873](https://github.com/typst/typst/issues/6873)
- Fixed a crash when a `raw` [syntax](/docs/reference/text/raw/#parameters-syntaxes) contains an unescaped trailing backslash [#6883](https://github.com/typst/typst/issues/6883)
- Fixed tab indentation in [`raw`](/docs/reference/text/raw/) text with CRLF line terminators [#6961](https://github.com/typst/typst/issues/6961)
- Translations
- Added term translations (a term being the "Section" in "Section 1") for many new languages by importing pre-existing translations from LaTeX packages [#6852](https://github.com/typst/typst/issues/6852)
- Added term translations for Indonesian [#6108](https://github.com/typst/typst/issues/6108), Latvian [#6348](https://github.com/typst/typst/issues/6348), Croatian [#6413](https://github.com/typst/typst/issues/6413), Lithuanian [#6587](https://github.com/typst/typst/issues/6587), French [#7010](https://github.com/typst/typst/issues/7010), French (Canada) [#7098](https://github.com/typst/typst/issues/7098), Galician [#7019](https://github.com/typst/typst/issues/7019), Dutch [#7026](https://github.com/typst/typst/issues/7026), Danish [#7031](https://github.com/typst/typst/issues/7031), Slovenian [#7032](https://github.com/typst/typst/issues/7032), Italian [#7050](https://github.com/typst/typst/issues/7050), Chinese [#7044](https://github.com/typst/typst/issues/7044), Spanish [#7051](https://github.com/typst/typst/issues/7051), and Irish (Gaeilge) [#7024](https://github.com/typst/typst/issues/7024)
- Improved term translations for Czech [#6101](https://github.com/typst/typst/issues/6101), Swedish [#6519](https://github.com/typst/typst/issues/6519), Galician [#7019](https://github.com/typst/typst/issues/7019), Dutch [#7026](https://github.com/typst/typst/issues/7026), Chinese [#7044](https://github.com/typst/typst/issues/7044), Spanish [#7051](https://github.com/typst/typst/issues/7051), Irish (Gaeilge) [#7024](https://github.com/typst/typst/issues/7024), and German [#7082](https://github.com/typst/typst/issues/7082)
- Improved smart quotes for French [#5976](https://github.com/typst/typst/issues/5976), Ukrainian [#6372](https://github.com/typst/typst/issues/6372), Russian [#6331](https://github.com/typst/typst/issues/6331), and Arabic [#6626](https://github.com/typst/typst/issues/6626)
- An empty font list is not allowed anymore in [`text.font`](/docs/reference/text/text/#parameters-font) [#6049](https://github.com/typst/typst/issues/6049) **(Minor breaking change)**
- Added a warning when using a variable font as those are not currently supported [#6425](https://github.com/typst/typst/issues/6425)
- Fixed usage of the same font with different [coverage](/docs/reference/text/text/#parameters-font) settings [#6604](https://github.com/typst/typst/issues/6604)
- Fixed hyphens not showing up when hyphenating at specific positions (where invisible metadata exists) [#6807](https://github.com/typst/typst/issues/6807)
- Fixed styling of repeated hyphens in languages with hyphen repetition [#6798](https://github.com/typst/typst/issues/6798)
- Last resort font fallback does not consider default ignorable characters anymore during font selection [#6805](https://github.com/typst/typst/issues/6805)
- Updated New Computer Modern fonts to version 7.0.4 [#6376](https://github.com/typst/typst/issues/6376)
- Updated data and shaper to Unicode 16.0.0 [#5407](https://github.com/typst/typst/issues/5407)
## Scripting
- The `in` operator can now be used to check whether a definition is present in a module [#6498](https://github.com/typst/typst/issues/6498)
- Added `default` parameter to [`array.first`](/docs/reference/foundations/array/#definitions-first), [`array.last`](/docs/reference/foundations/array/#definitions-last) [#5970](https://github.com/typst/typst/issues/5970), [`array.join`](/docs/reference/foundations/array/#definitions-join) [#6932](https://github.com/typst/typst/issues/6932), [`str.first`](/docs/reference/foundations/str/#definitions-first), and [`str.last`](/docs/reference/foundations/str/#definitions-last) [#6554](https://github.com/typst/typst/issues/6554) methods
- Added `by` parameter to [`array.sorted`](/docs/reference/foundations/array/#definitions-sorted) for sorting with a comparison function [#5627](https://github.com/typst/typst/issues/5627)
- Added [`str.normalize`](/docs/reference/foundations/str/#definitions-normalize) function for Unicode normalization [#5631](https://github.com/typst/typst/issues/5631)
- Added [`from`](/docs/reference/layout/direction/#definitions-from), [`to`](/docs/reference/layout/direction/#definitions-to), and [`sign`](/docs/reference/layout/direction/#definitions-sign) methods to `direction` type [#5893](https://github.com/typst/typst/issues/5893)
- [Labels](/docs/reference/foundations/label/) cannot be empty anymore [#6332](https://github.com/typst/typst/issues/6332) **(Minor breaking change)**
- The WebAssembly runtime used by the [`plugin`](/docs/reference/foundations/plugin/) system was updated and now supports SIMD [#6997](https://github.com/typst/typst/issues/6997)
- Numberings and counters now use 64-bit numbers instead of platform-dependent numbers for consistency across platforms [#6026](https://github.com/typst/typst/issues/6026)
- Improved consistency of how large numbers are handled in data loading functions [#6836](https://github.com/typst/typst/issues/6836)
- The [`toml`](/docs/reference/data-loading/toml/) function is now guaranteed to return a [dictionary](/docs/reference/foundations/dictionary/) and [`toml.encode`](/docs/reference/data-loading/toml/#definitions-encode) must receive a dictionary (it already errored before when passed something else, but the new function signature makes the error clearer) [#6743](https://github.com/typst/typst/issues/6743)
- Serialization of [`bytes`](/docs/reference/foundations/bytes/) in human-readable formats now uses [`repr`](/docs/reference/foundations/repr/) [#6743](https://github.com/typst/typst/issues/6743)
- Fixed slicing of last N elements of an array using the [`count`](/docs/reference/foundations/array/#definitions-slice-count) parameter [#6838](https://github.com/typst/typst/issues/6838)
- Fixed crash when the expression wrapped in a `context` expression is an anonymous function [#6975](https://github.com/typst/typst/issues/6975)
- Fixed equality check between [`raw.line`](/docs/reference/text/raw/#definitions-line) elements [#6560](https://github.com/typst/typst/issues/6560)
- Fixed [`repr`](/docs/reference/foundations/repr/) of [labels](/docs/reference/foundations/label/) being potentially syntactically invalid [#6456](https://github.com/typst/typst/issues/6456)
- Fixed [`repr`](/docs/reference/foundations/repr/) of functions modified through [`with`](/docs/reference/foundations/function/#definitions-with) [#6773](https://github.com/typst/typst/issues/6773)
## Introspection
- The following elements are newly locatable (i.e. they can be discovered with [`query`](/docs/reference/introspection/query/), [`locate`](/docs/reference/introspection/locate/), etc. without having a label): `par`, `table`, `enum`, `list`, `terms`, `title`, `figure.caption`, `footnote.entry`, `outline.entry`, `image`, `emph`, `strong`, `link`, `cite`, `raw`, `underline`, `overline`, `strike`, and `highlight` [#6619](https://github.com/typst/typst/issues/6619)
- Fixed issues with logical order in bidirectional text [#5887](https://github.com/typst/typst/issues/5887) [#6796](https://github.com/typst/typst/issues/6796)
- Fixed logical order of cells in right-to-left [`grid`](/docs/reference/layout/grid/) [#6232](https://github.com/typst/typst/issues/6232)
- Fixed logical order of elements in [`grid`](/docs/reference/layout/grid/) cells that span multiple pages [#7198](https://github.com/typst/typst/issues/7198)
- Fixed logical order of metadata at the starts and ends of paragraphs [#6881](https://github.com/typst/typst/issues/6881) [#6909](https://github.com/typst/typst/issues/6909)
- Fixed introspection [positions](/docs/reference/introspection/location/#definitions-position) of inline elements at the very start of a paragraph (previously the Y position of an element at the very start would differ from one in the middle of the first line) [#6881](https://github.com/typst/typst/issues/6881)
## Styling
- Fixed rare infinite loop in show rule application [#6259](https://github.com/typst/typst/issues/6259)
## Performance
- Optimized incremental compilation with a new algorithm that, in particular, eliminates cases of very slow compilation with heavy context usage [#6683](https://github.com/typst/typst/issues/6683)
## Command Line Interface
- Added `typst info` subcommand for emitting build and environment information [#6761](https://github.com/typst/typst/issues/6761)
- Added `typst completions` subcommand for retrieving shell completions [#6568](https://github.com/typst/typst/issues/6568)
- Added `TYPST_IGNORE_SYSTEM_FONTS` environment variable [#6092](https://github.com/typst/typst/issues/6092)
- Added `--ignore-embedded-fonts` flag and `TYPST_IGNORE_EMBEDDED_FONTS` environment variable for disabling the use of fonts embedded into the Typst binary [#7037](https://github.com/typst/typst/issues/7037)
- Added `--no-pdf-tags` flag for disabling the automatic generation of accessibility tags. These are emitted when no particular standard like PDF/UA-1 is selected to provide a baseline of accessibility. [#6619](https://github.com/typst/typst/issues/6619)
- Added `--target` parameter to `typst query` [#6405](https://github.com/typst/typst/issues/6405)
- Added `--deps` and `--deps-format` parameters for emitting a list of files compilation depends on. Supports the three formats `json`, `zero`, and `make`. [#7022](https://github.com/typst/typst/issues/7022)
- Deprecated the `--make-deps` flag in favor of `--deps` with `--deps-format make` [#7022](https://github.com/typst/typst/issues/7022)
- On Linux, the font search will now fall back to known font directories if none were loaded via Fontconfig. [RazrFalcon/fontdb#71](https://github.com/RazrFalcon/fontdb/issues/71)
- The CLI will now warn when trying to watch the standard input [#6381](https://github.com/typst/typst/issues/6381)
- Fixed race condition when two separate Typst CLI processes concurrently try to install a package [#5979](https://github.com/typst/typst/issues/5979)
- Fixed incremental SVG export not writing output SVGs on changes that only affect the page (e.g. changing `page.fill`) [#6810](https://github.com/typst/typst/issues/6810)
- Fixed a rare potential crash when stack space couldn't be grown as expected [#6969](https://github.com/typst/typst/issues/6969)
## Tooling and Diagnostics
- Errors in many kinds of external text files (e.g., bibliographies, JSON files, etc.) are now annotated within these files instead of at the positions where the files are loaded from a Typst file [#6308](https://github.com/typst/typst/issues/6308)
- Warnings originating from within [`eval`](/docs/reference/foundations/eval/) are now correctly emitted [#6100](https://github.com/typst/typst/issues/6100)
- Diagnostic messages and hints
- Improved error messages related to parsing of numbers [#5969](https://github.com/typst/typst/issues/5969)
- The error message for an unsuitable CSL style now mentions the name of the style [#6306](https://github.com/typst/typst/issues/6306)
- Added hints to various deprecated items with the removal timeline [#6617](https://github.com/typst/typst/issues/6617)
- Added hint for the error message when an X/Y pair is expected [#6476](https://github.com/typst/typst/issues/6476)
- Added hint for a label that appears in both the document and the bibliography [#6457](https://github.com/typst/typst/issues/6457)
- Added additional hint for show rule recursion depth error [#5856](https://github.com/typst/typst/issues/5856)
- Fixed inconsistent formatting of code points and strings in error messages [#6487](https://github.com/typst/typst/issues/6487)
- Autocompletion
- Labels will now be deduplicated in completions [#6516](https://github.com/typst/typst/issues/6516)
- Math font autocompletions are now based on the presence of an OpenType MATH table instead of the word "Math" in the name [#6316](https://github.com/typst/typst/issues/6316)
- Autocompletion immediately after a comma in a parameter list is now supported for explicitly triggered completions (e.g. via Ctrl/Cmd+Space) [#6550](https://github.com/typst/typst/issues/6550)
- Citation style aliases are now displayed as autocompletions [#6696](https://github.com/typst/typst/issues/6696)
- Fixed autocompletion false positives with cursor after parameter list [#6475](https://github.com/typst/typst/issues/6475)
- Fixed autocompletion after partial identifier in math [#6415](https://github.com/typst/typst/issues/6415)
- Fixed which definitions are suggested in math [#6415](https://github.com/typst/typst/issues/6415)
- Fixed inapplicable method autocompletions being listed [#5824](https://github.com/typst/typst/issues/5824)
- Tooltips
- Fixed tooltip for scoped functions (e.g. `calc.round`) [#6234](https://github.com/typst/typst/issues/6234)
- Fixed tooltip and details for figure references [#6580](https://github.com/typst/typst/issues/6580)
- Expression tooltips now use `×` instead of `x` to indicate a repeated value [#6163](https://github.com/typst/typst/issues/6163)
- Fixed jump from click (jumping to the source panel with a click in the preview) in presence of transformations and clipping [#6037](https://github.com/typst/typst/issues/6037)
## Symbols
- Added many new symbols and variants; many more than could be listed here. View [the dedicated changelog](https://github.com/typst/codex/blob/v0.2.0/CHANGELOG.md#version-020-october-7-2025) for a full listing.
- Code points that have a symbol and emoji presentation now have the correct variation selector attached depending on whether they appear in `sym` or `emoji`. That said, they still don't render consistently in Typst due to how font fallback works. [typst/codex#114](https://github.com/typst/codex/issues/114)
- The [`symbol`](/docs/reference/foundations/symbol/) function can now be used to create symbols that comprise not just one character, but one full grapheme cluster [#6489](https://github.com/typst/typst/issues/6489)
## Deprecations
- The name `pdf.embed` in favor of the new name [`pdf.attach`](/docs/reference/pdf/attach/) [#6705](https://github.com/typst/typst/issues/6705)
- The `"chicago-fullnotes"` bibliography style in favor of `"chicago-notes"` [#6920](https://github.com/typst/typst/issues/6920)
- The `"modern-humanities-research-association"` bibliography style in favor of `"modern-humanities-research-association-notes"` [#6994](https://github.com/typst/typst/issues/6994)
- The `--make-deps` CLI flag in favor of `--deps` with `--deps-format make` [#7022](https://github.com/typst/typst/issues/7022)
- Various symbols, see the [deprecation section in the dedicated changelog](https://github.com/typst/codex/blob/v0.2.0/CHANGELOG.md#deprecated) for a full listing
## Removals
- Removed compatibility behavior of type/str comparisons (e.g. `int == "integer"`), which was temporarily introduced in Typst 0.8 and deprecated in Typst 0.13 **(Breaking change)**
## Development
- The `Default` impl for `Library` had to be removed for crate splitting and trait coherence reasons, but you can get a drop-in replacement via `use typst::LibraryExt` [#6576](https://github.com/typst/typst/issues/6576)
- The `PdfOptions` struct has a new `tagged` field, which defaults to `true` [#6619](https://github.com/typst/typst/issues/6619) [#7046](https://github.com/typst/typst/issues/7046)
- Fixed a potential panic in `World::font` implementations. Downstream `World` implementations might need to apply [the same fix](https://github.com/typst/typst/pull/6117). [#6117](https://github.com/typst/typst/issues/6117)
- Increased minimum supported Rust version to 1.88 [#6637](https://github.com/typst/typst/issues/6637)
- The Docker container now has the optional non-root user `typst` [#7058](https://github.com/typst/typst/issues/7058)
## Contributors
@@ -0,0 +1,56 @@
# 0.14.1
## PDF export
- Fixed regression where links to labelled elements would sometimes not work correctly [LaurenzV/krilla#304](https://github.com/LaurenzV/krilla/issues/304)
- Fixed bug where PDF text attributes could be written incorrectly [#7478](https://github.com/typst/typst/issues/7478)
- Fixed crash in link handling [#7471](https://github.com/typst/typst/issues/7471)
- Fixed crash for zero-sized pages [#7454](https://github.com/typst/typst/issues/7454)
- Fixed crash when a table [`vline`](/docs/reference/model/table/#definitions-vline) or [`hline`](/docs/reference/model/table/#definitions-hline) has an out-of-bounds index [#7448](https://github.com/typst/typst/issues/7448)
- Fixed crash in formatting of font-related PDF export errors [#7460](https://github.com/typst/typst/issues/7460)
- Fixed crash when a [`footnote`](/docs/reference/model/footnote/) or [`place`](/docs/reference/layout/place/) element was queried and reinserted into the document [#7216](https://github.com/typst/typst/issues/7216)
- Fixed crash for PNGs with invalid metadata [LaurenzV/krilla#286](https://github.com/LaurenzV/krilla/issues/286), [LaurenzV/krilla#287](https://github.com/LaurenzV/krilla/issues/287)
- Fixed bug where text in SVGs with `fill-and-stroke` paint order could be exported incorrectly [LaurenzV/krilla#292](https://github.com/LaurenzV/krilla/issues/292)
- Fixed bug with layer isolation in SVGs where blending/masking is used [LaurenzV/krilla#295](https://github.com/LaurenzV/krilla/issues/295)
- Fixed that table headers could be tagged incorrectly in some scenarios [LaurenzV/krilla#289](https://github.com/LaurenzV/krilla/issues/289)
- Fixed issues where generated PDFs could differ between 32-bit and 64-bit systems [LaurenzV/krilla#317](https://github.com/LaurenzV/krilla/issues/317), [LaurenzV/krilla#316](https://github.com/LaurenzV/krilla/issues/316), [LaurenzV/krilla#312](https://github.com/LaurenzV/krilla/issues/312)
- Upgraded JPEG decoder used during PDF export for improved compatibility, fixing a case where a valid JPEG was rejected [LaurenzV/krilla#288](https://github.com/LaurenzV/krilla/issues/288)
- A PDF document information dictionary that would be empty is now fully omitted instead [LaurenzV/krilla#280](https://github.com/LaurenzV/krilla/issues/280)
- A rare crash in PDF tagging was turned into a compiler error [#7450](https://github.com/typst/typst/issues/7450)
## HTML export
- Fixed export of table [headers](/docs/reference/model/table/#definitions-header) and [footers](/docs/reference/model/table/#definitions-footer) with gutter [#7332](https://github.com/typst/typst/issues/7332)
- A [`page`](/docs/reference/layout/page/) set rule in HTML export is now a warning instead of a hard error, in line with how unsupported elements are generally treated [#7513](https://github.com/typst/typst/issues/7513)
## Math
- Fixed regression where `arrow.l.r` could not be used as an [accent](/docs/reference/math/accent/) anymore [#7481](https://github.com/typst/typst/issues/7481)
- Fixed that single-letter strings did not react to spaces around them like multi-letter strings do [#7276](https://github.com/typst/typst/issues/7276)
- Fixed that spacing around [`mat`](/docs/reference/math/mat/) and [`vec`](/docs/reference/math/vec/) with a fence delimiter was whitespace-dependent [#7309](https://github.com/typst/typst/issues/7309)
- Fixed height calculation for horizontally stretched glyphs [#7327](https://github.com/typst/typst/issues/7327)
## Model
- Fixed regression where Typst would error in heading numbering functions that don't handle the counter state `(0,)`. This can occur in the first layout iteration. Such errors are usually automatically caught by Typst, which was not the case here. [#7459](https://github.com/typst/typst/issues/7459)
## Text
- Fixed regression where Typst would synthesize superscripts for some fonts even when [typographic](/docs/reference/text/super/#parameters-typographic) glyphs were available [#7462](https://github.com/typst/typst/issues/7462)
- Fixed regression where some oblique fonts would be classified as italic [#7483](https://github.com/typst/typst/issues/7483)
## Scripting
- Fixed crash due to violated invariants in [`array.sorted`](/docs/reference/foundations/array/#definitions-sorted) [#7520](https://github.com/typst/typst/issues/7520)
- Fixed crashes due to overflow in [`calc.rem`](/docs/reference/foundations/calc/#functions-rem), [`calc.rem-euclid`](/docs/reference/foundations/calc/#functions-rem-euclid), [`calc.div-euclid`](/docs/reference/foundations/calc/#functions-div-euclid), [`calc.quo`](/docs/reference/foundations/calc/#functions-quo), and [`calc.gcd`](/docs/reference/foundations/calc/#functions-gcd) [#7419](https://github.com/typst/typst/issues/7419)
- Upgraded WebAssembly runtime, fixing a bug that [plugins](/docs/reference/foundations/plugin/) could run into [#7438](https://github.com/typst/typst/issues/7438)
## Command Line Interface
- Compiling to standard output in combination with `--deps --deps-format=make` (which results in an error) will not produce an empty Make dependency file as a side effect anymore [#7246](https://github.com/typst/typst/issues/7246)
## Development
- Increased minimum supported Rust version to 1.89 [#7363](https://github.com/typst/typst/issues/7363)
## Contributors
@@ -0,0 +1,11 @@
# 0.14.2
## Security
- Updated the WebAssembly runtime used for executing [plugins](/docs/reference/foundations/plugin/). The version used in Typst 0.14.0 and 0.14.1 suffers from a memory handling vulnerability. Based on our investigation, the vulnerability would be very hard to exploit in practice, but an exploit could theoretically be feasible. In any case, **we recommend upgrading to Typst 0.14.2.** This holds in particular for local users. In the web app, the bug is not critical as the browser offers an extra layer of protection. Typst 0.13.1 and below are not affected by this vulnerability. _Technical details:_ The [`wasmi`](https://github.com/wasmi-labs/wasmi/) WebAssembly runtime versions used in 0.14.0 and 0.14.1 have a _use-after-free_ memory handling bug in certain memory growth situations. Specifically, the bug occurs when the plugin tries to grow its memory, but allocating the requested amount of memory fails. Based on our investigation, the bug is hard to trigger in practice as the WebAssembly linear memory is always limited to 4GB on a technical level and modern operating systems rarely fail to serve a 4GB memory allocation request (typically not even under RAM pressure). Once the bug is triggered, it would also still be very challenging to turn it into an actual exploit. Regardless, we recommend upgrading to Typst 0.14.2 for protection against a potential exploit.
## Diagnostics
- Added a hint when [`array.sorted`](/docs/reference/foundations/array/#definitions-sorted) fails because a pair of elements could not be compared. This hint aids with fixing bugs in user code that were surfaced by a change in internal sorting behavior in Typst 0.14.1.
## Contributors
@@ -0,0 +1,37 @@
# 0.2.0
## Breaking changes
- Removed support for iterating over index and value in [for loops](/docs/reference/scripting/#loops). This is now handled via unpacking and enumerating. Same goes for the [`map`](/docs/reference/foundations/array/#definitions-map) method.
- [Dictionaries](/docs/reference/foundations/dictionary/) now iterate in insertion order instead of alphabetical order.
## New features
- Added [unpacking syntax](/docs/reference/scripting/#bindings) for let bindings, which allows things like `let (1, 2) = array`
- Added [`enumerate`](/docs/reference/foundations/array/#definitions-enumerate) method
- Added [`path`](/docs/reference/visualize/path/) function for drawing Bézier paths
- Added [`layout`](/docs/reference/layout/layout/) function to access the size of the surrounding page or container
- Added `key` parameter to [`sorted`](/docs/reference/foundations/array/#definitions-sorted) method
## Command line interface
- Fixed `--open` flag blocking the program
- New Computer Modern font is now embedded into the binary
- Shell completions and man pages can now be generated by setting the `GEN_ARTIFACTS` environment variable to a target directory and then building Typst
## Miscellaneous improvements
- Fixed page numbering in outline
- Added basic i18n for a few more languages (AR, NB, CS, NN, PL, SL, ES, UA, VI)
- Added a few numbering patterns (Ihora, Chinese)
- Added `sinc` [operator](/docs/reference/math/op/)
- Fixed bug where math could not be hidden with [`hide`](/docs/reference/layout/hide/)
- Fixed sizing issues with box, block, and shapes
- Fixed some translations
- Fixed inversion of "R" in [`cal`](/docs/reference/math/variants/#functions-cal) and [`frak`](/docs/reference/math/variants/#functions-frak) styles
- Fixed some styling issues in math
- Fixed supplements of references to headings
- Fixed syntax highlighting of identifiers in certain scenarios
- [Ratios](/docs/reference/layout/ratio/) can now be multiplied with more types and be converted to [floats](/docs/reference/foundations/float/) with the [`float`](/docs/reference/foundations/float/) function
## Contributors
@@ -0,0 +1,61 @@
# 0.3.0
## Breaking changes
- Renamed a few symbols: What was previous `dot.op` is now just `dot` and the basic dot is `dot.basic`. The same applies to `ast` and `tilde`.
- Renamed `mod` to [`rem`](/docs/reference/foundations/calc/#functions-rem) to more accurately reflect the behavior. It will remain available as `mod` until the next update as a grace period.
- A lone underscore is not a valid identifier anymore, it can now only be used in patterns
- Removed `before` and `after` arguments from [`query`](/docs/reference/introspection/query/). This is now handled through flexible [selectors](/docs/reference/foundations/selector/) combinator methods
- Added support for [attachments](/docs/reference/math/attach/#functions-attach) (sub-, superscripts) that precede the base symbol. The `top` and `bottom` arguments have been renamed to `t` and `b`.
## New features
- Added support for more complex [strokes](/docs/reference/visualize/stroke/) (configurable caps, joins, and dash patterns)
- Added [`cancel`](/docs/reference/math/cancel/) function for equations
- Added support for [destructuring](/docs/reference/scripting/#bindings) in argument lists and assignments
- Added [`alt`](/docs/reference/visualize/image/#parameters-alt) text argument to image function
- Added [`toml`](/docs/reference/data-loading/toml/) function for loading data from a TOML file
- Added [`zip`](/docs/reference/foundations/array/#definitions-zip), [`sum`](/docs/reference/foundations/array/#definitions-sum), and [`product`](/docs/reference/foundations/array/#definitions-product) methods for arrays
- Added `fact`, `perm`, `binom`, `gcd`, `lcm`, `atan2`, `quo`, `trunc`, and `fract` [calculation](/docs/reference/foundations/calc/) functions
## Improvements
- Text in SVGs now displays properly
- Typst now generates a PDF heading outline
- [References](/docs/reference/model/ref/) now provides the referenced element as a field in show rules
- Refined linebreak algorithm for better Chinese justification
- Locations are now a valid kind of selector
- Added a few symbols for algebra
- Added Spanish smart quote support
- Added [`selector`](/docs/reference/foundations/selector/) function to turn a selector-like value into a selector on which combinator methods can be called
- Improved some error messages
- The outline and bibliography headings can now be styled with show-set rules
- Operations on numbers now produce an error instead of overflowing
## Bug fixes
- Fixed wrong linebreak before punctuation that follows inline equations, citations, and other elements
- Fixed a bug with [argument sinks](/docs/reference/foundations/arguments/)
- Fixed strokes with thickness zero
- Fixed hiding and show rules in math
- Fixed alignment in matrices
- Fixed some alignment bugs in equations
- Fixed grid cell alignment
- Fixed alignment of list marker and enum markers in presence of global alignment settings
- Fixed [path](/docs/reference/visualize/path/) closing
- Fixed compiler crash with figure references
- A single trailing line breaks is now ignored in math, just like in text
## Command line interface
- Font path and compilation root can now be set with the environment variables `TYPST_FONT_PATHS` and `TYPST_ROOT`
- The output of `typst fonts` now includes the embedded fonts
## Development
- Added instrumentation for debugging and optimization
- Added `--update` flag and `UPDATE_EXPECT` environment variable to update reference images for tests
- You can now run a specific subtest with `--subtest`
- Tests now run on multiple threads
## Contributors
@@ -0,0 +1,84 @@
# 0.4.0
## Footnotes
- Implemented support for footnotes
- The [`footnote`](/docs/reference/model/footnote/) function inserts a footnote
- The [`footnote.entry`](/docs/reference/model/footnote/#definitions-entry) function can be used to customize the footnote listing
- The `"chicago-notes"` [citation style](/docs/reference/model/cite/#parameters-style) is now available
## Documentation
- Added a [Guide for LaTeX Users](/docs/guides/for-latex-users/)
- Now shows default values for optional arguments
- Added richer outlines in "On this Page"
- Added initial support for search keywords: "Table of Contents" will now find the [outline](/docs/reference/model/outline/) function. Suggestions for more keywords are welcome!
- Fixed issue with search result ranking
- Fixed many more small issues
## Math
- **Breaking change**: Alignment points (`&`) in equations now alternate between left and right alignment
- Added support for writing roots with Unicode: For example, `$root(x+y)$` can now also be written as `$√(x+y)$`
- Fixed uneven vertical [`attachment`](/docs/reference/math/attach/#functions-attach) alignment
- Fixed spacing on decorated elements (e.g., spacing around a [canceled](/docs/reference/math/cancel/) operator)
- Fixed styling for stretchable symbols
- Added `tack.r.double`, `tack.l.double`, `dotless.i` and `dotless.j` [symbols](/docs/reference/symbols/sym/)
- Fixed show rules on symbols (e.g. `show sym.tack: set text(blue)`)
- Fixed missing rename from `ast.op` to `ast` that should have been in the previous release
## Scripting
- Added function scopes: A function can now hold related definitions in its own scope, similar to a module. The new [`assert.eq`](/docs/reference/foundations/assert/#definitions-eq) function, for instance, is part of the [`assert`](/docs/reference/foundations/assert/) function's scope. Note that function scopes are currently only available for built-in functions.
- Added [`assert.eq`](/docs/reference/foundations/assert/#definitions-eq) and [`assert.ne`](/docs/reference/foundations/assert/#definitions-ne) functions for simpler equality and inequality assertions with more helpful error messages
- Exposed [list](/docs/reference/model/list/#definitions-item), [enum](/docs/reference/model/enum/#definitions-item), and [term list](/docs/reference/model/terms/#definitions-item) items in their respective functions' scope
- The `at` methods on [strings](/docs/reference/foundations/str/#definitions-at), [arrays](/docs/reference/foundations/array/#definitions-at), [dictionaries](/docs/reference/foundations/dictionary/#definitions-at), and [content](/docs/reference/foundations/content/#definitions-at) now support specifying a default value
- Added support for passing a function to [`replace`](/docs/reference/foundations/str/#definitions-replace) that is called with each match.
- Fixed [replacement](/docs/reference/foundations/str/#definitions-replace) strings: They are now inserted completely verbatim instead of supporting the previous (unintended) magic dollar syntax for capture groups
- Fixed bug with trailing placeholders in destructuring patterns
- Fixed bug with underscore in parameter destructuring
- Fixed crash with nested patterns and when hovering over an invalid pattern
- Better error messages when casting to an [integer](/docs/reference/foundations/int/) or [float](/docs/reference/foundations/float/) fails
## Text and Layout
- Implemented sophisticated CJK punctuation adjustment
- Disabled [overhang](/docs/reference/text/text/#parameters-overhang) for CJK punctuation
- Added basic translations for Traditional Chinese
- Fixed [alignment](/docs/reference/text/raw/#parameters-align) of text inside raw blocks (centering a raw block, e.g. through a figure, will now keep the text itself left-aligned)
- Added support for passing a array instead of a function to configure table cell [alignment](/docs/reference/model/table/#parameters-align) and [fill](/docs/reference/model/table/#parameters-fill) per column
- Fixed automatic figure [`kind`](/docs/reference/model/figure/#parameters-kind) detection
- Made alignment of [enum numbers](/docs/reference/model/enum/#parameters-number-align) configurable, defaulting to `end`
- Figures can now be made breakable with a show-set rule for blocks in figure
- Initial fix for smart quotes in RTL languages
## Export
- Fixed ligatures in PDF export: They are now copyable and searchable
- Exported PDFs now embed ICC profiles for images that have them
- Fixed export of strokes with zero thickness
## Web app
- Projects can now contain folders
- Added upload by drag-and-drop into the file panel
- Files from the file panel can now be dragged into the editor to insert them into a Typst file
- You can now copy-paste images and other files from your computer directly into the editor
- Added a button to resend confirmation email
- Added an option to invert preview colors in dark mode
- Added tips to the loading screen and the Help menu. Feel free to propose more!
- Added syntax highlighting for YAML files
- Allowed middle mouse button click on many buttons to navigate into a new tab
- Allowed more project names
- Fixed overridden Vim mode keybindings
- Fixed many bugs regarding file upload and more
## Miscellaneous Improvements
- Improved performance of counters, state, and queries
- Improved incremental parsing for more efficient recompilations
- Added support for `.yaml` extension in addition to `.yml` for bibliographies
- The CLI now emits escape codes only if the output is a TTY
- For users of the `typst` crate: The `Document` is now `Sync` again and the `World` doesn't have to be `'static` anymore
## Contributors
@@ -0,0 +1,57 @@
# 0.5.0
## Text and Layout
- Added [`raw`](/docs/reference/text/raw/) syntax highlighting for many more languages
- Added support for Korean [numbering](/docs/reference/model/numbering/)
- Added basic i18n for a few more languages (NL, SV, DA)
- Improved line breaking for East Asian languages
- Expanded functionality of outline [`indent`](/docs/reference/model/outline/#parameters-indent) property
- Fixed footnotes in columns
- Fixed page breaking bugs with [footnotes](/docs/reference/model/footnote/)
- Fixed bug with handling of footnotes in lists, tables, and figures
- Fixed a bug with CJK punctuation adjustment
- Fixed a crash with rounded rectangles
- Fixed alignment of [`line`](/docs/reference/visualize/line/) elements
## Math
- **Breaking change:** The syntax rules for mathematical [attachments](/docs/reference/math/attach/#functions-attach) were improved: `$f^abs(3)$` now parses as `$f^(abs(3))$` instead of `$(f^abs)(3)$`. To disambiguate, add a space: `$f^zeta (3)$`.
- Added [forced size](/docs/reference/math/sizes/) commands for math (e.g., [`display`](/docs/reference/math/sizes/#functions-display))
- Added [`supplement`](/docs/reference/math/equation/#parameters-supplement) parameter to [`equation`](/docs/reference/math/equation/), used by [references](/docs/reference/model/ref/)
- New [symbols](/docs/reference/symbols/sym/): `bullet`, `xor`, `slash.big`, `sigma.alt`, `tack.r.not`, `tack.r.short`, `tack.r.double.not`
- Fixed a bug with symbols in matrices
- Fixed a crash in the [`attach`](/docs/reference/math/attach/#functions-attach) function
## Scripting
- Added new [`datetime`](/docs/reference/foundations/datetime/) type and [`datetime.today`](/docs/reference/foundations/datetime/#definitions-today) to retrieve the current date
- Added [`str.from-unicode`](/docs/reference/foundations/str/#definitions-from-unicode) and [`str.to-unicode`](/docs/reference/foundations/str/#definitions-to-unicode) functions
- Added [`fields`](/docs/reference/foundations/content/#definitions-fields) method on content
- Added `base` parameter to [`str`](/docs/reference/foundations/str/) function
- Added [`calc.exp`](/docs/reference/foundations/calc/#functions-exp) and [`calc.ln`](/docs/reference/foundations/calc/#functions-ln)
- Improved accuracy of [`calc.pow`](/docs/reference/foundations/calc/#functions-pow) and [`calc.log`](/docs/reference/foundations/calc/#functions-log) for specific bases
- Fixed [removal](/docs/reference/foundations/dictionary/#definitions-remove) order for dictionary
- Fixed `.at(default: ..)` for [strings](/docs/reference/foundations/str/#definitions-at) and [content](/docs/reference/foundations/content/#definitions-at)
- Fixed field access on styled elements
- Removed deprecated `calc.mod` function
## Command line interface
- Added PNG export via `typst compile source.typ output-\{n\}.png`. The output path must contain `\{n\}` if the document has multiple pages.
- Added `--diagnostic-format=short` for Unix-style short diagnostics
- Doesn't emit color codes anymore if stderr isn't a TTY
- Now sets the correct exit when invoked with a nonexistent file
- Now ignores UTF-8 BOM in Typst files
## Miscellaneous Improvements
- Improved errors for mismatched delimiters
- Improved error message for failed length comparisons
- Fixed a bug with images not showing up in Apple Preview
- Fixed multiple bugs with the PDF outline
- Fixed citations and other searchable elements in [`hide`](/docs/reference/layout/hide/)
- Fixed bugs with [reference supplements](/docs/reference/model/ref/#parameters-supplement)
- Fixed Nix flake
## Contributors
@@ -0,0 +1,54 @@
# 0.6.0
## Package Management
- Typst now has built-in [package management](/docs/reference/scripting/#packages)
- You can import [published](https://typst.app/universe/) community packages or create and use [system-local](https://github.com/typst/packages#local-packages) ones
- Published packages are also supported in the web app
## Math
- Added support for optical size variants of glyphs in math mode
- Added argument to enable [`limits`](/docs/reference/math/attach/#functions-limits) conditionally depending on whether the equation is set in [`display`](/docs/reference/math/sizes/#functions-display) or [`inline`](/docs/reference/math/sizes/#functions-inline) style
- Added `gt.eq.slant` and `lt.eq.slant` symbols
- Increased precedence of factorials in math mode (`$1/n!$` works correctly now)
- Improved [underlines](/docs/reference/math/underover/#functions-underline) and [overlines](/docs/reference/math/underover/#functions-overline) in math mode
- Fixed usage of [`limits`](/docs/reference/math/attach/#functions-limits) function in show rules
- Fixed bugs with line breaks in equations
## Text and Layout
- Added support for alternating page [margins](/docs/reference/layout/page/#parameters-margin) with the `inside` and `outside` keys
- Added support for specifying the page [`binding`](/docs/reference/layout/page/#parameters-binding)
- Added [`to`](/docs/reference/layout/pagebreak/#parameters-to) argument to pagebreak function to skip to the next even or odd page
- Added basic i18n for a few more languages (TR, SQ, TL)
- Fixed bug with missing table row at page break
- Fixed bug with [underlines](/docs/reference/text/underline/)
- Fixed bug superfluous table lines
- Fixed smart quotes after line breaks
- Fixed a crash related to text layout
## Command line interface
- **Breaking change:** Added requirement for `--root`/`TYPST_ROOT` directory to contain the input file because it designates the _project_ root. Existing setups that use `TYPST_ROOT` to emulate package management should switch to [local packages](https://github.com/typst/packages#local-packages)
- **Breaking change:** Now denies file access outside of the project root
- Added support for local packages and on-demand package download
- Now watches all relevant files, within the root and all packages
- Now displays compilation time
## Miscellaneous Improvements
- Added [`outline.entry`](/docs/reference/model/outline/#definitions-entry) to customize outline entries with show rules
- Added some hints for error messages
- Added some missing syntaxes for [`raw`](/docs/reference/text/raw/) highlighting
- Improved rendering of rotated images in PNG export and web app
- Made [footnotes](/docs/reference/model/footnote/) reusable and referenceable
- Fixed bug with citations and bibliographies in [`locate`](/docs/reference/introspection/locate/)
- Fixed inconsistent tense in documentation
## Development
- Added [contribution guide](https://github.com/typst/typst/blob/main/CONTRIBUTING.md)
- Reworked `World` interface to accommodate for package management and make it a bit simpler to implement _(Breaking change for implementors)_
## Contributors
@@ -0,0 +1,109 @@
# 0.7.0
## Text and Layout
- Added support for floating figures through the [`placement`](/docs/reference/model/figure/#parameters-placement) argument on the figure function
- Added support for arbitrary floating content through the [`float`](/docs/reference/layout/place/#parameters-float) argument on the place function
- Added support for loading `.sublime-syntax` files as highlighting [syntaxes](/docs/reference/text/raw/#parameters-syntaxes) for raw blocks
- Added support for loading `.tmTheme` files as highlighting [themes](/docs/reference/text/raw/#parameters-theme) for raw blocks
- Added _bounds_ option to [`top-edge`](/docs/reference/text/text/#parameters-top-edge) and [`bottom-edge`](/docs/reference/text/text/#parameters-bottom-edge) arguments of text function for tight bounding boxes
- Removed nonsensical top- and bottom-edge options, e.g. _ascender_ for the bottom edge **(Breaking change)**
- Added [`script`](/docs/reference/text/text/#parameters-script) argument to text function
- Added [`alternative`](/docs/reference/text/smartquote/#parameters-alternative) argument to smart quote function
- Added basic i18n for Japanese
- Added hyphenation support for `nb` and `nn` language codes in addition to `no`
- Fixed positioning of [placed elements](/docs/reference/layout/place/) in containers
- Fixed overflowing containers due to optimized line breaks
## Export
- Greatly improved export of SVG images to PDF. Many thanks to [@LaurenzV](https://github.com/LaurenzV) for their work on this.
- Added support for the alpha channel of RGBA colors in PDF export
- Fixed a bug with PPI (pixels per inch) for PNG export
## Math
- Improved layout of primes (e.g. in `$a'_1$`)
- Improved display of multi-primes (e.g. in `$a''$`)
- Improved layout of [roots](/docs/reference/math/roots/#functions-root)
- Changed relations to show attachments as [limits](/docs/reference/math/attach/#functions-limits) by default (e.g. in `$a ->^x b$`)
- Large operators and delimiters are now always vertically centered
- [Boxes](/docs/reference/layout/box/) in equations now sit on the baseline instead of being vertically centered by default. Notably, this does not affect [blocks](/docs/reference/layout/block/) because they are not inline elements.
- Added support for [weak spacing](/docs/reference/layout/h/#parameters-weak)
- Added support for OpenType character variants
- Added support for customizing the [math class](/docs/reference/math/class/) of content
- Fixed spacing around `.`, `\/`, and `...`
- Fixed spacing between closing delimiters and large operators
- Fixed a bug with math font weight selection
- Symbols and Operators **(Breaking changes)**
- Added `id`, `im`, and `tr` text [operators](/docs/reference/math/op/)
- Renamed `ident` to `equiv` with alias `eq.triple` and removed `ident.strict` in favor of `eq.quad`
- Renamed `ast.sq` to `ast.square` and `integral.sq` to `integral.square`
- Renamed `.eqq` modifier to `.equiv` (and `.neqq` to `.nequiv`) for `tilde`, `gt`, `lt`, `prec`, and `succ`
- Added `emptyset` as alias for `nothing`
- Added `lt.curly` and `gt.curly` as aliases for `prec` and `succ`
- Added `aleph`, `beth`, and `gimmel` as alias for `alef`, `bet`, and `gimel`
## Scripting
- Fields
- Added `abs` and `em` field to [lengths](/docs/reference/layout/length/)
- Added `ratio` and `length` field to [relative lengths](/docs/reference/layout/relative/)
- Added `x` and `y` field to [2d alignments](/docs/reference/layout/align/#parameters-alignment)
- Added `paint`, `thickness`, `cap`, `join`, `dash`, and `miter-limit` field to [strokes](/docs/reference/visualize/stroke/)
- Accessor and utility methods
- Added [`dedup`](/docs/reference/foundations/array/#definitions-dedup) method to arrays
- Added `pt`, `mm`, `cm`, and `inches` method to [lengths](/docs/reference/layout/length/)
- Added `deg` and `rad` method to [angles](/docs/reference/layout/angle/)
- Added `kind`, `hex`, `rgba`, `cmyk`, and `luma` method to [colors](/docs/reference/visualize/color/)
- Added `axis`, `start`, `end`, and `inv` method to [directions](/docs/reference/layout/stack/#parameters-dir)
- Added `axis` and `inv` method to [alignments](/docs/reference/layout/align/#parameters-alignment)
- Added `inv` method to [2d alignments](/docs/reference/layout/align/#parameters-alignment)
- Added `start` argument to [`enumerate`](/docs/reference/foundations/array/#definitions-enumerate) method on arrays
- Added [`color.mix`](/docs/reference/visualize/color/#definitions-mix) function
- Added `mode` and `scope` arguments to [`eval`](/docs/reference/foundations/eval/) function
- Added [`bytes`](/docs/reference/foundations/bytes/) type for holding large byte buffers
- Added [`encoding`](/docs/reference/data-loading/read/#parameters-encoding) argument to read function to read a file as bytes instead of a string
- Added [`image.decode`](/docs/reference/visualize/image/#definitions-decode) function for decoding an image directly from a string or bytes
- Added [`bytes`](/docs/reference/foundations/bytes/) function for converting a string or an array of integers to bytes
- Added [`array`](/docs/reference/foundations/array/) function for converting bytes to an array of integers
- Added support for converting bytes to a string with the [`str`](/docs/reference/foundations/str/) function
## Tooling and Diagnostics
- Added support for compiler warnings
- Added warning when compilation does not converge within five attempts due to intense use of introspection features
- Added warnings for empty emphasis (`__` and `**`)
- Improved error message for invalid field assignments
- Improved error message after single `#`
- Improved error message when a keyword is used where an identifier is expected
- Fixed parameter autocompletion for functions that are in modules
- Import autocompletion now only shows the latest package version until a colon is typed
- Fixed autocompletion for dictionary key containing a space
- Fixed autocompletion for `for` loops
## Command line interface
- Added `typst query` subcommand to execute a [query](/docs/reference/introspection/query/#command-line-queries) on the command line
- The `--root` and `--font-paths` arguments cannot appear in front of the command anymore **(Breaking change)**
- Local and cached packages are now stored in directories of the form `\{namespace\}/\{name\}/\{version\}` instead of `\{namespace\}/\{name\}-\{version\}` **(Breaking change)**
- Now prioritizes explicitly given fonts (via `--font-paths`) over system and embedded fonts when both exist
- Fixed `typst watch` not working with some text editors
- Fixed displayed compilation time (now includes export)
## Miscellaneous Improvements
- Added [`bookmarked`](/docs/reference/model/heading/#parameters-bookmarked) argument to heading to control whether a heading becomes part of the PDF outline
- Added [`caption-pos`](/docs/reference/model/figure/#definitions-caption-position) argument to control the position of a figure's caption
- Added [`metadata`](/docs/reference/introspection/metadata/) function for exposing an arbitrary value to the introspection system
- Fixed that a [`state`](/docs/reference/introspection/state/) was identified by the pair `(key, init)` instead of just its `key`
- Improved indent logic of [enumerations](/docs/reference/model/enum/). Instead of requiring at least as much indent as the end of the marker, they now require only one more space indent than the start of the marker. As a result, even long markers like `12.` work with just 2 spaces of indent.
- Fixed bug with indent logic of [`raw`](/docs/reference/text/raw/) blocks
- Fixed a parsing bug with dictionaries
## Development
- Extracted parser and syntax tree into `typst-syntax` crate
- The `World::today` implementation of Typst dependents may need fixing if they have the same [bug](https://github.com/typst/typst/issues/1842) that the CLI world had
## Contributors
@@ -0,0 +1,95 @@
# 0.8.0
## Scripting
- Plugins (thanks to [@astrale-sharp](https://github.com/astrale-sharp) and [@arnaudgolfouse](https://github.com/arnaudgolfouse))
- Typst can now load [plugins](/docs/reference/foundations/plugin/) that are compiled to WebAssembly
- Anything that can be compiled to WebAssembly can thus be loaded as a plugin
- These plugins are fully encapsulated (no access to file system or network)
- Plugins can be shipped as part of [packages](/docs/reference/scripting/#packages)
- Plugins work just the same in the web app
- Types are now first-class values **(Breaking change)**
- A [type](/docs/reference/foundations/type/) is now itself a value
- Some types can be called like functions (those that have a constructor), e.g. [`int`](/docs/reference/foundations/int/) and [`str`](/docs/reference/foundations/str/)
- Type checks are now of the form `type(10) == int` instead of the old `type(10) == "integer"`. [Compatibility](/docs/reference/foundations/type/#compatibility) with the old way will remain for a while to give package authors time to upgrade, but it will be removed at some point.
- Methods are now syntax sugar for calling a function scoped to a type, meaning that `"hello".len()` is equivalent to `str.len("hello")`
- Added support for [`import`](/docs/reference/scripting/#modules) renaming with `as`
- Added a [`duration`](/docs/reference/foundations/duration/) type
- Added support for [CBOR](/docs/reference/data-loading/cbor/) encoding and decoding
- Added encoding and decoding functions from and to bytes for data formats: [`json.decode`](/docs/reference/data-loading/json/#definitions-decode), [`json.encode`](/docs/reference/data-loading/json/#definitions-encode), and similar functions for other formats
- Added [`array.intersperse`](/docs/reference/foundations/array/#definitions-intersperse) function
- Added [`str.rev`](/docs/reference/foundations/str/#definitions-rev) function
- Added `calc.tau` constant
- Made [bytes](/docs/reference/foundations/bytes/) joinable and addable
- Made [`array.zip`](/docs/reference/foundations/array/#definitions-zip) function variadic
- Fixed bug with [`eval`](/docs/reference/foundations/eval/) when the `mode` was set to `"math"`
- Fixed bug with [`ends-with`](/docs/reference/foundations/str/#definitions-ends-with) function on strings
- Fixed bug with destructuring in combination with break, continue, and return
- Fixed argument types of [hyperbolic functions](/docs/reference/foundations/calc/#functions-cosh), they don't allow angles anymore **(Breaking change)**
- Renamed some color methods: `rgba` becomes `to-rgba`, `cmyk` becomes `to-cmyk`, and `luma` becomes `to-luma` **(Breaking change)**
## Export
- Added SVG export (thanks to [@Enter-tainer](https://github.com/Enter-tainer))
- Fixed bugs with PDF font embedding
- Added support for page labels that reflect the [page numbering](/docs/reference/layout/page/#parameters-numbering) style in the PDF
## Text and Layout
- Added [`highlight`](/docs/reference/text/highlight/) function for highlighting text with a background color
- Added [`polygon.regular`](/docs/reference/visualize/polygon/#definitions-regular) function for drawing a regular polygon
- Added support for tabs in [`raw`](/docs/reference/text/raw/) elements alongside [`tab-width`](/docs/reference/text/raw/#parameters-tab-size) parameter
- The layout engine now tries to prevent "runts" (final lines consisting of just a single word)
- Added Finnish translations
- Added hyphenation support for Polish
- Improved handling of consecutive smart quotes of different kinds
- Fixed vertical alignments for [`number-align`](/docs/reference/layout/page/#parameters-number-align) argument on page function **(Breaking change)**
- Fixed weak pagebreaks after counter updates
- Fixed missing text in SVG when the text font is set to "New Computer Modern"
- Fixed translations for Chinese
- Fixed crash for empty text in show rule
- Fixed leading spaces when there's a linebreak after a number and a comma
- Fixed placement of floating elements in columns and other containers
- Fixed sizing of block containing just a single box
## Math
- Added support for [augmented matrices](/docs/reference/math/mat/#parameters-augment)
- Removed support for automatic matching of fences like `|` and `||` as there were too many false positives. You can use functions like [`abs`](/docs/reference/math/lr/#functions-abs) or [`norm`](/docs/reference/math/lr/#functions-norm) or an explicit [`lr`](/docs/reference/math/lr/#functions-lr) call instead. **(Breaking change)**
- Fixed spacing after number with decimal point in math
- Fixed bug with primes in subscript
- Fixed weak spacing
- Fixed crash when text within math contains a newline
## Tooling and Diagnostics
- Added hints when trying to call a function stored in a dictionary without extra parentheses
- Fixed hint when referencing an equation without numbering
- Added more details to some diagnostics (e.g. when SVG decoding fails)
## Command line interface
- Added `typst update` command for self-updating the CLI (thanks to [@jimvdl](https://github.com/jimvdl))
- Added download progress indicator for packages and updates
- Added `--format` argument to explicitly specify the output format
- The CLI now respects proxy configuration through environment variables and has a new `--cert` option for setting a custom CA certificate
- Fixed crash when field wasn't present and `--one` is passed to `typst query`
## Miscellaneous Improvements
- Added [Page Setup Guide](/docs/guides/page-setup/)
- Added [`figure.caption`](/docs/reference/model/figure/#definitions-caption) function that can be used for simpler figure customization (**Breaking change** because `it.caption` now renders the full caption with supplement in figure show rules and manual outlines)
- Moved `caption-pos` argument to `figure.caption` function and renamed it to `position` **(Breaking change)**
- Added [`separator`](/docs/reference/model/figure/#definitions-caption-separator) argument to `figure.caption` function
- Added support for combination of and/or and before/after [selectors](/docs/reference/foundations/selector/)
- Packages can now specify a [minimum compiler version](https://github.com/typst/packages#package-format) they require to work
- Fixed parser bug where method calls could be moved onto their own line for `#let` expressions in markup **(Breaking change)**
- Fixed bugs in sentence and title case conversion for bibliographies
- Fixed supplements for alphanumeric and author-title bibliography styles
- Fixed off-by-one error in APA bibliography style
## Development
- Made `Span` and `FileId` more type-safe so that all error conditions must be handled by `World` implementors
## Contributors
@@ -0,0 +1,135 @@
# 0.9.0
## Bibliography management
- New bibliography engine based on [CSL](https://citationstyles.org/) (Citation Style Language). Ships with about 100 commonly used citation styles and can load custom `.csl` files.
- Added new [`form`](/docs/reference/model/cite/#parameters-form) argument to the `cite` function to produce different forms of citations (e.g. for producing a citation suitable for inclusion in prose)
- The [`cite`](/docs/reference/model/cite/) function now takes only a single label/key instead of allowing multiple. Adjacent citations are merged and formatted according to the citation style's rules automatically. This works both with the reference syntax and explicit calls to the `cite` function. **(Breaking change)**
- The `cite` function now takes a [label](/docs/reference/foundations/label/) instead of a string **(Breaking change)**
- Added [`full`](/docs/reference/model/bibliography/#parameters-full) argument to bibliography function to print the full bibliography even if not all works were cited
- Bibliography entries can now contain Typst equations (wrapped in `$..$` just like in markup), this works both for `.yaml` and `.bib` bibliographies
- The hayagriva YAML format was improved. See its [changelog](https://github.com/typst/hayagriva/blob/main/CHANGELOG.md) for more details. **(Breaking change)**
- A few bugs with `.bib` file parsing were fixed
- Removed `brackets` argument of `cite` function in favor of `form`
## Visualization
- Gradients and colors (thanks to [@Dherse](https://github.com/Dherse))
- Added support for [gradients](/docs/reference/visualize/gradient/) on shapes and text
- Supports linear, radial, and conic gradients
- Added support for defining colors in more color spaces, including [Oklab](/docs/reference/visualize/color/#definitions-oklab), [Linear RGB(A)](/docs/reference/visualize/color/#definitions-linear-rgb), [HSL](/docs/reference/visualize/color/#definitions-hsl), and [HSV](/docs/reference/visualize/color/#definitions-hsv)
- Added [`saturate`](/docs/reference/visualize/color/#definitions-saturate), [`desaturate`](/docs/reference/visualize/color/#definitions-desaturate), and [`rotate`](/docs/reference/visualize/color/#definitions-rotate) functions on colors
- Added [`color.map`](/docs/reference/visualize/color/#predefined-color-maps) module with predefined color maps that can be used with gradients
- Rename `kind` function on colors to [`space`](/docs/reference/visualize/color/#definitions-space)
- Removed `to-rgba`, `to-cmyk`, and `to-luma` functions in favor of a new [`components`](/docs/reference/visualize/color/#definitions-components) function
- Improved rendering of [rectangles](/docs/reference/visualize/rect/) with corner radius and varying stroke widths
- Added support for properly clipping [boxes](/docs/reference/layout/box/#parameters-clip) and [blocks](/docs/reference/layout/block/#parameters-clip) with a border radius
- Added `background` parameter to [`overline`](/docs/reference/text/overline/), [`underline`](/docs/reference/text/underline/), and [`strike`](/docs/reference/text/strike/) functions
- Fixed inaccurate color embedding in PDFs
- Fixed ICC profile handling for images embedded in PDFs
## Text and Layout
- Added support for automatically adding proper [spacing](/docs/reference/text/text/#parameters-cjk-latin-spacing) between CJK and Latin text (enabled by default)
- Added support for automatic adjustment of more CJK punctuation
- Added [`quote`](/docs/reference/model/quote/) element for inserting inline and block quotes with optional attributions
- Added [`raw.line`](/docs/reference/text/raw/#definitions-line) element for customizing the display of individual lines of raw text, e.g. to add line numbers while keeping proper syntax highlighting
- Added support for per-side [inset](/docs/reference/model/table/#parameters-inset) customization to table function
- Added Hungarian and Romanian translations
- Added support for Czech hyphenation
- Added support for setting custom [smart quotes](/docs/reference/text/smartquote/)
- The default [figure separator](/docs/reference/model/figure/#definitions-caption-separator) now reacts to the currently set language and region
- Improved line breaking of links / URLs (especially helpful for bibliographies with many URLs)
- Improved handling of consecutive hyphens in justification algorithm
- Fixed interaction of justification and hanging indent
- Fixed a bug with line breaking of short lines without spaces when justification is enabled
- Fixed font fallback for hyphen generated by hyphenation
- Fixed handling of word joiner and other no-break characters during hyphenation
- Fixed crash when hyphenating after an empty line
- Fixed line breaking of composite emoji like 🏳️‍🌈
- Fixed missing text in some SVGs
- Fixed font fallback in SVGs
- Fixed behavior of [`to`](/docs/reference/layout/pagebreak/#parameters-to) argument on `pagebreak` function
- Fixed `set align(..)` for equations
- Fixed spacing around [placed](/docs/reference/layout/place/) elements
- Fixed coalescing of [`above`](/docs/reference/layout/block/#parameters-above) and [`below`](/docs/reference/layout/block/#parameters-below) spacing if given in em units and the font sizes differ
- Fixed handling of `extent` parameter of [`underline`](/docs/reference/text/underline/), [`overline`](/docs/reference/text/overline/), and [`strike`](/docs/reference/text/strike/) functions
- Fixed crash for [floating placed elements](/docs/reference/layout/place/#parameters-float) with no specified vertical alignment
- Partially fixed a bug with citations in footnotes
## Math
- Added `gap` argument for [`vec`](/docs/reference/math/vec/#parameters-gap), [`mat`](/docs/reference/math/mat/#parameters-gap), and [`cases`](/docs/reference/math/cases/#parameters-gap) function
- Added `size` argument for [`abs`](/docs/reference/math/lr/#functions-abs), [`norm`](/docs/reference/math/lr/#functions-norm), [`floor`](/docs/reference/math/lr/#functions-floor), [`ceil`](/docs/reference/math/lr/#functions-ceil), and [`round`](/docs/reference/math/lr/#functions-round) functions
- Added [`reverse`](/docs/reference/math/cases/#parameters-reverse) parameter to cases function
- Added support for multinomial coefficients to [`binom`](/docs/reference/math/binom/) function
- Removed `rotation` argument on [`cancel`](/docs/reference/math/cancel/) function in favor of a new and more flexible `angle` argument **(Breaking change)**
- Added `wide` constant, which inserts twice the spacing of `quad`
- Added `csch` and `sech` [operators](/docs/reference/math/op/)
- `↼`, `⇀`, `↔`, and `⟷` can now be used as [accents](/docs/reference/math/accent/)
- Added `integral.dash`, `integral.dash.double`, and `integral.slash` [symbols](/docs/reference/symbols/sym/)
- Added support for specifying negative indices for [augmentation](/docs/reference/math/mat/#parameters-augment) lines to position the line from the back
- Fixed default color of matrix [augmentation](/docs/reference/math/mat/#parameters-augment) lines
- Fixed attachment of primes to inline expressions
- Math content now respects the text [baseline](/docs/reference/text/text/#parameters-baseline) setting
## Performance
- Fixed a bug related to show rules in templates which would effectively disable incremental compilation in affected documents
- Micro-optimized code in several hot paths, which brings substantial performance gains, in particular in incremental compilations
- Improved incremental parsing, which affects the whole incremental compilation pipeline
- Added support for incremental parsing in the CLI
- Added support for incremental SVG encoding during PDF export, which greatly improves export performance for documents with many SVG
## Tooling and Diagnostics
- Improved autocompletion for variables that are in-scope
- Added autocompletion for package imports
- Added autocompletion for [labels](/docs/reference/foundations/label/)
- Added tooltip that shows which variables a function captures (when hovering over the equals sign or arrow of the function)
- Diagnostics are now deduplicated
- Improved diagnostics when trying to apply unary `+` or `-` to types that only support binary `+` and `-`
- Error messages now state which label or citation key isn't present in the document or its bibliography
- Fixed a bug where function argument parsing errors were shadowed by function execution errors (e.g. when trying to call [`array.sorted`](/docs/reference/foundations/array/#definitions-sorted) and passing the key function as a positional argument instead of a named one).
## Export
- Added support for configuring the document's creation [`date`](/docs/reference/model/document/#parameters-date). If the `date` is set to `auto` (the default), the PDF's creation date will be set to the current date and time.
- Added support for configuring document [`keywords`](/docs/reference/model/document/#parameters-keywords)
- Generated PDFs now contain PDF document IDs
- The PDF creator tool metadata now includes the Typst version
## Web app
- Added version picker to pin a project to an older compiler version (with support for Typst 0.6.0+)
- Fixed desyncs between editor and compiler and improved overall stability
- The app now continues to highlight the document when typing while the document is being compiled
## Command line interface
- Added support for discovering fonts through fontconfig
- Now clears the screen instead of resetting the terminal
- Now automatically picks correct file extension for selected output format
- Now only regenerates images for changed pages when using `typst watch` with PNG or SVG export
## Miscellaneous Improvements
- Added [`version`](/docs/reference/foundations/version/) type and `sys.version` constant specifying the current compiler version. Can be used to gracefully support multiple versions.
- The U+2212 MINUS SIGN is now used when displaying a numeric value, in the [`repr`](/docs/reference/foundations/repr/) of any numeric value and to replace a normal hyphen in text mode when before a digit. This improves, in particular, how negative integer values are displayed in math mode.
- Added support for specifying a default value instead of failing for `remove` function in [array](/docs/reference/foundations/array/#definitions-remove) and [dictionary](/docs/reference/foundations/dictionary/#definitions-remove)
- Simplified Page Setup Guide examples
- Switched the documentation from using the word "hashtag" to the word "hash" where appropriate
- Added support for [`array.zip`](/docs/reference/foundations/array/#definitions-zip) without any further arguments
- Fixed crash when a plugin tried to read out of bounds memory
- Fixed crashes when handling infinite [lengths](/docs/reference/layout/length/)
- Fixed introspection (mostly bibliography) bugs due to weak page break close to the end of the document
## Development
- Extracted `typst::ide` into separate `typst_ide` crate
- Removed a few remaining `'static` bounds on `&dyn World`
- Removed unnecessary dependency, which reduces the binary size
- Fixed compilation of `typst` by itself (without `typst-library`)
- Fixed warnings with Nix flake when using `lib.getExe`
## Contributors
@@ -0,0 +1,254 @@
# Earlier
## March 28, 2023
- **Breaking changes:**
- Enumerations now require a space after their marker, that is, `1.ok` must now be written as `1. ok`
- Changed default style for [term lists](/docs/reference/model/terms/): Does not include a colon anymore and has a bit more indent
- Command line interface
- Added `--font-path` argument for CLI
- Embedded default fonts in CLI binary
- Fixed build of CLI if `git` is not installed
- Miscellaneous improvements
- Added support for disabling [matrix](/docs/reference/math/mat/) and [vector](/docs/reference/math/vec/) delimiters. Generally with `#set math.mat(delim: none)` or one-off with `$mat(delim: #none, 1, 2; 3, 4)$`.
- Added [`separator`](/docs/reference/model/terms/#parameters-separator) argument to term lists
- Added [`round`](/docs/reference/math/lr/#functions-round) function for equations
- Numberings now allow zeros. To reset a counter, you can write `#counter(..).update(0)`
- Added documentation for `page()` and `position()` methods on [`location`](/docs/reference/introspection/location/) type
- Added symbols for double, triple, and quadruple dot accent
- Added smart quotes for Norwegian Bokmål
- Added Nix flake
- Fixed bibliography ordering in IEEE style
- Fixed parsing of decimals in math: `$1.2/3.4$`
- Fixed parsing of unbalanced delimiters in fractions: `$1/(2 (x)$`
- Fixed unexpected parsing of numbers as enumerations, e.g. in `1.2`
- Fixed combination of page fill and header
- Fixed compiler crash if [`repeat`](/docs/reference/layout/repeat/) is used in page with automatic width
- Fixed [matrices](/docs/reference/math/mat/) with explicit delimiter
- Fixed [`indent`](/docs/reference/model/terms/#parameters-indent) property of term lists
- Numerous documentation fixes
- Links in bibliographies are now affected by link styling
- Fixed hovering over comments in web app
## March 21, 2023
- Reference and bibliography management
- [Bibliographies](/docs/reference/model/bibliography/) and [citations](/docs/reference/model/cite/) (currently supported styles are APA, Chicago Author Date, IEEE, and MLA)
- You can now [reference](/docs/reference/model/ref/) sections, figures, formulas, and works from the bibliography with `@label`
- You can make an element referenceable with a label:
- `= Introduction <intro>`
- `$ A = pi r^2 $ <area>`
- Introspection system for interactions between different parts of the document
- [`counter`](/docs/reference/introspection/counter/) function
- Access and modify counters for pages, headings, figures, and equations
- Define and use your own custom counters
- Time travel: Find out what the counter value was or will be at some other point in the document (e.g. when you're building a list of figures, you can determine the value of the figure counter at any given figure).
- Counters count in layout order and not in code order
- [`state`](/docs/reference/introspection/state/) function
- Manage arbitrary state across your document
- Time travel: Find out the value of your state at any position in the document
- State is modified in layout order and not in code order
- [`query`](/docs/reference/introspection/query/) function
- Find all occurrences of an element or a label, either in the whole document or before/after some location
- Link to elements, find out their position on the pages and access their fields
- Example use cases: Custom list of figures or page header with current chapter title
- [`locate`](/docs/reference/introspection/locate/) function
- Determines the location of itself in the final layout
- Can be accessed to get the `page` and `x`, `y` coordinates
- Can be used with counters and state to find out their values at that location
- Can be used with queries to find elements before or after its location
- New [`measure`](/docs/reference/layout/measure/) function
- Measure the layouted size of elements
- To be used in combination with the new `style` function that lets you generate different content based on the style context something is inserted into (because that affects the measured size of content)
- Exposed content representation
- Content is not opaque anymore
- Content can be compared for equality
- The tree of content elements can be traversed with code
- Can be observed in hover tooltips or with [`repr`](/docs/reference/foundations/repr/)
- New [methods](/docs/reference/foundations/content/) on content: `func`, `has`, `at`, and `location`
- All optional fields on elements are now settable
- More uniform field names (`heading.title` becomes `heading.body`, `list.items` becomes `list.children`, and a few more changes)
- Further improvements
- Added [`figure`](/docs/reference/model/figure/) function
- Added [`numbering`](/docs/reference/math/equation/#parameters-numbering) parameter on equation function
- Added [`numbering`](/docs/reference/layout/page/#parameters-numbering) and [`number-align`](/docs/reference/layout/page/#parameters-number-align) parameters on page function
- The page function's [`header`](/docs/reference/layout/page/#parameters-header) and [`footer`](/docs/reference/layout/page/#parameters-footer) parameters do not take functions anymore. If you want to customize them based on the page number, use the new [`numbering`](/docs/reference/layout/page/#parameters-numbering) parameter or [`counter`](/docs/reference/introspection/counter/) function instead.
- Added [`footer-descent`](/docs/reference/layout/page/#parameters-footer-descent) and [`header-ascent`](/docs/reference/layout/page/#parameters-header-ascent) parameters
- Better default alignment in header and footer
- Fixed Arabic vowel placement
- Fixed PDF font embedding issues
- Renamed `math.formula` to [`math.equation`](/docs/reference/math/equation/)
- Font family must be a named argument now: `#set text(font: "..")`
- Added support for [hanging indent](/docs/reference/model/par/#parameters-hanging-indent)
- Renamed paragraph `indent` to [`first-line-indent`](/docs/reference/model/par/#parameters-first-line-indent)
- More accurate [logarithm](/docs/reference/foundations/calc/#functions-log) when base is `2` or `10`
- Improved some error messages
- Fixed layout of [`terms`](/docs/reference/model/terms/) list
- Web app improvements
- Added template gallery
- Added buttons to insert headings, equations, raw blocks, and references
- Jump to the source of something by clicking on it in the preview panel (works for text, equations, images, and more)
- You can now upload your own fonts and use them in your project
- Hover debugging and autocompletion now takes multiple files into account and works in show rules
- Hover tooltips now automatically collapse multiple consecutive equal values
- The preview now automatically scrolls to the right place when you type
- Links are now clickable in the preview area
- Toolbar, preview, and editor can now all be hidden
- Added autocompletion for raw block language tags
- Added autocompletion in SVG files
- New back button instead of four-dots button
- Lots of bug fixes
## February 25, 2023
- Font changes
- New default font: Linux Libertine
- New default font for raw blocks: DejaVu Sans Mono
- New default font for math: Book weight of New Computer Modern Math
- Lots of new math fonts available
- Removed Latin Modern fonts in favor of New Computer Modern family
- Removed unnecessary smallcaps fonts which are already accessible through the corresponding main font and the [`smallcaps`](/docs/reference/text/smallcaps/) function
- Improved default spacing for headings
- Added [`panic`](/docs/reference/foundations/panic/) function
- Added [`clusters`](/docs/reference/foundations/str/#definitions-clusters) and [`codepoints`](/docs/reference/foundations/str/#definitions-codepoints) methods for strings
- Support for multiple authors in [`set document`](/docs/reference/model/document/#parameters-author)
- Fixed crash when string is accessed at a position that is not a char boundary
- Fixed semicolon parsing in `#var ;`
- Fixed incremental parsing when inserting backslash at end of `#"abc"`
- Fixed names of a few font families (including Noto Sans Symbols and New Computer Modern families)
- Fixed autocompletion for font families
- Improved incremental compilation for user-defined functions
## February 15, 2023
- [Box](/docs/reference/layout/box/) and [block](/docs/reference/layout/block/) have gained `fill`, `stroke`, `radius`, and `inset` properties
- Blocks may now be explicitly sized, fixed-height blocks can still break across pages
- Blocks can now be configured to be [`breakable`](/docs/reference/layout/block/#parameters-breakable) or not
- [Numbering style](/docs/reference/model/enum/#parameters-numbering) can now be configured for nested enums
- [Markers](/docs/reference/model/list/#parameters-marker) can now be configured for nested lists
- The [`eval`](/docs/reference/foundations/eval/) function now expects code instead of markup and returns an arbitrary value. Markup can still be evaluated by surrounding the string with brackets.
- PDFs generated by Typst now contain XMP metadata
- Link boxes are now disabled in PDF output
- Tables don't produce small empty cells before a pagebreak anymore
- Fixed raw block highlighting bug
## February 12, 2023
- Shapes, images, and transformations (move/rotate/scale/repeat) are now block-level. To integrate them into a paragraph, use a [`box`](/docs/reference/layout/box/) as with other elements.
- A colon is now required in an "everything" show rule: Write `show: it => ..` instead of `show it => ..`. This prevents intermediate states that ruin your whole document.
- Non-math content like a shape or table in a math formula is now centered vertically
- Support for widow and orphan prevention within containers
- Support for [RTL](/docs/reference/text/text/#parameters-dir) in lists, grids, and tables
- Support for explicit `auto` sizing for boxes and shapes
- Support for fractional (i.e. `1fr`) widths for boxes
- Fixed bug where columns jump to next page
- Fixed bug where list items have no leading
- Fixed relative sizing in lists, squares and grid auto columns
- Fixed relative displacement in [`place`](/docs/reference/layout/place/) function
- Fixed that lines don't have a size
- Fixed bug where `set document(..)` complains about being after content
- Fixed parsing of `not in` operation
- Fixed hover tooltips in math
- Fixed bug where a heading show rule may not contain a pagebreak when an outline is present
- Added [`baseline`](/docs/reference/layout/box/#parameters-baseline) property on [`box`](/docs/reference/layout/box/)
- Added [`tg`](/docs/reference/math/op/) and [`ctg`](/docs/reference/math/op/) operators in math
- Added delimiter setting for [`cases`](/docs/reference/math/cases/) function
- Parentheses are now included when accepting a function autocompletion
## February 2, 2023
- Merged text and math symbols, renamed a few symbols (including `infty` to `infinity` with the alias `oo`)
- Fixed missing italic mappings
- Math italics correction is now applied properly
- Parentheses now scale in `$zeta(x/2)$`
- Fixed placement of large root index
- Fixed spacing in `$abs(-x)$`
- Fixed inconsistency between text and identifiers in math
- Accents are now ignored when positioning superscripts
- Fixed vertical alignment in matrices
- Fixed `text` set rule in `raw` show rule
- Heading and list markers now parse consistently
- Allow arbitrary math directly in content
## January 30, 2023
[Go to the announcement blog post.](https://typst.app/blog/2023/january-update)
- New expression syntax in markup/math
- Blocks cannot be directly embedded in markup anymore
- Like other expressions, they now require a leading hash
- More expressions available with hash, including literals (`#"string"`) as well as field access and method call without space: `#emoji.face`
- New import syntax
- `#import "module.typ"` creates binding named `module`
- `#import "module.typ": a, b` or `#import "module.typ": *` to import items
- `#import emoji: face, turtle` to import from already bound module
- New symbol handling
- Removed symbol notation
- Symbols are now in modules: `sym`, `emoji`, and `math`
- Math module also reexports all of `sym`
- Modified through field access, still order-independent
- Unknown modifiers are not allowed anymore
- Support for custom symbol definitions with `symbol` function
- Symbols now listed in documentation
- New `math` module
- Contains all math-related functions
- Variables and function calls directly in math (without hash) access this module instead of the global scope, but can also access local variables
- Can be explicitly used in code, e.g. `#set math.vec(delim: "[")`
- Delimiter matching in math
- Any opening delimiters matches any closing one
- When matched, they automatically scale
- To prevent scaling, escape them
- To forcibly match two delimiters, use `lr` function
- Line breaks may occur between matched delimiters
- Delimiters may also be unbalanced
- You can also use the `lr` function to scale the brackets (or just one bracket) to a specific size manually
- Multi-line math with alignment
- The `\` character inserts a line break
- The `&` character defines an alignment point
- Alignment points also work for underbraces, vectors, cases, and matrices
- Multiple alignment points are supported
- More capable math function calls
- Function calls directly in math can now take code expressions with hash
- They can now also take named arguments
- Within math function calls, semicolons turn preceding arguments to arrays to support matrices: `$mat(1, 2; 3, 4)$`
- Arbitrary content in math
- Text, images, and other arbitrary content can now be embedded in math
- Math now also supports font fallback to support e.g. CJK and emoji
- More math features
- New text operators: `op` function, `lim`, `max`, etc.
- New matrix function: `mat`
- New n-ary roots with `root` function: `$root(3, x)$`
- New under- and overbraces, -brackets, and -lines
- New `abs` and `norm` functions
- New shorthands: `[|`, `|]`, and `||`
- New `attach` function, overridable attachments with `script` and `limit`
- Manual spacing in math, with `h`, `thin`, `med`, `thick` and `quad`
- Symbols and other content may now be used like a function, e.g. `$zeta(x)$`
- Added Fira Math font, removed Noto Sans Math font
- Support for alternative math fonts through `#show math.formula: set text("Fira Math")`
- More library improvements
- New `calc` module, `abs`, `min`, `max`, `even`, `odd` and `mod` moved there
- New `message` argument on `assert` function
- The `pairs` method on dictionaries now returns an array of length-2 arrays instead of taking a closure
- The method call `dict.at("key")` now always fails if `"key"` doesn't exist Previously, it was allowed in assignments. Alternatives are `dict.key = x` and `dict.insert("key", x)`.
- Smarter editor functionality
- Autocompletion for local variables
- Autocompletion for methods available on a value
- Autocompletion for symbols and modules
- Autocompletion for imports
- Hover over an identifier to see its value(s)
- Further editor improvements
- New Font menu with previews
- Single projects may now be shared with share links
- New dashboard experience if projects are shared with you
- Keyboard Shortcuts are now listed in the menus and there are more of them
- New Offline indicator
- Tooltips for all buttons
- Improved account protection
- Moved Status indicator into the error list button
- Further fixes
- Multiple bug fixes for incremental parser
- Fixed closure parameter capturing
- Fixed tons of math bugs
- Bugfixes for performance, file management, editing reliability
- Added redirection to the page originally navigated to after signin
@@ -0,0 +1,25 @@
# Changelog
Learn what has changed in the latest Typst releases and move your documents forward. This section documents all changes to Typst since its initial public release.
## Versions
- [Typst 0.14.2](/docs/changelog/0.14.2/)
- [Typst 0.14.1](/docs/changelog/0.14.1/)
- [Typst 0.14.0](/docs/changelog/0.14.0/)
- [Typst 0.13.1](/docs/changelog/0.13.1/)
- [Typst 0.13.0](/docs/changelog/0.13.0/)
- [Typst 0.12.0](/docs/changelog/0.12.0/)
- [Typst 0.11.1](/docs/changelog/0.11.1/)
- [Typst 0.11.0](/docs/changelog/0.11.0/)
- [Typst 0.10.0](/docs/changelog/0.10.0/)
- [Typst 0.9.0](/docs/changelog/0.9.0/)
- [Typst 0.8.0](/docs/changelog/0.8.0/)
- [Typst 0.7.0](/docs/changelog/0.7.0/)
- [Typst 0.6.0](/docs/changelog/0.6.0/)
- [Typst 0.5.0](/docs/changelog/0.5.0/)
- [Typst 0.4.0](/docs/changelog/0.4.0/)
- [Typst 0.3.0](/docs/changelog/0.3.0/)
- [Typst 0.2.0](/docs/changelog/0.2.0/)
- [Typst 0.1.0](/docs/changelog/0.1.0/)
- [Earlier](/docs/changelog/earlier/)