Changelog
Version 0.8.0 (September 13, 2023)
-
Scripting
- Plugins (thanks to @astrale-sharp and @arnaudgolfouse)
- 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)
-
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 (continues to work in code) - 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
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
- 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
Version 0.6.0 (June 30, 2023)
-
Package Management
- Typst now has built-in package management
- You can import published community packages or create and use system-local ones
- Published packages are also supported in the web app
-
Math
- Added support for optical size variants of glyphs in math mode
- Added argument to enable
limits
conditionally depending on whether the equation is set indisplay
orinline
style - Added
gt.eq.slant
andlt.eq.slant
symbols - Increased precedence of factorials in math mode (
$1/n!$
works correctly now) - Improved underlines and overlines in math mode
- Fixed usage of
limits
function in show rules - Fixed bugs with line breaks in equations
-
Text and Layout
- Added support for alternating page margins with the
inside
andoutside
keys - Added support for specifying the page
binding
- Added
to
argument to pagebreak function to skip to the next even or odd page - Added basic i18n for a few more languages (TR, SQ, TL)
- Fixed bug with missing table row at page break
- Fixed bug with underlines
- Fixed bug superfluous table lines
- Fixed smart quotes after line breaks
- Fixed a crash related to text layout
- Added support for alternating page margins with the
-
Command line interface
- Breaking change: Added requirement for
--root
/TYPST_ROOT
directory to contain the input file because it designates the project root. Existing setups that useTYPST_ROOT
to emulate package management should switch to local packages - Breaking change: Now denies file access outside of the project root
- Added support for local packages and on-demand package download
- Now watches all relevant files, within the root and all packages
- Now displays compilation time
- Breaking change: Added requirement for
-
Miscellaneous Improvements
- Added
outline.entry
to customize outline entries with show rules - Added some hints for error messages
- Added some missing syntaxes for
raw
highlighting - Improved rendering of rotated images in PNG export and web app
- Made footnotes reusable and referenceable
- Fixed bug with citations and bibliographies in
locate
- Fixed inconsistent tense in documentation
- Added
-
Development
- Added contribution guide
- Reworked
World
interface to accommodate for package management and make it a bit simpler to implement (Breaking change for implementors)
Version 0.5.0 (June 9, 2023)
-
Text and Layout
- Added
raw
syntax highlighting for many more languages - Added support for Korean numbering
- Added basic i18n for a few more languages (NL, SV, DA)
- Improved line breaking for East Asian languages
- Expanded functionality of outline
indent
property - Fixed footnotes in columns
- Fixed page breaking bugs with footnotes
- Fixed bug with handling of footnotes in lists, tables, and figures
- Fixed a bug with CJK punctuation adjustment
- Fixed a crash with rounded rectangles
- Fixed alignment of
line
elements
- Added
-
Math
- Breaking change: The syntax rules for mathematical attachments were improved:
$f^abs(3)$
now parses as$f^(abs(3))$
instead of$(f^abs)(3)$
. To disambiguate, add a space:$f^zeta (3)$
. - Added forced size commands for math (e.g.,
display
) - Added
supplement
parameter toequation
, used by references - New symbols:
bullet
,xor
,slash.big
,sigma.alt
,tack.r.not
,tack.r.short
,tack.r.double.not
- Fixed a bug with symbols in matrices
- Fixed a crash in the
attach
function
- Breaking change: The syntax rules for mathematical attachments were improved:
-
Scripting
- Added new
datetime
type anddatetime.today
to retrieve the current date - Added
str.from-unicode
andstr.to-unicode
functions - Added
fields
method on content - Added
base
parameter tostr
function - Added
calc.exp
andcalc.ln
- Improved accuracy of
calc.pow
andcalc.log
for specific bases - Fixed removal order for dictionary
- Fixed
.at(default: ..)
for strings and content - Fixed field access on styled elements
- Removed deprecated
calc.mod
function
- Added new
-
Command line interface
- Added PNG export via
typst compile source.typ output-{n}.png
. The output path must contain{n}
if the document has multiple pages. - Added
--diagnostic-format=short
for Unix-style short diagnostics - Doesn't emit color codes anymore if stderr isn't a TTY
- Now sets the correct exit when invoked with a non-existent file
- Now ignores UTF-8 BOM in Typst files
- Added PNG export via
-
Miscellaneous Improvements
- Improved errors for mismatched delimiters
- Improved error message for failed length comparisons
- Fixed a bug with images not showing up in Apple Preview
- Fixed multiple bugs with the PDF outline
- Fixed citations and other searchable elements in
hide
- Fixed bugs with reference supplements
- Fixed Nix flake
Version 0.4.0 (May 20, 2023)
-
Footnotes
- Implemented support for footnotes
- The
footnote
function inserts a footnote - The
footnote.entry
function can be used to customize the footnote listing - The
"chicago-notes"
citation style is now available
-
Documentation
- Added a Guide for LaTeX users
- Now shows default values for optional arguments
- Added richer outlines in "On this Page"
- Added initial support for search keywords: "Table of Contents" will now find the outline function. Suggestions for more keywords are welcome!
- Fixed issue with search result ranking
- Fixed many more small issues
-
Math
- Breaking change: Alignment points (
&
) in equations now alternate between left and right alignment - Added support for writing roots with Unicode: For example,
$root(x+y)$
can now also be written as$√(x+y)$
- Fixed uneven vertical
attachment
alignment - Fixed spacing on decorated elements (e.g., spacing around a canceled operator)
- Fixed styling for stretchable symbols
- Added
tack.r.double
,tack.l.double
,dotless.i
anddotless.j
symbols - Fixed show rules on symbols (e.g.
show sym.tack: set text(blue)
) - Fixed missing rename from
ast.op
toast
that should have been in the previous release
- Breaking change: Alignment points (
-
Scripting
- Added function scopes: A function can now hold related definitions in its own scope, similar to a module. The new
assert.eq
function, for instance, is part of theassert
function's scope. Note that function scopes are currently only available for built-in functions. - Added
assert.eq
andassert.ne
functions for simpler equality and inequality assertions with more helpful error messages - Exposed list, enum, and term list items in their respective functions' scope
- The
at
methods on strings, arrays, dictionaries, and content now support specifying a default value - Added support for passing a function to
replace
that is called with each match. - Fixed replacement strings: They are now inserted completely verbatim instead of supporting the previous (unintended) magic dollar syntax for capture groups
- Fixed bug with trailing placeholders in destructuring patterns
- Fixed bug with underscore in parameter destructuring
- Fixed crash with nested patterns and when hovering over an invalid pattern
- Better error messages when casting to an integer or float fails
- Added function scopes: A function can now hold related definitions in its own scope, similar to a module. The new
-
Text and Layout
- Implemented sophisticated CJK punctuation adjustment
- Disabled overhang for CJK punctuation
- Added basic translations for Traditional Chinese
- Fixed alignment of text inside raw blocks (centering a raw block, e.g. through a figure, will now keep the text itself left-aligned)
- Added support for passing a array instead of a function to configure table cell alignment and fill per column
- Fixed automatic figure
kind
detection - Made alignment of enum numbers configurable, defaulting to
end
- Figures can now be made breakable with a show-set rule for blocks in figure
- Initial fix for smart quotes in RTL languages
-
Export
- Fixed ligatures in PDF export: They are now copyable and searchable
- Exported PDFs now embed ICC profiles for images that have them
- Fixed export of strokes with zero thickness
-
Web app
- Projects can now contain folders
- Added upload by drag-and-drop into the file panel
- Files from the file panel can now be dragged into the editor to insert them into a Typst file
- You can now copy-paste images and other files from your computer directly into the editor
- Added a button to resend confirmation email
- Added an option to invert preview colors in dark mode
- Added tips to the loading screen and the Help menu. Feel free to propose more!
- Added syntax highlighting for YAML files
- Allowed middle mouse button click on many buttons to navigate into a new tab
- Allowed more project names
- Fixed overridden Vim mode keybindings
- Fixed many bugs regarding file upload and more
-
Miscellaneous Improvements
- Improved performance of counters, state, and queries
- Improved incremental parsing for more efficient recompilations
- Added support for
.yaml
extension in addition to.yml
for bibliographies - The CLI now emits escape codes only if the output is a TTY
- For users of the
typst
crate: TheDocument
is nowSync
again and theWorld
doesn't have to be'static
anymore
Version 0.3.0 (April 26, 2023)
-
Breaking changes:
- Renamed a few symbols: What was previous
dot.op
is now justdot
and the basic dot isdot.basic
. The same applies toast
andtilde
. - Renamed
mod
torem
to more accurately reflect the behaviour. It will remain available asmod
until the next update as a grace period. - A lone underscore is not a valid identifier anymore, it can now only be used in patterns
- Removed
before
andafter
arguments fromquery
. This is now handled through flexible selectors combinator methods - Added support for attachments (sub-, superscripts) that precede the base symbol. The
top
andbottom
arguments have been renamed tot
andb
.
- Renamed a few symbols: What was previous
-
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
, andproduct
methods for arrays - Added
fact
,perm
,binom
,gcd
,lcm
,atan2
,quo
,trunc
, andfract
calculation
-
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_PATHS
andTYPST_ROOT
- The output of
typst fonts
now includes the embedded fonts
- Font path and compilation root can now be set with the environment variables
-
Development
- Added instrumentation for debugging and optimization
- Added
--update
flag andUPDATE_EXPECT
environment variable to update reference images for tests - You can now run a specific subtest with
--subtest
- Tests now run on multiple threads
Version 0.2.0 (April 11, 2023)
-
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.
- Removed support for iterating over index and value in for loops. This is now handled via unpacking and enumerating. Same goes for the
-
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
key
parameter tosorted
method
- Added unpacking syntax for let bindings, which allows things like
-
Command line interface
- Fixed
--open
flag blocking the program - New Computer Modern font is now embedded into the binary
- Shell completions and man pages can now be generated by setting the
GEN_ARTIFACTS
environment variable to a target directory and then building Typst
- Fixed
-
Miscellaneous improvements
- Fixed page numbering in outline
- Added basic i18n for a few more languages (AR, NB, CS, NN, PL, SL, ES, UA, VI)
- Added a few numbering patterns (Ihora, Chinese)
- Added
sinc
operator - 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
andfrak
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
Version 0.1.0 (April 04, 2023)
-
Breaking changes:
- When using the CLI, you now have to use subcommands:
typst compile file.typ
ortypst c file.typ
to create a PDFtypst watch file.typ
ortypst w file.typ
to compile and watchtypst fonts
to 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"
- When using the CLI, you now have to use subcommands:
-
Figure improvements
- Figures now automatically detect their content and adapt their behaviour. 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
- The
-
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
--open
flag 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
- Added
March 28, 2023
-
Breaking changes:
- Enumerations now require a space after their marker, that is,
1.ok
must now be written as1. ok
- Changed default style for term lists: Does not include a colon anymore and has a bit more indent
- Enumerations now require a space after their marker, that is,
-
Command line interface
- Added
--font-path
argument for CLI - Embedded default fonts in CLI binary
- Fixed build of CLI if
git
is not installed
- Added
-
Miscellaneous improvements
- Added support for disabling matrix and vector delimiters. Generally with
#set math.mat(delim: none)
or one-off with$mat(delim: #none, 1, 2; 3, 4)$
. - Added
separator
argument to term lists - Added
round
function for equations - Numberings now allow zeros. To reset a counter, you can write
#counter(..).update(0)
- Added documentation for
page()
andposition()
methods onlocation
type - Added symbols for double, triple, and quadruple dot accent
- Added smart quotes for Norwegian Bokmål
- Added Nix flake
- Fixed bibliography ordering in IEEE style
- Fixed parsing of decimals in math:
$1.2/3.4$
- Fixed parsing of unbalanced delimiters in fractions:
$1/(2 (x)$
- Fixed unexpected parsing of numbers as enumerations, e.g. in
1.2
- Fixed combination of page fill and header
- Fixed compiler crash if
repeat
is used in page with automatic width - Fixed matrices with explicit delimiter
- Fixed
indent
property of term lists - Numerous documentation fixes
- Links in bibliographies are now affected by link styling
- Fixed hovering over comments in web app
- Added support for disabling matrix and vector delimiters. Generally with
March 21, 2023
-
Reference and bibliography management
- Bibliographies and citations (currently supported styles are APA, Chicago Author Date, IEEE, and MLA)
- You can now reference sections, figures, formulas, and works from the bibliography with
@label
- You can make an element referenceable with a label:
= Introduction <intro>
$ A = pi r^2 $ <area>
-
Introspection system for interactions between different parts of the document
counter
function- Access and modify counters for pages, headings, figures, and equations
- Define and use your own custom counters
- Time travel: Find out what the counter value was or will be at some other point in the document (e.g. when you're building a list of figures, you can determine the value of the figure counter at any given figure).
- Counters count in layout order and not in code order
state
function- Manage arbitrary state across your document
- Time travel: Find out the value of your state at any position in the document
- State is modified in layout order and not in code order
query
function- Find all occurrences of an element or a label, either in the whole document or before/after some location
- Link to elements, find out their position on the pages and access their fields
- Example use cases: Custom list of figures or page header with current chapter title
locate
function- Determines the location of itself in the final layout
- Can be accessed to get the
page
andx
,y
coordinates - Can be used with counters and state to find out their values at that location
- Can be used with queries to find elements before or after its location
-
New
measure
function- Measure the layouted size of elements
- To be used in combination with the new
style
function that lets you generate different content based on the style context something is inserted into (because that affects the measured size of content)
-
Exposed content representation
- Content is not opaque anymore
- Content can be compared for equality
- The tree of content elements can be traversed with code
- Can be observed in hover tooltips or with
repr
- New methods on content:
func
,has
,at
, andlocation
- All optional fields on elements are now settable
- More uniform field names (
heading.title
becomesheading.body
,list.items
becomeslist.children
, and a few more changes)
-
Further improvements
- Added
figure
function - Added
numbering
parameter on equation function - Added
numbering
andnumber-align
parameters on page function - The page function's
header
andfooter
parameters do not take functions anymore. If you want to customize them based on the page number, use the newnumbering
parameter orcounter
function instead. - Added
footer-descent
andheader-ascent
parameters - Better default alignment in header and footer
- Fixed Arabic vowel placement
- Fixed PDF font embedding issues
- Renamed
math.formula
tomath.equation
- Font family must be a named argument now:
#set text(font: "..")
- Added support for hanging indent
- Renamed paragraph
indent
tofirst-line-indent
- More accurate logarithm when base is
2
or10
- Improved some error messages
- Fixed layout of
terms
list
- Added
-
Web app improvements
- Added template gallery
- Added buttons to insert headings, equations, raw blocks, and references
- Jump to the source of something by clicking on it in the preview panel (works for text, equations, images, and more)
- You can now upload your own fonts and use them in your project
- Hover debugging and autocompletion now takes multiple files into account and works in show rules
- Hover tooltips now automatically collapse multiple consecutive equal values
- The preview now automatically scrolls to the right place when you type
- Links are now clickable in the preview area
- Toolbar, preview, and editor can now all be hidden
- Added autocompletion for raw block language tags
- Added autocompletion in SVG files
- New back button instead of four-dots button
- Lots of bug fixes
February 25, 2023
- Font changes
- New default font: Linux Libertine
- New default font for raw blocks: DejaVu Sans Mono
- New default font for math: Book weight of New Computer Modern Math
- Lots of new math fonts available
- Removed Latin Modern fonts in favor of New Computer Modern family
- Removed unnecessary smallcaps fonts which are already accessible through the corresponding main font and the
smallcaps
function
- Improved default spacing for headings
- Added
panic
function - Added
clusters
andcodepoints
methods for strings - Support for multiple authors in
set document
- Fixed crash when string is accessed at a position that is not a char boundary
- Fixed semicolon parsing in
#var ;
- Fixed incremental parsing when inserting backslash at end of
#"abc"
- Fixed names of a few font families (including Noto Sans Symbols and New Computer Modern families)
- Fixed autocompletion for font families
- Improved incremental compilation for user-defined functions
February 15, 2023
- Box and block have gained
fill
,stroke
,radius
, andinset
properties - Blocks may now be explicitly sized, fixed-height blocks can still break across pages
- Blocks can now be configured to be
breakable
or not - Numbering style can now be configured for nested enums
- Markers can now be configured for nested lists
- The
eval
function now expects code instead of markup and returns an arbitrary value. Markup can still be evaluated by surrounding the string with brackets. - PDFs generated by Typst now contain XMP metadata
- Link boxes are now disabled in PDF output
- Tables don't produce small empty cells before a pagebreak anymore
- Fixed raw block highlighting bug
February 12, 2023
- Shapes, images, and transformations (move/rotate/scale/repeat) are now block-level. To integrate them into a paragraph, use a
box
as with other elements. - A colon is now required in an "everything" show rule: Write
show: it => ..
instead ofshow it => ..
. This prevents intermediate states that ruin your whole document. - Non-math content like a shape or table in a math formula is now centered vertically
- Support for widow and orphan prevention within containers
- Support for RTL in lists, grids, and tables
- Support for explicit
auto
sizing for boxes and shapes - Support for fractional (i.e.
1fr
) widths for boxes - Fixed bug where columns jump to next page
- Fixed bug where list items have no leading
- Fixed relative sizing in lists, squares and grid auto columns
- Fixed relative displacement in
place
function - Fixed that lines don't have a size
- Fixed bug where
set document(..)
complains about being after content - Fixed parsing of
not in
operation - Fixed hover tooltips in math
- Fixed bug where a heading show rule may not contain a pagebreak when an outline is present
- Added
baseline
property onbox
- Added
tg
andctg
operators in math - Added delimiter setting for
cases
function - Parentheses are now included when accepting a function autocompletion
February 2, 2023
- Merged text and math symbols, renamed a few symbols (including
infty
toinfinity
with the aliasoo
) - Fixed missing italic mappings
- Math italics correction is now applied properly
- Parentheses now scale in
$zeta(x/2)$
- Fixed placement of large root index
- Fixed spacing in
$abs(-x)$
- Fixed inconsistency between text and identifiers in math
- Accents are now ignored when positioning superscripts
- Fixed vertical alignment in matrices
- Fixed
text
set rule inraw
show rule - Heading and list markers now parse consistently
- Allow arbitrary math directly in content
January 30, 2023
Go to the announcement blog post.
- New expression syntax in markup/math
- Blocks cannot be directly embedded in markup anymore
- Like other expressions, they now require a leading hashtag
- More expressions available with hashtag, including literals (
#"string"
) as well as field access and method call without space:#emoji.face
- New import syntax
#import "module.typ"
creates binding namedmodule
#import "module.typ": a, b
or#import "module.typ": *
to import items#import emoji: face, turtle
to import from already bound module
- New symbol handling
- Removed symbol notation
- Symbols are now in modules:
sym
,emoji
, andmath
- Math module also reexports all of
sym
- Modified through field access, still order-independent
- Unknown modifiers are not allowed anymore
- Support for custom symbol definitions with
symbol
function - Symbols now listed in documentation
- New
math
module- Contains all math-related functions
- Variables and function calls directly in math (without hashtag) access this module instead of the global scope, but can also access local variables
- Can be explicitly used in code, e.g.
#set math.vec(delim: "[")
- Delimiter matching in math
- Any opening delimiters matches any closing one
- When matched, they automatically scale
- To prevent scaling, escape them
- To forcibly match two delimiters, use
lr
function - Line breaks may occur between matched delimiters
- Delimiters may also be unbalanced
- You can also use the
lr
function to scale the brackets (or just one bracket) to a specific size manually
- Multi-line math with alignment
- The
\
character inserts a line break - The
&
character defines an alignment point - Alignment points also work for underbraces, vectors, cases, and matrices
- Multiple alignment points are supported
- The
- More capable math function calls
- Function calls directly in math can now take code expressions with hashtag
- They can now also take named arguments
- Within math function calls, semicolons turn preceding arguments to arrays to support matrices:
$mat(1, 2; 3, 4)$
- Arbitrary content in math
- Text, images, and other arbitrary content can now be embedded in math
- Math now also supports font fallback to support e.g. CJK and emoji
- More math features
- New text operators:
op
function,lim
,max
, etc. - New matrix function:
mat
- New n-ary roots with
root
function:$root(3, x)$
- New under- and overbraces, -brackets, and -lines
- New
abs
andnorm
functions - New shorthands:
[|
,|]
, and||
- New
attach
function, overridable attachments withscript
andlimit
- Manual spacing in math, with
h
,thin
,med
,thick
andquad
- Symbols and other content may now be used like a function, e.g.
$zeta(x)$
- Added Fira Math font, removed Noto Sans Math font
- Support for alternative math fonts through
#show math.formula: set text("Fira Math")
- New text operators:
- More library improvements
- New
calc
module,abs
,min
,max
,even
,odd
andmod
moved there - New
message
argument onassert
function - The
pairs
method on dictionaries now returns an array of length-2 arrays instead of taking a closure - The method call
dict.at("key")
now always fails if"key"
doesn't exist Previously, it was allowed in assignments. Alternatives aredict.key = x
anddict.insert("key", x)
.
- New
- Smarter editor functionality
- Autocompletion for local variables
- Autocompletion for methods available on a value
- Autocompletion for symbols and modules
- Autocompletion for imports
- Hover over an identifier to see its value(s)
- Further editor improvements
- New Font menu with previews
- Single projects may now be shared with share links
- New dashboard experience if projects are shared with you
- Keyboard Shortcuts are now listed in the menus and there are more of them
- New Offline indicator
- Tooltips for all buttons
- Improved account protection
- Moved Status indicator into the error list button
- Further fixes
- Multiple bug fixes for incremental parser
- Fixed closure parameter capturing
- Fixed tons of math bugs
- Bugfixes for performance, file management, editing reliability
- Added redirection to the page originally navigated to after signin