7.4 KiB
7.4 KiB
| description |
|---|
| Learn what has changed in the latest Typst releases and move your documents forward. |
Changelog
February 15, 2023
- Box and block have gained
fill,stroke,radius, andinsetproperties - Blocks may now be explicitly sized, fixed-height blocks can still break across pages
- Blocks can now be configured to be
breakableor not - Numbering style can now be configured for nested enums
- Markers can now be configured for nested lists
- The
evalfunction 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
boxas with other elements. - A colon is now required in an "everything" show rule: Write
{show: it => ..}instead of{show it => ..}. This prevents intermediate states that ruin your whole document. - Non-math content like a shape or table in a math formula is now centered vertically
- Support for widow and orphan prevention within containers
- Support for RTL 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
placefunction - 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
baselineproperty onbox - Added
tgandctgoperators in math - Added delimiter setting for
casesfunction - Parentheses are now included when accepting a function autocompletion
February 2, 2023
- Merged text and math symbols, renamed a few symbols
(including
inftytoinfinitywith 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
textset rule inrawshow 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}, and{math} - Math module also reexports all of
{sym} - Modified through field access, still order-independent
- Unknown modifiers are not allowed anymore
- Support for custom symbol definitions with
symbolfunction - 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
lrfunction - Line breaks may occur between matched delimiters
- Delimiters may also be unbalanced
- You can also use the
lrfunction 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:
opfunction,lim,max, etc. - New matrix function:
mat - New n-ary roots with
rootfunction:[$root(3, x)$] - New under- and overbraces, -brackets, and -lines
- New
absandnormfunctions - New shorthands:
[|,|], and|| - New
attachfunction, overridable attachments withscriptandlimit - Manual spacing in math, with
h,thin,med,thickandquad - 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
calcmodule,abs,min,max,even,oddandmodmoved there - New
messageargument on{assert}function - The
pairsmethod on dictionaries now returns an array of length-2 arrays instead of taking a closure - The method call
{dict.at("key")}now always fails if"key"doesn't exist Previously, it was allowed in assignments. Alternatives are{dict.key = x}and{dict.insert("key", x)}.
- 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