Typst

Latest version: v0.11.0

Safety actively analyzes 625610 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.11.0

[View changelog with more links on typst.app](https://typst.app/docs/changelog)

- Tables (thanks to [PgBiel](https://github.com/PgBiel))
- Tables are now _much_ more flexible, read the new [table guide](https://typst.app/docs/guides/table-guide/) to get started
- Added `table.cell` element for per-cell configuration
- Cells can now span multiple columns or rows
- The stroke of individual cells can now be customized
- The `align` and `inset` arguments of the table function now also take `(x, y) => ..` functions
- Added `table.hline` and `table.vline` for convenient line customization
- Added `table.header` element for table headers that repeat on every page
- Added `table.footer` element for table footers that repeat on every page
- All the new table functionality is also available for grids
- Fixed gutter-related bugs

- 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/CATEGORIES.md) and [disciplines](https://github.com/typst/packages/blob/main/DISCIPLINES.md).

- Context
- Added _context expressions:_ Read the chapter on 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`, `locate`, `measure`, `counter.display`, `counter.at`, `counter.final`, `state.at`, and `state.final`
- Added contextual methods `counter.get` and `state.get` to retrieve the value of a counter or state in the current context
- Added contextual function `here` to retrieve the location of the current context
- The `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` and `state.at` methods are now more flexible: They directly accept any kind of locatable selector with a unique match (e.g. a label) instead of just locations
- When context is available, `counter.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` instead (Deprecation planned)
- The `location` argument of `query`, `counter.final`, and `state.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: 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 selectors
- _And_ and _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`
- Fixed a bug where document set rules were allowed after content

- Layout
- Added `reflow` argument to `rotate` and `scale` which lets them affect the layout
- Fixed a bug where floating placement or floating figures could end up out of order
- Fixed overlap of text and figure for full-page floating figures
- Fixed various cases where the `hide` function didn't hide its contents properly
- Fixed usage of `h` and `v` in stacks
- 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` property for text
- Added basic i18n for Serbian and Catalan
- Added support for contemporary Japanese numbering method
- Added patches for various wrong metadata in specific fonts
- The text direction can now be overridden within a paragraph
- Fixed Danish smart quotes
- 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 could not be overridden in consecutive set rules

- Model
- Added `depth` and `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) now cycle by default
- The `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

- Math
- Inline equations now automatically linebreak at appropriate places
- Added `number-align` argument to equations
- Added support for adjusting the `size` of accents relative to their base
- Improved positioning of accents
- Primes are now always attached as scripts by default
- Exposed `math.primes` element which backs the `$f'$` syntax in math
- Math mode is not affected by `strong` and `emph` anymore
- Fixed `attach` under fractions
- Fixed that `math.class` did not affect smart limit placement
- Fixed weak spacing in `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` to lengths
- Added `calc.root`
- Added `int.signum` and `float.signum` methods
- Added `float.is-nan` and `float.is-infinite` methods
- Added `int.bit-not`, `int.bit-and`, `int.bit-or`, `int.bit-xor`, `int.bit-lshift`, and `int.bit-rshift` methods
- Added `array.chunks` method
- A module can now be converted to a dictionary with the dictionary constructor to access its contents dynamically
- Added `row-type` argument to `csv` function to configure how rows will be represented
- XML parsing now allows DTDs (document type definitions)
- Improved formatting of negative numbers with `str` and `repr`
- For loops can now iterate over bytes
- Fixed a bug with pattern matching in for loops
- Fixed a bug with labels not being part of `.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
- 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` 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` 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` function doesn't upscale images beyond their natural size anymore
- The `image` function now respects rotation stored in EXIF metadata
- Added support for SVG filters
- Added alpha component to `luma` colors
- Added `color.transparentize` and `color.opacify` methods
- Improved `color.negate` function
- Added `stroke` and `radius` arguments to `highlight` function
- Changed default `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` 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 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`.

Thanks to everyone who contributed to this release: Leedehai, PgBiel, frozolotl, Dherse, MDLC01, Andrew15-5, Enter-tainer, Myriad-Dreamin, peng1999, EpicEricEE, jcbhmr, Heinenen, tingerrr, Jollywatt, LaurenzV, YDX-2147483647, k-84mo10, s-cerevisiae, 01mf02, A-Walrus, C0ffeeCode, CosmicHorrorDev, DavidMazarro, Hofer-Julian, Jocs, Midbin, Quaqqer, artemist, astrale-sharp, cmoog, drupol, dyc3, eltociear, emilyyyylime, emmett-rayes, espinielli, evfinkn, f3rn0s, freundTech, geekvest, h-arry-smith, istudyatuni, jaroeichler, jbirnick, kg583, mattfbacon, max397574, mkpoli, mkroening, muzimuzhi, natsukagami, nvarner, onerandomusername, pineapplehunter, silvergasp, t-rapp, tertsdiepraam, uetcis, violetfauna, voidiz, xTeamStanly, xalbd, xkevio, zica87.

0.11.0rc1

For a preliminary 0.11 changelog, see https://staging.typst.app/docs/changelog

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 as fills and strokes
- The `alpha` parameter of the `components` function on colors is now a named parameter (**Breaking change**)
- Added support for the Oklch color space
- Improved conversions between colors in different color spaces
- Removed restrictions on Oklab chroma component
- Fixed clipping on blocks and boxes without a stroke
- Fixed bug with gradients 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 for Chinese, French, and Russian
- Changed default figure supplement for Russian to short form
- Fixed CJK-Latin-spacing before line breaks and in `locate` calls
- Fixed line breaking at the end of links

- Math
- Added `mid` function for scaling a delimiter up to the height of the surrounding `lr` group
- The `op` function can now take any content, not just strings
- Improved documentation for 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` type now has a constructor that converts a value to a stroke or creates one from its parts
- Added constructor for `arguments` type
- Added `calc.div-euclid` and `calc.rem-euclid` functions
- Fixed equality of `arguments`
- Fixed `repr` of `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` is set manually
- Fixed color export in SVG
- Fixed PDF metadata encoding of multiple authors

- 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 can now be arbitrary content instead of just a string
- The `number-align` parameter on numbered lists now also accepts vertical alignments
- Fixed selectors on 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` 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`

Thanks to everyone who contributed to this release: Dherse, frozolotl, Leedehai, Andrew15-5, MDLC01, danieleades, tingerrr, Jollywatt, cmoog, peng1999, Enter-tainer, JakobSachs, KronosTheLate, MyrtleTurtle22, T0mstone, TheJosefOlsson, antonWetzel, denkspuren, kokkonisd, lihe07, mattfbacon, rezzubs, samueltardieu, xalbd.

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` argument to the `cite` function to produce different forms of citations (e.g. for producing a citation suitable for inclusion in prose)
- The `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 instead of a string (**Breaking change**)
- Added `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 `.yml` 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 on shapes and text
- Supports linear, radial, and conic gradients
- Added support for defining colors in more color spaces, including Oklab, Linear RGB(A), HSL, and HSV
- Added `saturate`, `desaturate`, and `rotate` functions on colors
- Added `color.map` module with predefined color maps that can be used with gradients
- Rename `kind` function on colors to `space`
- Removed `to-rgba`, `to-cmyk`, and `to-luma` functions in favor of a new `components` function
- Improved rendering of rectangles with corner radius and varying stroke widths
- Added support for properly clipping boxes and blocks with a border radius
- Added `background` parameter to `overline`, `underline`, and `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 pacing between CJK and Latin text (enabled by default)
- Added support for automatic adjustment of more CJK punctuation
- Added `quote` element for inserting inline and block quotes with optional attributions
- Added `raw.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 customization to table function
- Added Hungarian and Romanian translations
- Added support for Czech hyphenation
- Added support for setting custom smart quotes
- The default figure 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 behaviour of `to` argument on `pagebreak` function
- Fixed `set align(..)` for equations
- Fixed spacing around placed elements
- Fixed coalescing of `above` and `below` spacing if given in em units and the font sizes differ
- Fixed handling of `extent` parameter of `underline`, `overline`, and `strike` functions
- Fixed crash for floating placed elements with no specified vertical alignment
- Partially fixed a bug with citations in footnotes

- Math
- Added `gap` argument for `vec`, `mat`, and `cases` function
- Added `size` argument for `abs`, `norm`, `floor`, `ceil`, and `round` functions
- Added `reverse` parameter to cases function
- Added support for multinomial coefficients to `binom` function
- Removed `rotation` argument on `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
- `↼`, `⇀`, `↔`, and `⟷` can now be used as accents
- Added `integral.dash`, `integral.dash.double`, and `integral.slash` symbols
- Added support for specifying negative indices for augmentation lines to position the line from the back
- Fixed default color of matrix augmentation lines
- Fixed attachment of primes to inline expressions
- Math content now respects the text 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
- 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` and passing the key function as a positional argument instead of a named one).

- Export
- Added support for configuring the document's creation `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`
- 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` 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` 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 and dictionary
- Simplified page setup guide examples
- Switched the documentation from using the word "hashtag" to the word "hash" where appropriate
- Added support for `array.zip` without any further arguments
- Fixed crash when a plugin tried to read out of bounds memory
- Fixed crashes when handling infinite lengths
- 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`

Thanks to everyone who contributed to this release: Dherse, EpicEricEE, tingerrr, LuxxxLucy, bluebear94, MDLC01, Jollywatt, SekoiaTree, DVDTSB, HydroH, KillTheMule, LaurenzV, frozolotl, peng1999, 0scvr, 7sDream, 8LWXpg, Enter-tainer, FlyinPancake, Myriad-Dreamin, T0mstone, TheJosefOlsson, WannesMalfait, WeetHet, Weissnix4711, Zheoni, antonWetzel, arnaudgolfouse, drupol, dxniel-19, extua, fritzrehde, johannes-wolf, qrnch-jan, toddlerer.

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 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
- Plugins work just the same in the web app
- Types are now first-class values (**Breaking change**)
- A type is now itself a value
- Some types can be called like functions (those that have a constructor), e.g. `int` and `str`
- Type checks are now of the form `type(10) == int` instead of the old `type(10) == "integer"`. 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` renaming with `as`
- Added a `duration` type
- Added support for CBOR encoding and decoding
- Added encoding and decoding functions from and to bytes for data formats: `json.decode`, `json.encode`, and similar functions for other formats
- Added `array.intersperse` function
- Added `str.rev` function
- Added `calc.tau` constant
- Made bytes joinable and addable
- Made `array.zip` function variadic
- Fixed bug with `eval` when the `mode` was set to `"math"`
- Fixed bug with `ends-with` function on strings
- Fixed bug with destructuring in combination with break, continue, and return
- Fixed argument types of hyperbolic functions, 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 style in the PDF

- Text and Layout
- Added `highlight` function for highlighting text with a background color
- Added `polygon.regular` function for drawing a regular polygon
- Added support for tabs in `raw` elements alongside `tab-width` 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` 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
- Removed support for automatic matching of fences like `|` and `||` as there were too many false positives. You can use functions like `abs` or `norm` or an explicit `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](https://typst.app/docs/guides/page-setup-guide)
- Added `figure.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` argument to `figure.caption` function
- Added support for combination of and/or and before/after selectors
- 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

Thanks to everyone who contributed to this release: Beiri22, bluebear94, jimvdl, LuxxxLucy, mattfbacon, sitandr, xkevio, Dherse, Enter-tainer, SimonRask, 4BlueTurtles, Andrew15-5, KillTheMule, LaurenzV, MDLC01, NeillJohnston, PgBiel, Sett17, SillyFreak, abramchikd, antonWetzel, arj0019, astrale-sharp, damaxwell, frozolotl, kingfree, kiviktnm, klMse, lolstork, owiecc, pavelzw, raphCode, sudormrfbin, t-rapp, zicklag, zyoshoka.

0.7.0

- Text and Layout
- Added support for floating figures through the `placement` argument on the figure function
- Added support for arbitrary floating content through the `float` argument on the place function
- Added support for loading `.sublime-syntax` files as highlighting syntaxes for raw blocks
- Added support for loading `.tmTheme` files as highlighting themes for raw blocks
- Added _bounds_ option to `top-edge` and `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` argument to text function
- Added `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 in containers (**Breaking change**)
- 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
- Changed relations to show attachments as limits by default (e.g. in `$a ->^x b$`)
- Large operators and delimiters are now always vertically centered
- Boxes in equations now sit on the baseline instead of being vertically centered by default. Notably, this does not affect blocks because they are not inline elements.
- Added support for weak spacing
- Added support for OpenType character variants
- Added support for customizing the 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
- 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
- Added `ratio` and `length` field to relative lengths
- Added `x` and `y` field to 2d alignments
- Added `paint`, `thickness`, `cap`, `join`, `dash`, and `miter-limit` field to strokes
- Accessor and utility methods
- Added `dedup` method to arrays
- Added `pt`, `mm`, `cm`, and `inches` method to lengths
- Added `deg` and `rad` method to angles
- Added `kind`, `hex`, `rgba`, `cmyk`, and `luma` method to colors
- Added `axis`, `start`, `end`, and `inv` method to directions
- Added `axis` and `inv` method to alignments
- Added `inv` method to 2d alignments
- Added `start` argument to `enumerate` method on arrays
- Added `color.mix` function
- Added `mode` and `scope` arguments to `eval` function
- Added `bytes` type for holding large byte buffers
- Added `encoding` argument to read function to read a file as bytes instead of a string
- Added `image.decode` function for decoding an image directly from a string or bytes
- Added `bytes` function for converting a string or an array of integers to bytes
- Added `array` function for converting bytes to an array of integers
- Added support for converting bytes to a string with the `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 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` argument to heading to control whether a heading becomes part of the PDF outline
- Added `caption-pos` argument to control the position of a figure's caption
- Added `metadata` function for exposing an arbitrary value to the introspection system
- Fixed that a `state` was identified by the pair `(key, init)` instead of just its `key`
- Improved indent logic of enumerations. 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` blocks
- Fixed a parsing bug with dictionaries

- Development
- Extracted parser and syntax tree into `typst-syntax` crate
- The `World::today` implementation of Typst dependants may need fixing if they have the same [bug](https://github.com/typst/typst/issues/1842) that the CLI world had

Thanks to everyone who contributed to this release: damaxwell, bluebear94, PgBiel, Beiri22, Dherse, LaurenzV, Mafii, adriandelgado, lolstork, AlistairKeiller, DVDTSB, Enter-tainer, EpicEricEE, Liamolucko, LingMan, MDLC01, Myriad-Dreamin, StrangeGirlMurph, T0mstone, TheLukeGuy, antonWetzel, epbuennig, jeffa5, kg583, lynn, mattfbacon, mavaddat, neunenak, pineapplehunter, raphCode, sitandr, sudormrfbin, tretre91.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.