
Typst Author
- 124 installs
- 189 repo stars
- Updated July 8, 2026
- apcamargo/typst-skills
Typst Author is a skill that packages the Typst language reference and guides to help write and typeset documents in the Typst markup system.
About
Typst Author bundles the complete Typst documentation set (language reference, guides, and changelogs) to help a developer write and typeset documents in Typst. It covers foundations, layout, data loading, introspection, and accessibility, plus a LaTeX-users guide and table and page-setup guides. A developer uses it when authoring or troubleshooting Typst markup for scientific and general documents.
- Bundles the full Typst language reference, guides, and changelogs for authoring documents
- Covers layout, data loading, foundations, introspection, and accessibility
- Companion to touying-author in the same typst-skills repo
Typst Author by the numbers
- 124 all-time installs (skills.sh)
- Ranked #614 of 1,879 Documentation skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
typst-author capabilities & compatibility
- Capabilities
- typst author · document authoring
- Use cases
- documentation
What typst-author says it does
Typst is a new markup-based typesetting system for the sciences. It is designed to be an alternative both to advanced tools like LaTeX and simpler tools like Word and Google Docs.
Here, you'll find helpful material for specific user groups or use cases.
npx skills add https://github.com/apcamargo/typst-skills --skill typst-authorAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 124 |
|---|---|
| repo stars | ★ 189 |
| Last updated | July 8, 2026 |
| Repository | apcamargo/typst-skills ↗ |
What it does
Author and typeset documents in Typst using the bundled language reference, guides, and changelogs.
Who is it for?
Writing and typesetting documents with the Typst markup language
When should I use this skill?
when authoring, styling, or troubleshooting a document in Typst markup
What you get
Correct Typst markup grounded in the official language reference and guides
- Typst documents
- typeset PDF output
By the numbers
- 4 bundled guides (LaTeX users, page setup, tables, accessibility)
Files
0.1.0
Breaking changes
- When using the CLI, you now have to use subcommands:
typst compile file.typortypst c file.typto create a PDFtypst watch file.typortypst w file.typto compile and watchtypst fontsto list all fonts- Manual counters now start at zero. Read the "How to step" section here for more details
- The bibliography styles
"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` 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
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
--openflag to directly open the PDF
Miscellaneous improvements
- Added `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 with base 2, 8, and 16
- Added symbols for double bracket and laplace operator
- The `link` function now accepts labels
- 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` 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` 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.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
.bibfiles can now be arbitrary strings - Multi-line values in
.bibfiles are now parsed correctly - Entry keys in
.bibfiles now allow more characters - Fixed error message for empty dates in
.bibfiles - Added support for years of lengths other than 4 without leading zeros in
.bibfiles - More LaTeX commands (e.g. for quotes) are now respected in
.bibfiles
Visualization
- Added support for patterns as fills and strokes
- The
alphaparameter 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 watchwould confuse files and fail to pick up updates - Fetching of the release metadata in
typst updatenow respects proxies - Fixed bug with
--openflag on Windows when the path contains a space - The
TYPST_FONT_PATHSenvironment 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
#returnexpression 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
typstandtypst-libraryand extractedtypst-pdf,typst-svg, andtypst-renderinto separate crates - The Nix flake now includes the git revision when running
typst --version
Contributors
0.11.0
Tables
- Tables are now _much_ more flexible, read the new 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
_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. - 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. 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 and disciplines.
Context
- Added _context expressions:_ Read the chapter on context to get started
- With context, you can access settable properties, e.g.
context text.langto access the language set viaset 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.displayfunction should not be used anymore, use `state.get` instead (Deprecation planned) - The
locationargument of `query`, `counter.final`, and `state.final` should not be used anymore (Deprecation planned) - The
stylesargument of themeasurefunction should not be used anymore (Deprecation planned) - The
stylefunction 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
reflowargument 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
depthrather thanlevel(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
gradientas an alias fornabla - Added
partialas an alias fordiff,diffwill be deprecated in the future - Added
colon.double,gt.approx,gt.napprox,lt.approx, andlt.napprox - Added
arrow.r.tildeandarrow.l.tilde - Added
tilde.dot - Added
forcesandforces.not - Added
space.nobreak.narrow - Added
lrm(Left-to-Right Mark) andrlm(Right-to-Left Mark) - Fixed
star.strokedsymbol (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
csvfunction 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
reproutput 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
highlightfunction - 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
widthandheight
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
--colorflag 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-opensslto 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
--timingsflag which supersedes the old flamegraph profiling in the CLI - Added minimal CLI to
typst-docscrate for extracting the language and standard library documentation as JSON - The
typst_pdf::exportfunction'sidentargument switched fromOptiontoSmart. It should only be set toSmart::Customif you can provide a stable identifier (like the web app can). The CLI setsSmart::Auto.
Contributors
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` and `outline`
- Fixed compression of CJK punctuation marks at line start and end
- Fixed handling of rectangles with negative dimensions
- Fixed layout of `path` in explicitly sized container
- Fixed broken `raw` text in right-to-left paragraphs
- Fixed tab rendering in
rawtext with languagetyportypc - Fixed highlighting of multi-line
rawtext enclosed by single backticks - Fixed indentation of overflowing lines in
rawblocks - Fixed extra space when
rawtext ends with a backtick
Math
- Fixed broken equations in right-to-left paragraphs
- Fixed missing blackboard bold letters
- Fixed error on empty arguments in 2D math argument list
- Fixed stretching via `mid` for various characters
- Fixed that alignment points in equations were affected by
set align(..)
Export
- Fixed smart quotes in PDF outline
- Fixed patterns with spacing in PDF
- Fixed wrong PDF page labels when page 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)` 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
ifbranch and theelsekeyword - 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 initwere not properly escaped - Fixed various documentation errors
Contributors
0.12.0
Highlights
- Added support for multi-column floating placement and figures
- Added support for automatic line numbering (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)
- 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` and `figure.scope`. Two-column documents should now prefer
set page(columns: 2)overshow: column.with(2)(see the Page Setup Guide). - Added support for automatic line numbering (often used in academic papers)
- Added `par.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 justspacing(Breaking change) - Added `block.sticky` property which prevents a page break after a block
- Added `place.flush` function which forces all floating figures to be placed before any further content
- Added `skew` function
- Added
autooption for `page.header` and `page.footer` which results in an automatic header/footer based on the numbering (which was previously inaccessible after a change) - Added
gapandjustifyparameters to `repeat` function - Added
widthandheightparameters to the `measure` function to define the space in which the content should be measured. Especially useful in combination with `layout`. - The height of a
block,image,rect,square,ellipse, orcirclecan now be specified in fractional units - The `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.aboveandblock.belowcan 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 expression wraps whole pages
- Fixed
set block(spacing: x)behaving differently fromset block(above: x, below: x) - Fixed behavior of `rotate` and `scale` with
reflow: true - Fixed interaction of
align(horizon)andv(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 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`
- Fixed compilation output of a single weak page break
- Fixed crash when padding 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` parameter for tweaking various parameters that affect the choices of the layout engine during text layout
- Added
typmhighlighting mode for math in raw blocks - Added basic i18n for Galician, Catalan, Latin, Icelandic, Hebrew
- Implemented hyphenation duplication for Czech, Croatian, Lower Sorbian, Polish, Portuguese, Slovak, and Spanish.
- The `smallcaps` function is now an element function and can thereby be used in show(-set) rules.
- The `raw.theme` parameter can now be set to
noneto disable highlighting even in the presence of a language tag, and toautoto reset to the default - Multiple stylistic sets 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` not working correctly
- Fixed accidental repetition of Thai characters around line breaks in some circumstances
- Fixed smart quotes 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` 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
floorandceilfunctions in math are now callable symbols, such that$ floor(x) = lr(floor.l x floor.r) $ - The `mat.delim`, `vec.delim`, and `cases.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 bydelim: bar.double(Minor breaking change) - Added `vec.align` and `mat.align` parameters
- Added `underparen`, `overparen`, `undershell`, and `overshell`
- Added
~shorthand fortilde.opin 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` in math
- Fixed a crash with recursive show rules in math
- Fixed `lr.size` not affecting characters enclosed in `mid` in some cases
- Fixed resolving of em units in sub- and superscripts
- Fixed bounding box of inline equations when a text 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()` when `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
spacingproperty of lists, enumerations, and term lists is now also respected for tight lists - Tight lists now only attach (with tighter spacing) to preceding paragraphs, not arbitrary blocks
- The `quote` element is now locatable (can be used in queries)
- The bibliography heading now uses
depthinstead oflevelso that its level can still be configured via a show-set rule - Added support for more numbering formats: Devanagari, Eastern Arabic, Bengali, and circled numbers
- Added `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 documentandset page - Fixed
show figure: set align(..). Since the default figure alignment is now a show-set rule, it is not revoked byshow figure: it => it.bodyanymore. (Minor breaking change) - Fixed numbering of footnote references
- Fixed spacing after bibliography heading
Bibliography
- The Hayagriva YAML
publisherfield can now accept a dictionary with alocationkey. The top-levellocationkey is now primarily intended for event and item locations. - Multiple page ranges with prefixes and suffixes are now allowed
- Added
directorand 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
urlfield - Updated built-in citation styles
Visualization
- Added
fill-ruleparameter to `path` and `polygon` functions - Fixed color mixing and gradients for Luma colors
- 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` number type for highly precise arithmetic on numbers in base 10, as needed for finance
- Added
stdmodule for accessing standard library definitions even when a variable with the same name shadows/overwrites it - Added `array.to-dict`, `array.reduce`, `array.windows` methods
- Added
exactargument to `array.zip` - Added `arguments.at` method
- Added `int.from-bytes`, `int.to-bytes`, `float.from-bytes`, and `float.to-bytes`
- Added proper support for negative values of the
digitsparameter of `calc.round` (the behaviour existed before but was subtly broken) - Conversions from `int` to `float` will now error instead of saturating if the float is too large (Minor breaking change)
- Added
float.nanandfloat.inf, removedcalc.nan(Minor breaking change) - Certain symbols are now generally callable like functions and not only specifically in math. Examples are accents or `floor` and `ceil`.
- Improved `repr` of relative values, sequences, infinities, NaN,
type(none)andtype(auto) - Fixed crash on whole packages (rather than just files) cyclically importing each other
- Fixed return type of `calc.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 pagenot 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-2bin the CLI and via the UI in File \> Export as \> PDF in the web app. - Setting `page.fill` to
nonewill now lead to transparent pages instead of white ones in PNG and SVG. The new default ofautomeans 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-labelattribute on groups resulting from labelled boxes and blocks - 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
--pagesoption to select specific page ranges to export - Added
--package-pathand--package-cache-pathas well asTYPST_PACKAGE_PATHandTYPST_PACKAGE_CACHE_PATHenvironment variables for configuring where packages are loaded from and cached in, respectively - Added
--ignore-system-fontsflag to disable system fonts fully for better reproducibility - Added
--make-depsargument for outputting the dependencies of the current compilation as a Makefile - Added
--prettyoption totypst query, with the default now being to minify (only applies to JSON format) - Added
--backup-pathtotypst updateto configure where the previous version is backed up - Added useful links to help output
- The CLI will now greet users who invoke just
typstfor 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
--certorTYPST_CERTcould not be loaded - The CLI now respects the
SOURCE_DATE_EPOCHenvironment variable for better reproducibility - When exporting multiple images, you can now use
t(total pages),p(current page), and0p(zero-padded current page, same as currentn) 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
--openflag - Fixed path completions for
typstnot 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
langparameter - Added hints when trying to compile non-Typst files (e.g. after having typed
typst c file.pdfby 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:
turtletoshell,notestonote,ballot.xtoballot.cross,succ.eqtosucc.curly.eq,prec.eqtoprec.curly.eq,servicemarktotrademark.service,emoji.face.tiredtoemoji.face.distress(Breaking change) - Changed codepoint:
prec.eq,prec.neq,succ.eq,succ.neq,trianglefrom ▷ to △,emoji.face.tired(Breaking change) - Removed:
lt.curlyin favor ofprec,gt.curlyin favor ofsucc(Breaking change)
Deprecations
- `counter.display` without an established context
- `counter.final` with a location
- `state.final` with a location
state.display- `query` with a location as the second argument
- `locate` with a callback function
- `measure` with styles
style
Development
- Added
typst-kitcrate which provides useful APIs forWorldimplementors - Added go-to-definition API in
typst-ide - Added package manifest parsing APIs to
typst-syntax - As the compiler is now capable of multithreading,
Worldimplementations must satisfySendandSync - Changed signature of
World::mainto allow for the scenario where the main file could not be loaded - Removed
Tracerin favor ofWarned<T>andtypst::tracefunction - The
xz2dependency used by the self-updater is now statically linked - The Dockerfile now has an
ENTRYPOINTdirective
Contributors
0.13.0
Highlights
- There is now a distinction between proper paragraphs and just inline-level content. This is important for future work on accessibility and means that first line indent can now be enabled for all paragraphs instead of just consecutive ones.
- The `outline` has a better out-of-the-box look and is more customizable
- The new `curve` function (that supersedes the
pathfunction) provides a simpler and more flexible interface for creating Bézier curves - The
imagefunction now supports raw pixel raster formats for generating images from within Typst - Functions that accept file paths now also accept raw bytes, for full flexibility
- WebAssembly plugins 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 by which font family
- The `pdf.embed` 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 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
parnow only affect proper paragraphs - The
first-line-indentandhanging-indentproperties 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`
- The `outline` function was fully reworked to improve its out-of-the-box behavior (Breaking change)
- Outline entries are now blocks and are thus affected by block spacing
- The
autoindentation 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` parameter was moved from
outlinetooutline.entryand can thus be configured through show-set rules - Removed
bodyandpagefields from outline entry - Added
indented,prefix,inner,body, andpagemethods on outline entries to simplify writing of show rules - Added configuration to `par.first-line-indent` for indenting all paragraphs instead of just consecutive ones
- Added `form` parameter to
reffunction. Setting the form to"page"will produce a page reference instead of a textual one. - Added `document.description` field, which results in corresponding PDF and HTML metadata
- Added `enum.reversed` parameter
- Added support for Greek numbering
- When the `link` function wraps around a container like a 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
linkand `repeat`. - The `link` function will now only strip one prefix (like
mailto:ortel:) 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` function that supersedes the `path` function and provides a simpler and more flexible interface. The
pathfunction is now deprecated. - The
imagefunction now supports raw pixel raster formats. This can be used to generate images from within Typst without the need for encoding in an image exchange format. - Added `image.scaling` parameter for configuring how an image is scaled by PNG export and PDF viewers (smooth or pixelated)
- Added `image.icc` parameter for providing or overriding the ICC profile of an image
- Renamed
patternto `tiling`. The namepatternremains as a deprecated alias. - Added `gradient.center`, `gradient.radius`, `gradient.focal-center`, and `gradient.focal-radius` methods
- Fixed interaction of clipping and outset on `box` and `block`
- Fixed panic with `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`
- Auto-detection of image formats from a raw buffer now has support for SVGs
Scripting
- Functions that accept file paths now also accept raw bytes
- `image`, `cbor`, `csv`, `json`, `toml`, `xml`, and `yaml` now support a path string or bytes and their
.decodevariants are deprecated - `plugin`, `bibliography`, `bibliography.style`, `cite.style`, `raw.theme`, and `raw.syntaxes` now accept bytes in addition to path strings. These did not have
.decodevariants, so this adds new flexibility. - The
pathargument/field of `image` and `bibliography` was renamed tosourceandsources, respectively (Minor breaking change) - Improved WebAssembly plugins
- The
plugintype is replaced by a `plugin` function that returns a 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` 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
asrenaming (e.g.import "ot" + "her.typ") are a hard error (Breaking change) - Values of the `arguments` type can now be added with
+and joined 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` as no other element function defines methods.
- Added `calc.norm` function
- Added support for 32-bit floats in `float.from-bytes` and `float.to-bytes`
- The `decimal` constructor now also accepts decimal values
- Improved
reprof symbols, arguments, and types - Duplicate 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
- Better looking accents thanks to support for the
flac(Flattened Accent Forms) anddtls(Dotless Forms) OpenType features - Added
lcmtext operator - The `bold` function now works with ϝ and Ϝ
- The `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` and context expressions
- Fixed weak spacing being unconditionally ignored in `lr`
- Fixed sub/superscripts sometimes being in the wrong position with `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
editortypes likeproducer,writer,scriptwriter, andnone(defined by widespread stylebiblatex-chicagoto mean performers withinmusicandvideoentries) 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 by which font family
- Added `all` parameter to
smallcapsfunction that also enables small capitals on uppercase letters - Added basic i18n for Basque and Bulgarian
- Justification does not affect raw blocks anymore
- CJK-Latin-spacing does not affect 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` 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` and `circle`)
- Fixed `block.sticky` not working properly at the top of a container
- Fixed crash due to consecutive weak spacing
- Fixed crash when a 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 in `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.
0b100000ptis not allowed anymore. Previously, it was syntactically allowed but always resolved to a value of zero. (Minor breaking change) - Using
isas 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` 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` function for outputting an arbitrary HTML element
- Added `html.frame` function for integrating content that requires layout into HTML (by embedding an SVG)
- Added `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
citefunction - 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
--featuresargument andTYPST_FEATURESenvironment variable for opting into experimental features. The only feature so far ishtml. - Added a live reloading HTTP server to
typst watchwhen targeting HTML - Fixed self-update not being aware about certain target architectures
- Fixed crash when piping
typst fontsoutput to another command - Fixed handling of relative paths in
--make-depsoutput - Fixed handling of multipage SVG and PNG export in
--make-depsoutput - Colons in filenames are now correctly escaped in
--make-depsoutput
Symbols
- New
inter,inter.and,inter.big,inter.dot,inter.double,inter.sq,inter.sq.big,inter.sq.double,integral.interasymp,asymp.notmapsto,mapsto.longdivides.not.rev,divides.struckinterleave,interleave.big,interleave.struckeq.triple.not,eq.dots,eq.dots.down,eq.dots.upsmt,smt.eq,lat,lat.eqcolon.tri,colon.tri.opdagger.triple,dagger.l,dagger.r,dagger.invhourglass.stroked,hourglass.filleddie.six,die.five,die.four,die.three,die.two,die.oneerrorbar.square.stroked,errorbar.square.filled,errorbar.diamond.stroked,errorbar.diamond.filled,errorbar.circle.stroked,errorbar.circle.fillednumero- Renamed (Breaking change)
ohm.invtoOmega.inv- Changed codepoint (Breaking change)
angle.l.doublefrom《to⟪angle.r.doublefrom》to⟫angstromfrom U+212B (Å) to U+00C5 (Å)- Deprecated
sectand all its variants in favor ofinterintegral.sectin favor ofintegral.inter- Removed (Breaking change)
degree.cin favor of°C($upright(°C)$or$upright(degree C)$in math)degree.fin favor of°F($upright(°F)$or$upright(degree F)$in math)kelvinin favor of just K ($upright(K)$in math)ohmin favor ofOmega
Deprecations
- The `path` function in favor of the `curve` function
- The name
patternfor tiling patterns in favor of the new name `tiling` - `image.decode`, `cbor.decode`, `csv.decode`, `json.decode`, `toml.decode`, `xml.decode`, `yaml.decode` in favor of the top-level functions directly accepting both paths and bytes
- The
sectand its variants in favor ofinter, andintegral.sectin favor ofintegral.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
stylefunction andstylesargument of `measure`, use a context expression instead (Breaking change) - Removed
state.displayfunction, use `state.get` instead (Breaking change) - Removed
locationargument of `state.at`, `counter.at`, and `query` (Breaking change) - Removed compatibility behavior where `counter.display` worked without context (Breaking change)
- Removed compatibility behavior of `locate` (Breaking change)
Development
- The
typst::compilefunction is now generic and can return either aPagedDocumentor anHtmlDocument typst-timingnow supports WebAssembly targets viaweb-syswhen thewasmfeature is enabled- Increased minimum supported Rust version to 1.80
- Fixed linux/arm64 Docker image
Contributors
0.13.1
Command Line Interface
- Fixed high CPU usage for
typst watchon 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
- Fixed usage of
<html>and<body>element within context - Fixed querying of metadata next to
<html>and<body>element
Visualization
- Fixed curves with multiple non-closed components
Introspection
Deprecations
- Fixed false positives in deprecation warnings for type/str comparisons
Contributors
0.14.0
Highlights
- Typst now produces _accessible_ PDFs out of the box, with opt-in support for stricter checks and conformance to PDF/UA-1
- Typst now supports all PDF/A standards
- PDFs can now be used as images (thanks to @LaurenzV)
- Added support for character-level justification (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`) with individually typed attributes
- Added support for multiple headers and subheaders in tables
- Added `title` element for displaying the document title
- Added `frac.style` property for producing skewed and inline fractions
PDF export
PDF export was fully rewritten to use the new `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. _(Thanks to @LaurenzV for creating krilla!)_ #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.
- 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 for guidance on how to select a suitable standard. #5420 #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 for details. #5420
- Added `pdf.artifact` function for marking content as not semantically meaningful #6619
- Added experimental `pdf.header-cell`, `pdf.data-cell`, and `pdf.table-summary` functions for enhancing accessibility of documents with complex tables. These functions are guarded by the
a11y-extrasfeature. 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 - PDF heading bookmarks now contain the heading's numbering #6622
- Attachments
- Renamed
pdf.embedto `pdf.attach` (the old name will remain as a deprecated alias until Typst 0.15) #6705 - The `mime` property of
pdf.attachis now checked for syntactical correctness (Minor breaking change) - Fixed parsing of the `data` argument of
pdf.attach#6435 - Attachments now smartly determine whether they should be compressed #6256
- Text extraction (i.e. copy paste)
- Now works correctly even when multiple different characters result in the same glyph #5420
- Spaces between words at which a natural line break occurred are now correctly retained for text extraction #6866
- Fixed mapping of hyphenation artifacts to Unicode text #6799
- Images
- CMYK images now work properly in PDF export #5420
- Improved export of text in SVG images with a filter #5420
- Improved compatibility of SVG images with Quartz rendering engine (the engine used in Apple Preview) #5420
- Improved handling of SVG images with high group nesting depth #5420
- Fixed a bug with text in patterns #5420
- Fixed gradients with transparency #5420
HTML export
- Added support for many more built-in elements (the _Model_ category is now fully covered)
- The `image` element #6578
- The `footnote` and `footnote.entry` element #6917
- The `outline` and `outline.entry` element #6606
- The `bibliography` element #6952
- The `smartquote` element #6710
- The `sub` and `super` elements #6422
- The `underline`, `overline`, `strike`, and `highlight` elements #6510
- The `smallcaps` element #6600
- The `lower` and `upper` functions #6585
- Added typed HTML API (e.g. `html.div`) with individually typed attributes #6476
- For example, to generate a
videoelement you can now write#html.video(width: 400, src: "sunrise.mp4")instead of#html.elem("video", attrs: (width: "400", src: "sunrise.mp4")). Note how thewidthattribute takes an integer instead of a string. - Added support for intra-doc `link` targets #6602
- The `raw` element
- Added syntax highlighting support #6691
- Block-level
rawelements now emit both a<code>and a<pre>tag #6701 - The language tag of
rawelements is now preserved as adata-langattribute on the<code>tag #6702 - The `authors` and `keywords` properties of the
documentfunction now yield corresponding HTML<meta>tags #6134 - The `html.elem` function now supports custom HTML element names #6676
- Improved encoding of `html.frame` #6605
- Empty attributes are now encoded with shorthand syntax (e.g.
<div hidden></div>) #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 - Fixed encoding of
<pre>and<textarea>elements that start with a newline #6487 #6497 - Fixed encoding of raw text elements #6487 #6720
- Fixed sizing of `html.frame` #6505
- Fixed `measure` in HTML export #7186
- Fixed nested `html.frame`s #6509
- Fixed that a `box` without a body was ignored in HTML export #6709
- Fixed encoding of whitespace in HTML #6750
SVG export
- Added support for COLR-flavored color glyphs #6693
- Reduced amount of
<g>grouping elements that are generated #6247
PNG export
Visualize
- Added support for using PDFs as images using the new `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
- Added support for WebP images #6311
- Various minor improvements for SVG images (see the resvg 0.44 and 0.45 changelogs)
- SVG images can now refer to external image files #6794
- Clip paths are now properly anti-aliased #6570
- Fixed gradients on curves where the last segment is `curve.line` #6647
- Fixed stroke cap handling of shapes with partial strokes #5688
- Fixed corner radius handling of shapes with partial strokes #6976
- Fixed crash when sampling across two coinciding gradient stops #6166
Layout
- Added opt-in support for character-level justification in addition to word-level justification, configured via the new `par.justification-limits` property. This is an impactful microtypographical technique that can significantly improve the appearance of justified text. #6161
- Fixed wrong linebreak opportunities related to object replacement characters #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 #6335
- Fixed crash with set rule for column or rowspan on a grid cell #6401
- Fixed CJK-Latin-spacing at manual line breaks #6700 and at sub- and superscript boundaries #7175
Math
- Added `frac.style` property with new options for skewed and inline fractions #6672
- Added `math.equation.alt` property for setting an alternative description for an equation #6619
- Text handling
- A single equation can now use multiple fonts #6365
- Glyph layout in math now uses proper text shaping, leading to better handling of more complex Unicode features #6336
- Generated characters in an equation (e.g. the
√produced bysqrt) can now be targeted by text show rules #6365 - Added `scr` function for roundhand script font style #6309
- Added
dotlessparameter to `accent` (typically for rendering a dotless accented i or j) #5939 - Script-style glyphs are now preferred at reduced math sizes #6320
- Fixed `text.stroke` in math #6243
- Broken glyph assemblies are now prevented even when font data is incorrect #6688
- Layout
- Fixed a bug with vertical accent positioning #5941
- Fixed positioning of bottom accents #6187
- Fixed a bug with layout of roots #6021
- Improved layout of `vec` and `cases`, making it consistent with `mat` #5934
- Removed linebreak opportunity before closing bracket in inline math #6216
- An `augment` line can now exist at the start and end of a matrix, not only in between columns and rows #5806
- Shorthands and multi-character numbers do not bind more tightly than fractions anymore in cases like
$x>=(y)/z$#5925 #5996 (Minor breaking change) - Named arguments passed to symbols used as function now raise an error instead of being silently ignored #6192 (Minor breaking change)
- The `mid` element does not force the `"large"` math class upon its contents anymore and instead defaults to
"relation"#5980 - Fixed error in math parsing when
..isn't followed by anything #7105 - Fixed the default math class of ⅋, ⎰, ⟅, ⎱, ⟆, ⟇, and ، #5949 #6537
_Thanks to @mkorje for his work on math!_
Model
- Tables
- Added support for multiple headers and subheaders in tables #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
- Fixed a bug where headers and footers could accidentally expand to contain non-header cells #5919
- Added `title` element for displaying the document title #5618
- Added `figure.alt` property for setting an alternative description for a figure #6619
- Link hit boxes for text are now vertically a bit larger to avoid issues with automatic link detection in PDF viewers #6252
- The `link` function will now produce an error when passed an empty string as a URL #7049 (Minor breaking change)
- The value of the `number` argument of
enum.itemnow takesautoinstead ofnonefor automatic numbering #6609 (Minor breaking change) - Improved spacing of nested tight lists #6242
- Fixed that
quotes: falsewas ignored for inline-level quotes #5991 - Fixed hanging indent for centered, numbered headings #6839
- Fixed `footnote.entry` show rules breaking links from footnote to entry #6912
- Hebrew numbering does not add Geresh and Gershayim anymore #6122
Bibliography
- Built-in styles
- Updated styles to their latest upstream CSL versions typst/hayagriva#350
- Renamed
"chicago-fullnotes"to"chicago-notes"(the old name remains as a deprecated alias) #6920 - Renamed
"modern-humanities-research-association"to"modern-humanities-research-association-notes"(the old name remains as a deprecated alias) #6994 - Added support for locator/supplement in alphanumeric style typst/hayagriva#307
- Hayagriva format
- Added `chapter` field corresponding to CSL
chapter-numberand BibLaTeXchaptertypst/hayagriva#383 - BibLaTeX format
- Fixed parsing of alphanumeric page ranges typst/biblatex#86
- Added support for
%comment syntax typst/biblatex#80 - Fixed parsing of space-separated single character commands typst/biblatex#71
- Added "primaryclass" alias for "eprintclass" field typst/biblatex#75
- Added support for BibLaTeX
languagefield typst/hayagriva#317 - Improved translation of BibLaTeX fields to
genreandserial-numbertypst/hayagriva#296 typst/hayagriva#369 - CSL handling
- The bibliography rendering now uses `strong`, `emph`, and `smallcaps` to express CSL font styling instead of directly adjusting the `text` style, making styling easier #6984
- Added support for date seasons, which are displayed when the month is missing typst/hayagriva#391
- Terms for "AD" and "BC" are now correctly used from the chosen locale typst/hayagriva#364
- Fixed how subsequent citations with differing supplements translate into CSL
ibidandibid-with-locatorpositions #6171 - Fixed handling of
ibidandibid-with-locatorpositions in styles typst/hayagriva#301 - Fixed the
locationconditional in CSL styles for citations with no locator typst/hayagriva#399 - Fixed accesses of the year suffix resulting in wrong CSL renders typst/hayagriva#400
- Fixed regression where page variables were no longer supported in styles'
<number>elements typst/hayagriva#289 - Fixed sorting and formatting of name parts typst/hayagriva#287 typst/hayagriva#313
- Fixed year suffix collapsing typst/hayagriva#367
- Fixed delimiters in locale-specific date formatting typst/hayagriva#385
- Fixed rendering of date ordinals typst/hayagriva#366
- Fixed rendering and sorting of dates with BC years typst/hayagriva#334 typst/hayagriva#368
- Fixed sorting for empty sort values typst/hayagriva#390
Text
- The `sub` and `super` functions now use the
subsandsupsOpenType font features instead of special Unicode characters for typographic scripts, fixing semantical, sizing, and positioning issues #5777 - The `raw` element
- Tweaked default syntax-highlighting color scheme of `raw` text to make the colors more accessible #6754
- JSON keys and string values now use different colors in the default
rawsyntax highlighting theme #6873 - Fixed a crash when a
rawsyntax contains an unescaped trailing backslash #6883 - Fixed tab indentation in `raw` text with CRLF line terminators #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
- Added term translations for Indonesian #6108, Latvian #6348, Croatian #6413, Lithuanian #6587, French #7010, French (Canada) #7098, Galician #7019, Dutch #7026, Danish #7031, Slovenian #7032, Italian #7050, Chinese #7044, Spanish #7051, and Irish (Gaeilge) #7024
- Improved term translations for Czech #6101, Swedish #6519, Galician #7019, Dutch #7026, Chinese #7044, Spanish #7051, Irish (Gaeilge) #7024, and German #7082
- Improved smart quotes for French #5976, Ukrainian #6372, Russian #6331, and Arabic #6626
- An empty font list is not allowed anymore in `text.font` #6049 (Minor breaking change)
- Added a warning when using a variable font as those are not currently supported #6425
- Fixed usage of the same font with different coverage settings #6604
- Fixed hyphens not showing up when hyphenating at specific positions (where invisible metadata exists) #6807
- Fixed styling of repeated hyphens in languages with hyphen repetition #6798
- Last resort font fallback does not consider default ignorable characters anymore during font selection #6805
- Updated New Computer Modern fonts to version 7.0.4 #6376
- Updated data and shaper to Unicode 16.0.0 #5407
Scripting
- The
inoperator can now be used to check whether a definition is present in a module #6498 - Added
defaultparameter to `array.first`, `array.last` #5970, `array.join` #6932, `str.first`, and `str.last` #6554 methods - Added
byparameter to `array.sorted` for sorting with a comparison function #5627 - Added `str.normalize` function for Unicode normalization #5631
- Added `from`, `to`, and `sign` methods to
directiontype #5893 - Labels cannot be empty anymore #6332 (Minor breaking change)
- The WebAssembly runtime used by the `plugin` system was updated and now supports SIMD #6997
- Numberings and counters now use 64-bit numbers instead of platform-dependent numbers for consistency across platforms #6026
- Improved consistency of how large numbers are handled in data loading functions #6836
- The `toml` function is now guaranteed to return a dictionary and `toml.encode` must receive a dictionary (it already errored before when passed something else, but the new function signature makes the error clearer) #6743
- Serialization of `bytes` in human-readable formats now uses `repr` #6743
- Fixed slicing of last N elements of an array using the `count` parameter #6838
- Fixed crash when the expression wrapped in a
contextexpression is an anonymous function #6975 - Fixed equality check between `raw.line` elements #6560
- Fixed `repr` of labels being potentially syntactically invalid #6456
- Fixed `repr` of functions modified through `with` #6773
Introspection
- The following elements are newly locatable (i.e. they can be discovered with `query`, `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, andhighlight#6619 - Fixed issues with logical order in bidirectional text #5887 #6796
- Fixed logical order of cells in right-to-left `grid` #6232
- Fixed logical order of elements in `grid` cells that span multiple pages #7198
- Fixed logical order of metadata at the starts and ends of paragraphs #6881 #6909
- Fixed introspection positions 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
Styling
- Fixed rare infinite loop in show rule application #6259
Performance
- Optimized incremental compilation with a new algorithm that, in particular, eliminates cases of very slow compilation with heavy context usage #6683
Command Line Interface
- Added
typst infosubcommand for emitting build and environment information #6761 - Added
typst completionssubcommand for retrieving shell completions #6568 - Added
TYPST_IGNORE_SYSTEM_FONTSenvironment variable #6092 - Added
--ignore-embedded-fontsflag andTYPST_IGNORE_EMBEDDED_FONTSenvironment variable for disabling the use of fonts embedded into the Typst binary #7037 - Added
--no-pdf-tagsflag 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 - Added
--targetparameter totypst query#6405 - Added
--depsand--deps-formatparameters for emitting a list of files compilation depends on. Supports the three formatsjson,zero, andmake. #7022 - Deprecated the
--make-depsflag in favor of--depswith--deps-format make#7022 - On Linux, the font search will now fall back to known font directories if none were loaded via Fontconfig. RazrFalcon/fontdb#71
- The CLI will now warn when trying to watch the standard input #6381
- Fixed race condition when two separate Typst CLI processes concurrently try to install a package #5979
- Fixed incremental SVG export not writing output SVGs on changes that only affect the page (e.g. changing
page.fill) #6810 - Fixed a rare potential crash when stack space couldn't be grown as expected #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
- Warnings originating from within `eval` are now correctly emitted #6100
- Diagnostic messages and hints
- Improved error messages related to parsing of numbers #5969
- The error message for an unsuitable CSL style now mentions the name of the style #6306
- Added hints to various deprecated items with the removal timeline #6617
- Added hint for the error message when an X/Y pair is expected #6476
- Added hint for a label that appears in both the document and the bibliography #6457
- Added additional hint for show rule recursion depth error #5856
- Fixed inconsistent formatting of code points and strings in error messages #6487
- Autocompletion
- Labels will now be deduplicated in completions #6516
- Math font autocompletions are now based on the presence of an OpenType MATH table instead of the word "Math" in the name #6316
- Autocompletion immediately after a comma in a parameter list is now supported for explicitly triggered completions (e.g. via Ctrl/Cmd+Space) #6550
- Citation style aliases are now displayed as autocompletions #6696
- Fixed autocompletion false positives with cursor after parameter list #6475
- Fixed autocompletion after partial identifier in math #6415
- Fixed which definitions are suggested in math #6415
- Fixed inapplicable method autocompletions being listed #5824
- Tooltips
- Fixed tooltip for scoped functions (e.g.
calc.round) #6234 - Fixed tooltip and details for figure references #6580
- Expression tooltips now use
×instead ofxto indicate a repeated value #6163 - Fixed jump from click (jumping to the source panel with a click in the preview) in presence of transformations and clipping #6037
Symbols
- Added many new symbols and variants; many more than could be listed here. View the dedicated changelog 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
symoremoji. That said, they still don't render consistently in Typst due to how font fallback works. typst/codex#114 - The `symbol` function can now be used to create symbols that comprise not just one character, but one full grapheme cluster #6489
Deprecations
- The name
pdf.embedin favor of the new name `pdf.attach` #6705 - The
"chicago-fullnotes"bibliography style in favor of"chicago-notes"#6920 - The
"modern-humanities-research-association"bibliography style in favor of"modern-humanities-research-association-notes"#6994 - The
--make-depsCLI flag in favor of--depswith--deps-format make#7022 - Various symbols, see the deprecation section in the dedicated changelog 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
Defaultimpl forLibraryhad to be removed for crate splitting and trait coherence reasons, but you can get a drop-in replacement viause typst::LibraryExt#6576 - The
PdfOptionsstruct has a newtaggedfield, which defaults totrue#6619 #7046 - Fixed a potential panic in
World::fontimplementations. DownstreamWorldimplementations might need to apply the same fix. #6117 - Increased minimum supported Rust version to 1.88 #6637
- The Docker container now has the optional non-root user
typst#7058
Contributors
0.14.1
PDF export
- Fixed regression where links to labelled elements would sometimes not work correctly LaurenzV/krilla#304
- Fixed bug where PDF text attributes could be written incorrectly #7478
- Fixed crash in link handling #7471
- Fixed crash for zero-sized pages #7454
- Fixed crash when a table `vline` or `hline` has an out-of-bounds index #7448
- Fixed crash in formatting of font-related PDF export errors #7460
- Fixed crash when a `footnote` or `place` element was queried and reinserted into the document #7216
- Fixed crash for PNGs with invalid metadata LaurenzV/krilla#286, LaurenzV/krilla#287
- Fixed bug where text in SVGs with
fill-and-strokepaint order could be exported incorrectly LaurenzV/krilla#292 - Fixed bug with layer isolation in SVGs where blending/masking is used LaurenzV/krilla#295
- Fixed that table headers could be tagged incorrectly in some scenarios LaurenzV/krilla#289
- Fixed issues where generated PDFs could differ between 32-bit and 64-bit systems LaurenzV/krilla#317, LaurenzV/krilla#316, LaurenzV/krilla#312
- Upgraded JPEG decoder used during PDF export for improved compatibility, fixing a case where a valid JPEG was rejected LaurenzV/krilla#288
- A PDF document information dictionary that would be empty is now fully omitted instead LaurenzV/krilla#280
- A rare crash in PDF tagging was turned into a compiler error #7450
HTML export
- Fixed export of table headers and footers with gutter #7332
- A `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
Math
- Fixed regression where
arrow.l.rcould not be used as an accent anymore #7481 - Fixed that single-letter strings did not react to spaces around them like multi-letter strings do #7276
- Fixed that spacing around `mat` and `vec` with a fence delimiter was whitespace-dependent #7309
- Fixed height calculation for horizontally stretched glyphs #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
Text
- Fixed regression where Typst would synthesize superscripts for some fonts even when typographic glyphs were available #7462
- Fixed regression where some oblique fonts would be classified as italic #7483
Scripting
- Fixed crash due to violated invariants in `array.sorted` #7520
- Fixed crashes due to overflow in `calc.rem`, `calc.rem-euclid`, `calc.div-euclid`, `calc.quo`, and `calc.gcd` #7419
- Upgraded WebAssembly runtime, fixing a bug that plugins could run into #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
Development
- Increased minimum supported Rust version to 1.89 #7363
Contributors
0.14.2
Security
- Updated the WebAssembly runtime used for executing plugins. 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` 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` 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.2.0
Breaking changes
- Removed support for iterating over index and value in for loops. This is now handled via unpacking and enumerating. Same goes for the `map` method.
- Dictionaries now iterate in insertion order instead of alphabetical order.
New features
- Added unpacking syntax for let bindings, which allows things like
let (1, 2) = array - Added `enumerate` method
- Added `path` function for drawing Bézier paths
- Added `layout` function to access the size of the surrounding page or container
- Added
keyparameter to `sorted` method
Command line interface
- Fixed
--openflag 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_ARTIFACTSenvironment 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
sincoperator - Fixed bug where math could not be hidden with `hide`
- Fixed sizing issues with box, block, and shapes
- Fixed some translations
- Fixed inversion of "R" in `cal` and `frak` styles
- Fixed some styling issues in math
- Fixed supplements of references to headings
- Fixed syntax highlighting of identifiers in certain scenarios
- Ratios can now be multiplied with more types and be converted to floats with the `float` function
Contributors
0.3.0
Breaking changes
- Renamed a few symbols: What was previous
dot.opis now justdotand the basic dot isdot.basic. The same applies toastandtilde. - Renamed
modto `rem` to more accurately reflect the behavior. It will remain available asmoduntil 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
beforeandafterarguments from `query`. This is now handled through flexible selectors combinator methods - Added support for attachments (sub-, superscripts) that precede the base symbol. The
topandbottomarguments have been renamed totandb.
New features
- Added support for more complex strokes (configurable caps, joins, and dash patterns)
- Added `cancel` function for equations
- Added support for destructuring in argument lists and assignments
- Added `alt` text argument to image function
- Added `toml` function for loading data from a TOML file
- Added `zip`, `sum`, and `product` methods for arrays
- Added
fact,perm,binom,gcd,lcm,atan2,quo,trunc, andfractcalculation functions
Improvements
- Text in SVGs now displays properly
- Typst now generates a PDF heading outline
- References 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` 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
- 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 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_PATHSandTYPST_ROOT - The output of
typst fontsnow includes the embedded fonts
Development
- Added instrumentation for debugging and optimization
- Added
--updateflag andUPDATE_EXPECTenvironment variable to update reference images for tests - You can now run a specific subtest with
--subtest - Tests now run on multiple threads
Contributors
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
Guides
Welcome to the Guides section! Here, you'll find helpful material for specific user groups or use cases. Please see the list below for the available guides. Feel free to propose other topics for guides!
List of Guides
Overview
Welcome to Typst's documentation! Typst is a new markup-based typesetting system for the sciences. It is designed to be an alternative both to advanced tools like LaTeX and simpler tools like Word and Google Docs. Our goal with Typst is to build a typesetting tool that is highly capable _and_ a pleasure to use.
This documentation is split into two parts: A beginner-friendly tutorial that introduces Typst through a practical use case and a comprehensive reference that explains all of Typst's concepts and features.
We also invite you to join the community we're building around Typst. Typst is still a very young project, so your feedback is more than valuable.
Boolean
A type with two states.
The boolean type has two values: true and false. It denotes whether something is active or enabled.
Example
#false \
#true \
#(1 < 2)Related skills
FAQ
What is Typst?
Typst is a markup-based typesetting system for the sciences, positioned as an alternative to LaTeX and to tools like Word and Google Docs.
Does it help LaTeX users?
Yes, it bundles a dedicated Guide for LaTeX Users along with page-setup, tables, and accessibility guides.