Typst 0.15.0
Hacker News Grade 10 1h ago

Typst 0.15.0

Comments

Typst 0.15.0 (June 15, 2026) This section documents all changes to the Typst language and compiler between Typst 0.14.2 and 0.15.0. If you are migrating an existing document to Typst 0.15, make sure to check out the Migration guide. It walks you through changes you may need to make to your existing documents to ensure compatibility with Typst 0.15. Highlights - Typst now supports variable fonts - HTML export now supports equations out of the box via MathML - With the new, experimental bundle export target, a single Typst project can output multiple files (e.g. a multi-page website) - A single document can now contain multiple bibliographies - Typst can now target multiple PDF standards at once - The new within selector simplifies many introspection use cases - The new divider element represents a thematic break that templates can style - Spot colors enable use of custom pigments in offset printing - With the new file path type, project-relative paths can be passed to packages - The new, more general typst eval CLI subcommand supersedestypst query - Layout convergence issues now result in detailed diagnostics - Two long-standing list layout issues with marker alignment and centering were fixed - Paragraph handling in HTML export is improved, preventing unexpected paragraphs from appearing - This documentation now has a print version Language Syntax - File paths (e.g. in imports or image function calls) may not contain backslashes anymore; instead forward slashes must be used (Breaking change) - Added hints for invalid characters in code mode - Added hint when trying to use a unary operator directly in an embedded expression using a hash (e.g. #-30deg ) - Fixed potential stack overflow crashes by enforcing a maximum parsing depth - Fixed incremental parsing of unclosed strings Styling - Text show rules now have tracebacks that include the matched text - Fixed a crash with text show rules that match on multi-character symbols Scripting - Extended hint when built-in definitions are shadowed to set and show rules - Added hint when trying to spread one or multiple dictionaries into an array - Improved diagnostics for invalid method calls - Improved hint for unknown variables in math that are available in std - Fixed a misleading error message when trying to assign to a temporary return value Library Foundations Added file path type that is now accepted in all places where paths were previously only represented as strings- A path constructed in one file can be used in another file, but will be resolved relative to its original file - Likewise, paths can be passed across package boundaries - The initial path type is very minimal, but additional features like file existence checks or directory walking are planned Collections - Added map andfilter functions on dictionaries and arguments - Named arguments on arguments values are now accessible with field access syntax - The slice functions on strings and arrays will now error if passing both anend and acount (Minor breaking change) - Added inclusive parameter torange function - Added Calculation - Added asinh ,acosh ,atanh , anderf functions tocalc module - Added int.min andint.max constants for the minimum and maximum representable integer, respectively - Fixed behavior of quo for negative integers - Fixed potential overflows in norm ,abs ,gcd , andlcm - Floating-point calculations are now consistently deterministic across platforms - Added Date & time handling - The offset parameter ofdatetime.today now accepts durations as an alternative to integers, allowing for sub-hour precision offsets - Addition and subtraction of datetimes and durations now retains precision instead of clamping to full days in some cases - The datetime constructor now emits more precise errors when components are missing - The Conversions - Added base parameter toint constructor to configure in which base to parse a string - Fixed that the base parameter of thestr constructor was accepted for non-integer values if its value was10 (Minor breaking change) - Added hint when trying to construct a string with base 1 - Added - The panic function now displays strings as-is instead of showing theirrepr , making it more suitable for friendly, user-facing messages - Changed repr of styles and locations to be more distinct Model - Added divider element representing a thematic break that templates can style Bundle-related elements Bibliography management - A single document can now contain multiple bibliographies - Added target parameter tobibliography element to configure which citation is picked up by which bibliography - Added group parameter tobibliography element to configure how numbers are shared/reset across bibliographies - Added support for numeric values for the month key in.bib files - Added support for BibLaTeX name options in .bib files - Added support for propagating non-numeric volume fields in.bib files to bibliographies - Improved sorting in bibliographies to take into account language conventions - Improved interoperability with CSL styles; for a full listing of changes, review the Hayagriva 0.10.0 changelog - Added support for setting directors on videos without a parent in Hayagriva YAML files - Improved handling of Anthos entries in Hayagriva YAML files by treating them aschapter s in CSL Footnotes - The link of a footnote is now within the superscript instead of around it, improving PDF tagging and HTML output - The thickness of the default footnote separator is now specified in font-relative instead of absolute units - The link of a Numbering - The par.first-line-indent property will now fold, meaning that partial dictionaries across different set rules orpar calls are combined Added list.marker-align property for defining how to align list markers- When omitted, it will default to the new baseline alignment (vertically), combined with end alignment (horizontally) - When omitted, it will default to the new baseline alignment (vertically), combined with Text Added support for variable fonts - The well-known variation axes ital ,slnt ,wght ,wdth , andopsz are automatically set based on textweight ,stretch ,style , andsize - Custom variations can be configured via the new variations parameter of thetext function - When using a variable font with Typst, the suffixes β€œVariable”, β€œVar”, and β€œVF” should be omitted as Typst trims them to unify static and variable fonts into a single family (Minor breaking change) - The well-known variation axes Font features - The text.alternates parameter now accepts an integer in addition to a boolean to select stylistic alternates other than0 and1 - Parsing of tag names in text.features is now more strict (Minor breaking change) - The - Fixed that context text.font did not reflect thecovers field - Fixed uneven CJK-Latin spacing in justified paragraphs - Fixed a bug where the lorem function would not produce the exact number of requested words - Improved translations for Swedish , Portuguese , Czech , Latvian , Slovak , Polish , Vietnamese , Finnish , and Welsh - Added font exception to avoid SimSun-ExtB being incorrectly merged with SimSun Updated New Computer Modern fonts to version 8.1.0 - This update changes the default look of calligraphic letterforms in the math font; the previous style can be restored through show math.equation: set text(stylistic-set: 6) - This update changes the default look of calligraphic letterforms in the math font; the previous style can be restored through - In particular, this fixed an issue with linebreaking of guillemets Math Layout - Improved layout of under/over elements like underbrace - Slightly improved spacing around math.op elements - In which situations cramped styles (with tighter spacing) are applied is now fully consistent with TeX and MathML Core - The size parameter of thelr function now consistently applies to middle delimiters in the same way it does to outer delimiters - The size parameter of thelr function now resolves relatively to the height of just the inner content; it does not take the delimiters into account anymore (Minor breaking change) - Glyph stretching is now always relative to the base glyph rather than a potentially already scaled version (e.g. due to display sizing) (Minor breaking change) - Fixed left/right alignment not being applied correctly due to spacing next to alignment points - The binom element now uses different OpenType constants for layout; though this does not lead to visible changes with most fonts - The default length and stroke width of math.cancel lines is now specified in font-relative instead of absolute units - Fixed potential misalignment in cases function - Improved layout of under/over elements like Text handling - Improved handling of multi-character symbols in math - Fixed that some glyphs did not stretch correctly in script sizes - Fraction, root, and under/over lines now respect text.stroke - Accents in math are now always rendered in front of their base if they overlap - The class function now applies the class only to its direct body rather than recursively (Minor breaking change) - More delimiter symbols (e.g. chevron.l ) are now callable to produce anlr element (Minor breaking change) - Fixed various bugs with rendering of mathematical expressions that look like function calls but in reality aren’t (e.g. $pi(1, 2)$ , sincepi is not a function) - Fixed a bug with ordering of primes and nested attachments Symbols - Added many new symbols and variants. View the codex 0.3.0 changelog for a full listing. Layout Baseline information is now retained in many more parts of the layout engine (Breaking change) - In particular, text contained in a box with an inset is now aligned with the text surrounding thebox - This also fixes a bug where wrapping an inline equation in a box would shift its baseline - Similarly, using a block in an equation will keep the baseline intact - Last but not least, the marker/number and item of a list orenum are now properly baseline-align

Comments

No comments yet. Start the discussion.