Releases: typst/typst
Version 0.12.0 (October 18, 2024)
View changelog with links into the documentation on typst.app/docs
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
andfigure.scope
. Two-column documents should now preferset 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 ofshow 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
auto
option forpage.header
andpage.footer
which results in an automatic header/footer based on the numbering (which was previously inaccessible after a change) - Added
gap
andjustify
parameters torepeat
function - Added
width
andheight
parameters to themeasure
function to define the space in which the content should be measured. Especially useful in combination withlayout
. - The height of a
block
,image
,rect
,square
,ellipse
, orcircle
can now be specified in fractional units - The
scale
function now supports absolute lengths forx
,y
,factor
. This way an element of unknown size can be scaled to a fixed size. - The values of
block.above
andblock.below
can now be retrieved in context expressions. - Increased accuracy of conversions between absolute units (pt, mm, cm, in)
- Fixed a bug which could cause headings to be orphaned at the bottom of the page
- Fixed footnotes within breakable blocks appearing on the page where the breakable block ends instead of at the page where the footnote marker is
- Fixed numbering of nested footnotes and footnotes in floats
- Fixed empty pages appearing when a context expression wraps whole pages
- Fixed
set block(spacing: x)
behaving differently fromset block(above: x, below: x)
- Fixed behavior of
rotate
andscale
withreflow: 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
typm
highlighting 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 tonone
to disable highlighting even in the presence of a language tag, and toauto
to 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
floor
andceil
functions in math are now callable symbols, such that$ floor(x) = lr(floor.l x floor.r) $
- The
mat.delim
,vec.delim
, andcases.delim
parameters now allow any character that is considered a delimiter or "fence" (e.g. |) by Unicode. Thedelim: "||"
notation is not supported anymore and should be replaced bydelim: bar.double
(Minor breaking change) - Added
vec.align
andmat.align
parameters - Added
underparen
,overparen
,undershell
, andovershell
- Added
~
shorthand fortilde.op
in math mode (Minor breaking change) - Fixed baseline alignment of equation numbers
- Fixed positioning of corner brackets (⌜, ⌝, ⌞, ⌟)
- Fixed baseline of large roots
- Fixed multiple minor layout bugs with attachments
- Fixed that alignment points could affect line height in math
- Fixed that spaces could show up between text and invisible elements like
metadata
in math - Fixed a crash with recursive show rules in math
- Fixed
lr.size
not affecting characters enclosed inmid
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()
whenplace
was used in a context expression - Fixed resolved positions of elements (in particular, headings) whose show rule emits an invisible element (like a state update) before a page break
- Fixed behavior of stepping a counter at a deeper level than its current state has
- Fixed citation formatting not working in table headers and a few other places
- Displaying the footnote counter will now respect the footnote numbering style
Model
- Document set rules do not need to be at the very start of the document anymore. The only restriction is that they must not occur inside of layout containers.
- The
spacing
property of lists, 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
depth
instead oflevel
so 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 interactio...
Version 0.12.0, Release Candidate 2 (October 15, 2024)
View changes since RC1.
Version 0.12.0, Release Candidate 1 (October 3, 2024)
For a preliminary 0.12 changelog, see https://staging.typst.app/docs/changelog
Version 0.11.1 (May 17, 2024)
-
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
andoutline
- 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
raw
text with languagetyp
ortypc
- Fixed highlighting of multi-line
raw
text enclosed by single backticks - Fixed indentation of overflowing lines in
raw
blocks - Fixed extra space when
raw
text ends with a backtick
- Fixed interaction of
-
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
if
branch and theelse
keyword - Fixed inefficiency with incremental reparsing
- Fixed autocompletions for relative file imports
- Fixed crash in autocompletion handler
- Fixed a bug where the path and entrypoint printed by
typst init
were not properly escaped - Fixed various documentation errors
Thanks to everyone who contributed to this release: @Leedehai, @elegaanz, @frozolotl, @A-Walrus, @MDLC01, @Myriad-Dreamin, @3w36zj6, @Enter-tainer, @EpicEricEE, @Jocs, @PgBiel, @QuarticCat, @Tom4sCruz, @bluebear94, @etiennecollin, @gabriel-araujjo, @joserlopes, @rikhuijzer, @wrzian.
Version 0.11.0 (March 15, 2024)
View changelog with more links on typst.app
-
Tables (thanks to @PgBiel)
- 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
andinset
arguments of the table function now also take(x, y) => ..
functions - Added
table.hline
andtable.vline
for convenient line customization - Added
table.header
element for table headers that repeat on every page - Added
table.footer
element for table footers that repeat on every page - All the new table functionality is also available for grids
- Fixed gutter-related bugs
-
Templates
- You can now use template packages to get started with new projects. Click Start from template on the web app's dashboard and choose your preferred template or run the
typst init <template>
command in the CLI. You can browse the available templates here. - 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.
- 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
-
Context
- Added context expressions: Read the chapter on context to get started
- With context, you can access settable properties, e.g.
context text.lang
to access the language set viaset text(lang: "..")
- The following existing functions have been made contextual:
query
,locate
,measure
,counter.display
,counter.at
,counter.final
,state.at
, andstate.final
- Added contextual methods
counter.get
andstate.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
andstate.at
methods are now more flexible: They directly accept any kind of locatable selector with a unique match (e.g. a label) instead of just locations - When context is available,
counter.display
now directly returns the result of applying the numbering instead of yielding opaque content. It should not be used anymore without context. (Deprecation planned) - The
state.display
function should not be used anymore, usestate.get
instead (Deprecation planned) - The
location
argument ofquery
,counter.final
, andstate.final
should not be used anymore (Deprecation planned) - The
styles
argument of themeasure
function should not be used anymore (Deprecation planned) - The
style
function should not be used anymore, use context instead (Deprecation planned) - The correct context is now also provided in various other places where it is available, e.g. in show rules, layout callbacks, and numbering functions in the outline
-
Styling
- Fixed priority of multiple show-set rules: They now apply in the same order as normal set rules would
- Show-set rules on the same element (e.g.
show heading.where(level: 1): set heading(numbering: "1.")
) now work properly - Setting properties on an element within a transformational show rule (e.g.
show heading: it => { set heading(..); it }
) is not supported anymore (previously it also only worked sometimes); use show-set rules instead (Breaking change) - Text show rules that match their own output now work properly (e.g.
show "cmd": `cmd`
) - The elements passed to show rules and returned by queries now contain all fields of their respective element functions rather than just specific ones
- All settable properties can now be used in where selectors
- And and or selectors can now be used with show rules
- Errors within show rules and context expressions are now ignored in all but the last introspection iteration, in line with the behavior of the old
locate
- Fixed a bug where document set rules were allowed after content
-
Layout
- Added
reflow
argument torotate
andscale
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
andv
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
- Added
-
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
- Added
-
Model
- Added
depth
andoffset
arguments to heading to increase or decrease the heading level for a bunch of content; the heading syntax now setsdepth
rather 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
- Added
-
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
andemph
anymore - Fixed
attach
under fractions - Fixed that
math.class
did not affect smart limit placement - Fixed weak spacing in
lr
groups - Fixed layout of large operators for Cambria Math font
- Fixed math styling of Hebrew symbol codepoints
-
Symbols
- Added
gradient
as an alias fornabla
- Added
partial
as an alias fordiff
,diff
will be deprecated in the future - Added
colon.double
,gt.approx
,gt.napprox
,lt.approx
, andlt.napprox
- Added
arrow.r.tilde
andarrow.l.tilde
- Added
tilde.dot
- Added
forces
andforces.not
- Added
space.nobreak.narrow
- Added
lrm
(Left-to-Right Mark) andrlm
(Right-to-Left Mark) - Fixed
star.stroked
symbol (which previously had the wrong codepoint)
- Added
-
Scripting
- Arrays can now be compared lexicographically
- Added contextual method
to-absolute
to lengths - Added
calc.root
- Added
int.signum
andfloat.signum
methods - Added
float.is-nan
andfloat.is-infinite
methods - Added
int.bit-not
,int.bit-and
,int.bit-or
,int.bit-xor
,int.bit-lshift
, andint.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 tocsv
function to configure how rows will be represented - XML parsing now allows DTDs (document type definitions)
- Improved formatting of negative numbers with
str
andrepr
- For loops can now iterate over bytes
- Fixed a bug with pattern matching in for loops
- Fixed a bug with labels not being part of
.fields()
dictionaries - Fixed a bug where unnamed argument sinks wouldn't capture excess arguments
- Fixed typo in
repr
output of strokes
-
Syntax
- Added support for nested destructuring patterns
- Special spaces (like thin or non-breaking spaces) are now parsed literally instead of being collapsed into normal spaces (Breaking change)
- Korean text can now use emphasis syntax without adding spaces (Breaking change)
- The token
context
is now a keyword and cannot be used as an identifier anymore (Breaking change) - Nested line comments aren't allowed anymore in block comments (Breaking change)
- Fixed a bug where
x.)
would be treated as a field access - Text elements can now span across curly braces in markup
- Fixed silently wrong parsing when function name is parenthesized
- Fixed various bugs with parsing of destructuring patterns, arrays, and dictionaries
-
Tooling & Diagnostics
- Click-to-jump now works properly within
raw
text - Added suggestion for accessing a field if a method doesn't exist
- Improved hint for calling a function stored in a dictionary
- Improved errors for mutable accessor functions on arrays and dictionaries
- Fixed error message when calling constructor of type that doesn't have one
- Fixed confusing error message with nested dictionaries for strokes on different sides
- ...
- Click-to-jump now works properly within
Version 0.11.0, Release Candidate 1 (March 9, 2024)
For a preliminary 0.11 changelog, see https://staging.typst.app/docs/changelog
Version 0.10.0 (December 4, 2023)
-
Bibliography management
- Added support for citation collapsing (e.g.
[1]-[3]
instead of[1], [2], [3]
) if requested by a CSL style - Fixed bug where an additional space would appear after a group of citations
- Fixed link show rules for links in the bibliography
- Fixed show-set rules on citations
- Fixed bibliography-related crashes that happened on some systems
- Corrected name of the GB/T 7714 family of styles from 7114 to 7714
- Fixed missing title in some bibliography styles
- Fixed printing of volumes in some styles
- Fixed delimiter order for contributors in some styles (e.g. APA)
- Fixed behavior of alphanumeric style
- Fixed multiple bugs with GB/T 7714 style
- Fixed escaping in Hayagriva values
- Fixed crashes with empty dates in Hayagriva files
- Fixed bug with spacing around math blocks
- Fixed title case formatting after verbatim text and apostrophes
- Page ranges in
.bib
files can now be arbitrary strings - Multi-line values in
.bib
files are now parsed correctly - Entry keys in
.bib
files now allow more characters - Fixed error message for empty dates in
.bib
files - Added support for years of lengths other than 4 without leading zeros in
.bib
files - More LaTeX commands (e.g. for quotes) are now respected in
.bib
files
- Added support for citation collapsing (e.g.
-
Visualization
- Added support for patterns as fills and strokes
- The
alpha
parameter of thecomponents
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
- CJK text can now be emphasized with the
-
Math
- Added
mid
function for scaling a delimiter up to the height of the surroundinglr
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,)
)
- Added
-
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
andcalc.rem-euclid
functions - Fixed equality of
arguments
- Fixed
repr
ofcmyk
colors - Fixed crashes with provided elements like figure captions, outline entries, and footnote entries
- Any non-identifier dictionary key is now interpreted as an expression: For instance,
-
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
- PDF compilation output is now again fully byte-by-byte reproducible if the document's
-
Command line interface
- Fixed a major bug where
typst watch
would confuse files and fail to pick up updates - Fetching of the release metadata in
typst update
now respects proxies - Fixed bug with
--open
flag on Windows when the path contains a space - The
TYPST_FONT_PATHS
environment variable can now contain multiple paths (separated by;
on Windows and:
elsewhere) - Updated embedded New Computer Modern fonts to version 4.7
- The watching process doesn't stop anymore when the main file contains invalid UTF-8
- Fixed a major bug where
-
Miscellaneous Improvements
- Parallelized image encoding in PDF export
- Improved the internal representation of content for improved performance
- Optimized introspection (query, counter, etc.) performance
- The document title can now be arbitrary content instead of just a string
- The
number-align
parameter on numbered lists now also accepts vertical alignments - Fixed selectors on quote elements
- Fixed parsing of
#return
expression in markup - Fixed bug where inline equations were displayed in equation outlines
- Fixed potential CRLF issue in
raw
blocks - Fixed a bug where Chinese numbering couldn't exceed the number 255
-
Development
- Merged
typst
andtypst-library
and extractedtypst-pdf
,typst-svg
, andtypst-render
into separate crates - The Nix flake now includes the git revision when running
typst --version
- Merged
Thanks to everyone who contributed to this release: @Dherse, @frozolotl, @Leedehai, @Andrew15-5, @MDLC01, @danieleades, @tingerrr, @Jollywatt, @cmoog, @peng1999, @Enter-tainer, @JakobSachs, @KronosTheLate, @MyrtleTurtle22, @T0mstone, @TheJosefOlsson, @antonWetzel, @denkspuren, @kokkonisd, @lihe07, @mattfbacon, @rezzubs, @samueltardieu, @xalbd.
Version 0.9.0 (October 31, 2023)
-
Bibliography management
- New bibliography engine based on CSL (Citation Style Language). Ships with about 100 commonly used citation styles and can load custom
.csl
files - Added new
form
argument to thecite
function to produce different forms of citations (e.g. for producing a citation suitable for inclusion in prose) - The
cite
function now takes only a single label/key instead of allowing multiple. Adjacent citations are merged and formatted according to the citation style's rules automatically. This works both with the reference syntax and explicit calls to thecite
function. (Breaking change) - The
cite
function now takes a label instead of a string (Breaking change) - Added
full
argument to bibliography function to print the full bibliography even if not all works were cited - Bibliography entries can now contain Typst equations (wrapped in
$..$
just like in markup), this works both for.yml
and.bib
bibliographies - The hayagriva YAML format was improved. See its changelog for more details. (Breaking change)
- A few bugs with
.bib
file parsing were fixed - Removed
brackets
argument ofcite
function in favor ofform
- New bibliography engine based on CSL (Citation Style Language). Ships with about 100 commonly used citation styles and can load custom
-
Visualization
- Gradients and colors (thanks to @Dherse)
- Added support for gradients on shapes and text
- Supports linear, radial, and conic gradients
- Added support for defining colors in more color spaces, including Oklab, Linear RGB(A), HSL, and HSV
- Added
saturate
,desaturate
, androtate
functions on colors - Added
color.map
module with predefined color maps that can be used with gradients - Rename
kind
function on colors tospace
- Removed
to-rgba
,to-cmyk
, andto-luma
functions in favor of a newcomponents
function
- Improved rendering of rectangles with corner radius and varying stroke widths
- Added support for properly clipping boxes and blocks with a border radius
- Added
background
parameter tooverline
,underline
, andstrike
functions - Fixed inaccurate color embedding in PDFs
- Fixed ICC profile handling for images embedded in PDFs
- Gradients and colors (thanks to @Dherse)
-
Text and Layout
- Added support for automatically adding proper pacing between CJK and Latin text (enabled by default)
- Added support for automatic adjustment of more CJK punctuation
- Added
quote
element for inserting inline and block quotes with optional attributions - Added
raw.line
element for customizing the display of individual lines of raw text, e.g. to add line numbers while keeping proper syntax highlighting - Added support for per-side inset customization to table function
- Added Hungarian and Romanian translations
- Added support for Czech hyphenation
- Added support for setting custom smart quotes
- The default figure separator now reacts to the currently set language and region
- Improved line breaking of links / URLs (especially helpful for bibliographies with many URLs)
- Improved handling of consecutive hyphens in justification algorithm
- Fixed interaction of justification and hanging indent
- Fixed a bug with line breaking of short lines without spaces when justification is enabled
- Fixed font fallback for hyphen generated by hyphenation
- Fixed handling of word joiner and other no-break characters during hyphenation
- Fixed crash when hyphenating after an empty line
- Fixed line breaking of composite emoji like 🏳️🌈
- Fixed missing text in some SVGs
- Fixed font fallback in SVGs
- Fixed behaviour of
to
argument onpagebreak
function - Fixed
set align(..)
for equations - Fixed spacing around placed elements
- Fixed coalescing of
above
andbelow
spacing if given in em units and the font sizes differ - Fixed handling of
extent
parameter ofunderline
,overline
, andstrike
functions - Fixed crash for floating placed elements with no specified vertical alignment
- Partially fixed a bug with citations in footnotes
-
Math
- Added
gap
argument forvec
,mat
, andcases
function - Added
size
argument forabs
,norm
,floor
,ceil
, andround
functions - Added
reverse
parameter to cases function - Added support for multinomial coefficients to
binom
function - Removed
rotation
argument oncancel
function in favor of a new and more flexibleangle
argument (Breaking change) - Added
wide
constant, which inserts twice the spacing ofquad
- Added
csch
andsech
operators ↼
,⇀
,↔
, and⟷
can now be used as accents- Added
integral.dash
,integral.dash.double
, andintegral.slash
symbols - Added support for specifying negative indices for augmentation lines to position the line from the back
- Fixed default color of matrix augmentation lines
- Fixed attachment of primes to inline expressions
- Math content now respects the text baseline setting
- Added
-
Performance
- Fixed a bug related to show rules in templates which would effectively disable incremental compilation in affected documents
- Micro-optimized code in several hot paths, which brings substantial performance gains, in particular in incremental compilations
- Improved incremental parsing, which affects the whole incremental compilation pipeline
- Added support for incremental parsing in the CLI
- Added support for incremental SVG encoding during PDF export, which greatly improves export performance for documents with many SVG
-
Tooling and Diagnostics
- Improved autocompletion for variables that are in-scope
- Added autocompletion for package imports
- Added autocompletion for labels
- Added tooltip that shows which variables a function captures (when hovering over the equals sign or arrow of the function)
- Diagnostics are now deduplicated
- Improved diagnostics when trying to apply unary
+
or-
to types that only support binary+
and-
- Error messages now state which label or citation key isn't present in the document or its bibliography
- Fixed a bug where function argument parsing errors were shadowed by function execution errors (e.g. when trying to call
array.sorted
and passing the key function as a positional argument instead of a named one).
-
Export
- Added support for configuring the document's creation
date
. If thedate
is set toauto
(the default), the PDF's creation date will be set to the current date and time. - Added support for configuring document
keywords
- Generated PDFs now contain PDF document IDs
- The PDF creator tool metadata now includes the Typst version
- Added support for configuring the document's creation
-
Web app
- Added version picker to pin a project to an older compiler version (with support for Typst 0.6.0+)
- Fixed desyncs between editor and compiler and improved overall stability
- The app now continues to highlight the document when typing while the document is being compiled
-
Command line interface
- Added support for discovering fonts through fontconfig
- Now clears the screen instead of resetting the terminal
- Now automatically picks correct file extension for selected output format
- Now only regenerates images for changed pages when using
typst watch
with PNG or SVG export
-
Miscellaneous Improvements
- Added
version
type andsys.version
constant specifying the current compiler version. Can be used to gracefully support multiple versions. - The U+2212 MINUS SIGN is now used when displaying a numeric value, in the
repr
of any numeric value and to replace a normal hyphen in text mode when before a digit. This improves, in particular, how negative integer values are displayed in math mode. - Added support for specifying a default value instead of failing for
remove
function in array and dictionary - Simplified page setup guide examples
- Switched the documentation from using the word "hashtag" to the word "hash" where appropriate
- Added support for
array.zip
without any further arguments - Fixed crash when a plugin tried to read out of bounds memory
- Fixed crashes when handling infinite lengths
- Fixed introspection (mostly bibliography) bugs due to weak page break close to the end of the document
- Added
-
Development
- Extracted
typst::ide
into separatetypst_ide
crate - Removed a few remaining
'static
bounds on&dyn World
- Removed unnecessary dependency, which reduces the binary size
- Fixed compilation of
typst
by itself (withouttypst-library
) - Fixed warnings with Nix flake when using
lib.getExe
- Extracted
Thanks to everyone who contributed to this release: @Dherse, @EpicEricEE, @tingerrr, @LuxxxLucy, @bluebear94, @MDLC01, @Jollywatt, @SekoiaTree, @DVDTSB, @HydroH, @KillTheMule, @LaurenzV, @frozolotl, @peng1999, @0scvr, @7sDream, @8LWXpg, @Enter-tainer, @FlyinPancake, @Myriad-Dreamin, @T0mstone, @TheJosefOlsson, @WannesMalfait, @WeetHet, @Weissnix4711, @Zheoni, @antonWetzel, @arnaudgolfouse, @drupol, @dxniel-19, @extua, @fritzrehde, @johannes-wolf, @qrnch-jan, @toddlerer.
Version 0.8.0 (September 13, 2023)
-
Scripting
- Plugins (thanks to @astrale-sharp and @arnaudgolfouse)
- Typst can now load plugins that are compiled to WebAssembly
- Anything that can be compiled to WebAssembly can thus be loaded as a plugin
- These plugins are fully encapsulated (no access to file system or network)
- Plugins can be shipped as part of packages
- Plugins work just the same in the web app
- Types are now first-class values (Breaking change)
- A type is now itself a value
- Some types can be called like functions (those that have a constructor), e.g.
int
andstr
- Type checks are now of the form
type(10) == int
instead of the oldtype(10) == "integer"
. Compatibility with the old way will remain for a while to give package authors time to upgrade, but it will be removed at some point. - Methods are now syntax sugar for calling a function scoped to a type, meaning that
"hello".len()
is equivalent tostr.len("hello")
- Added support for
import
renaming withas
- Added a
duration
type - Added support for CBOR encoding and decoding
- Added encoding and decoding functions from and to bytes for data formats:
json.decode
,json.encode
, and similar functions for other formats - Added
array.intersperse
function - Added
str.rev
function - Added
calc.tau
constant - Made bytes joinable and addable
- Made
array.zip
function variadic - Fixed bug with
eval
when themode
was set to"math"
- Fixed bug with
ends-with
function on strings - Fixed bug with destructuring in combination with break, continue, and return
- Fixed argument types of hyperbolic functions, they don't allow angles anymore (Breaking change)
- Renamed some color methods:
rgba
becomesto-rgba
,cmyk
becomesto-cmyk
, andluma
becomesto-luma
(Breaking change)
- Plugins (thanks to @astrale-sharp and @arnaudgolfouse)
-
Export
- Added SVG export (thanks to @Enter-tainer)
- Fixed bugs with PDF font embedding
- Added support for page labels that reflect the page numbering style in the PDF
-
Text and Layout
- Added
highlight
function for highlighting text with a background color - Added
polygon.regular
function for drawing a regular polygon - Added support for tabs in
raw
elements alongsidetab-width
parameter - The layout engine now tries to prevent "runts" (final lines consisting of just a single word)
- Added Finnish translations
- Added hyphenation support for Polish
- Improved handling of consecutive smart quotes of different kinds
- Fixed vertical alignments for
number-align
argument on page function (Breaking change) - Fixed weak pagebreaks after counter updates
- Fixed missing text in SVG when the text font is set to "New Computer Modern"
- Fixed translations for Chinese
- Fixed crash for empty text in show rule
- Fixed leading spaces when there's a linebreak after a number and a comma
- Fixed placement of floating elements in columns and other containers
- Fixed sizing of block containing just a single box
- Added
-
Math
- Added support for augmented matrices
- Removed support for automatic matching of fences like
|
and||
as there were too many false positives. You can use functions likeabs
ornorm
or an explicitlr
call instead. (Breaking change) - Fixed spacing after number with decimal point in math
- Fixed bug with primes in subscript
- Fixed weak spacing
- Fixed crash when text within math contains a newline
-
Tooling and Diagnostics
- Added hints when trying to call a function stored in a dictionary without extra parentheses
- Fixed hint when referencing an equation without numbering
- Added more details to some diagnostics (e.g. when SVG decoding fails)
-
Command line interface
- Added
typst update
command for self-updating the CLI (thanks to @jimvdl) - Added download progress indicator for packages and updates
- Added
--format
argument to explicitly specify the output format - The CLI now respects proxy configuration through environment variables and has a new
--cert
option for setting a custom CA certificate - Fixed crash when field wasn't present and
--one
is passed totypst query
- Added
-
Miscellaneous Improvements
- Added page setup guide
- Added
figure.caption
function that can be used for simpler figure customization (Breaking change becauseit.caption
now renders the full caption with supplement in figure show rules and manual outlines) - Moved
caption-pos
argument tofigure.caption
function and renamed it toposition
(Breaking change) - Added
separator
argument tofigure.caption
function - Added support for combination of and/or and before/after selectors
- Packages can now specify a minimum compiler version they require to work
- Fixed parser bug where method calls could be moved onto their own line for
#let
expressions in markup (Breaking change) - Fixed bugs in sentence and title case conversion for bibliographies
- Fixed supplements for alphanumeric and author-title bibliography styles
- Fixed off-by-one error in APA bibliography style
-
Development
- Made
Span
andFileId
more type-safe so that all error conditions must be handled byWorld
implementors
- Made
Thanks to everyone who contributed to this release: @Beiri22, @bluebear94, @jimvdl, @LuxxxLucy, @mattfbacon, @sitandr, @xkevio, @Dherse, @Enter-tainer, @SimonRask, @4BlueTurtles, @Andrew15-5, @KillTheMule, @LaurenzV, @MDLC01, @NeillJohnston, @PgBiel, @Sett17, @SillyFreak, @abramchikd, @antonWetzel, @arj0019, @astrale-sharp, @damaxwell, @frozolotl, @kingfree, @kiviktnm, @klMse, @lolstork, @owiecc, @pavelzw, @raphCode, @sudormrfbin, @t-rapp, @zicklag, @zyoshoka.
Version 0.7.0 (August 7, 2023)
-
Text and Layout
- Added support for floating figures through the
placement
argument on the figure function - Added support for arbitrary floating content through the
float
argument on the place function - Added support for loading
.sublime-syntax
files as highlighting syntaxes for raw blocks - Added support for loading
.tmTheme
files as highlighting themes for raw blocks - Added bounds option to
top-edge
andbottom-edge
arguments of text function for tight bounding boxes - Removed nonsensical top- and bottom-edge options, e.g. ascender for the bottom edge (Breaking change)
- Added
script
argument to text function - Added
alternative
argument to smart quote function - Added basic i18n for Japanese
- Added hyphenation support for
nb
andnn
language codes in addition tono
- Fixed positioning of placed elements in containers (Breaking change)
- Fixed overflowing containers due to optimized line breaks
- Added support for floating figures through the
-
Export
- Greatly improved export of SVG images to PDF. Many thanks to @LaurenzV for their work on this.
- Added support for the alpha channel of RGBA colors in PDF export
- Fixed a bug with PPI (pixels per inch) for PNG export
-
Math
- Improved layout of primes (e.g. in
$a'_1$
) - Improved display of multi-primes (e.g. in
$a''$
) - Improved layout of roots
- Changed relations to show attachments as limits by default (e.g. in
$a ->^x b$
) - Large operators and delimiters are now always vertically centered
- Boxes in equations now sit on the baseline instead of being vertically centered by default. Notably, this does not affect blocks because they are not inline elements.
- Added support for weak spacing
- Added support for OpenType character variants
- Added support for customizing the math class of content
- Fixed spacing around
.
,\/
, and...
- Fixed spacing between closing delimiters and large operators
- Fixed a bug with math font weight selection
- Symbols and Operators (Breaking changes)
- Added
id
,im
, andtr
text operators - Renamed
ident
toequiv
with aliaseq.triple
and removedident.strict
in favor ofeq.quad
- Renamed
ast.sq
toast.square
andintegral.sq
tointegral.square
- Renamed
.eqq
modifier to.equiv
(and.neqq
to.nequiv
) fortilde
,gt
,lt
,prec
, andsucc
- Added
emptyset
as alias fornothing
- Added
lt.curly
andgt.curly
as aliases forprec
andsucc
- Added
aleph
,beth
, andgimmel
as alias foralef
,bet
, andgimel
- Added
- Improved layout of primes (e.g. in
-
Scripting
- Fields
- Added
abs
andem
field to lengths - Added
ratio
andlength
field to relative lengths - Added
x
andy
field to 2d alignments - Added
paint
,thickness
,cap
,join
,dash
, andmiter-limit
field to strokes
- Added
- Accessor and utility methods
- Added
dedup
method to arrays - Added
pt
,mm
,cm
, andinches
method to lengths - Added
deg
andrad
method to angles - Added
kind
,hex
,rgba
,cmyk
, andluma
method to colors - Added
axis
,start
,end
, andinv
method to directions - Added
axis
andinv
method to alignments - Added
inv
method to 2d alignments - Added
start
argument toenumerate
method on arrays
- Added
- Added
color.mix
function - Added
mode
andscope
arguments toeval
function - Added
bytes
type for holding large byte buffers- Added
encoding
argument to read function to read a file as bytes instead of a string - Added
image.decode
function for decoding an image directly from a string or bytes - Added
bytes
function for converting a string or an array of integers to bytes - Added
array
function for converting bytes to an array of integers - Added support for converting bytes to a string with the
str
function
- Added
- Fields
-
Tooling and Diagnostics
- Added support for compiler warnings
- Added warning when compilation does not converge within five attempts due to intense use of introspection features
- Added warnings for empty emphasis (
__
and**
) - Improved error message for invalid field assignments
- Improved error message after single
#
- Improved error message when a keyword is used where an identifier is expected
- Fixed parameter autocompletion for functions that are in modules
- Import autocompletion now only shows the latest package version until a colon is typed
- Fixed autocompletion for dictionary key containing a space
- Fixed autocompletion for for loops
-
Command line interface
- Added
typst query
subcommand to execute a query on the command line - The
--root
and--font-paths
arguments cannot appear in front of the command anymore (Breaking change) - Local and cached packages are now stored in directories of the form
{namespace}/{name}/{version}
instead of{namespace}/{name}-{version}
(Breaking change) - Now prioritizes explicitly given fonts (via
--font-paths
) over system and embedded fonts when both exist - Fixed
typst watch
not working with some text editors - Fixed displayed compilation time (now includes export)
- Added
-
Miscellaneous Improvements
- Added
bookmarked
argument to heading to control whether a heading becomes part of the PDF outline - Added
caption-pos
argument to control the position of a figure's caption - Added
metadata
function for exposing an arbitrary value to the introspection system - Fixed that a
state
was identified by the pair(key, init)
instead of just itskey
- Improved indent logic of enumerations. Instead of requiring at least as much indent as the end of the marker, they now require only one more space indent than the start of the marker. As a result, even long markers like
12.
work with just 2 spaces of indent. - Fixed bug with indent logic of
raw
blocks - Fixed a parsing bug with dictionaries
- Added
-
Development
- Extracted parser and syntax tree into
typst-syntax
crate - The
World::today
implementation of Typst dependants may need fixing if they have the same bug that the CLI world had
- Extracted parser and syntax tree into
Thanks to everyone who contributed to this release: @damaxwell, @bluebear94, @PgBiel, @Beiri22, @Dherse, @LaurenzV, @Mafii, @adriandelgado, @lolstork, @AlistairKeiller, @DVDTSB, @Enter-tainer, @EpicEricEE, @Liamolucko, @LingMan, @MDLC01, @Myriad-Dreamin, @StrangeGirlMurph, @T0mstone, @TheLukeGuy, @antonWetzel, @epbuennig, @jeffa5, @kg583, @lynn, @mattfbacon, @mavaddat, @neunenak, @pineapplehunter, @raphCode, @sitandr, @sudormrfbin, @tretre91.