Typst
Typst is a programmable, markup-based typesetting engine designed for professional document creation. It functions as a scriptable publishing toolchain that transforms plain text and code into complex, paginated outputs. By utilizing a high-performance compiler, the system automates document assembly, mathematical rendering, and dynamic content generation, providing a unified workflow for academic and technical authoring.
The engine distinguishes itself through a declarative layout framework that uses cascading rules to manage document structure and visual styling. Unlike traditional systems, it employs an incremental layout engine that performs multiple passes to resolve cross-references, counters, and dynamic content placement. This is supported by a sandboxed functional scripting runtime, which allows users to define custom logic for data processing and layout manipulation, ensuring that document state remains consistent throughout the compilation process.
The system provides a comprehensive suite of tools for managing document elements, including automated bibliography generation, structured table creation, and hierarchical sectioning. It supports precise control over page geometry and typography, while its introspection capabilities allow for advanced querying of document state and element locations. These features are complemented by a robust set of foundational data management primitives, enabling users to handle complex collections, numeric data, and time-based logic within their documents.
The project provides a command-line interface for compiling source files into portable formats like PDF, with built-in support for accessibility standards. Detailed documentation, including syntax references and architectural overviews, is available to guide users through the installation and implementation of the typesetting environment.
Features
- Dictionaries - Typst creates and manipulates collections of key-value pairs where keys are strings, supporting dynamic access, iteration, merging, and conversion from other dictionary-like structures.
- Array Manipulations - Typst constructs and manipulates sequences of values, supporting mixed types, indexing, and various transformation methods like mapping, filtering, and flattening.
- Array Enumeration Utilities - Typst pairs each element in an array with its corresponding index, starting from a specified value to track positions during collection processing and transformation tasks.
- Array Utilities - Typst retrieves the total number of elements currently stored within an array to determine the size of the collection for iteration or logic checks.
- Document Generation Engines - Building dynamic documents by using scripting logic to process data, manipulate content collections, and automate repetitive formatting tasks.
- Constraint-Based Layout Systems - Content is positioned using a flexible grid and box model that calculates element dimensions and alignment based on parent constraints.
- Table Generation Systems - Typst arranges related data into organized grids with custom headers and footers while ensuring screen readers can navigate the information effectively for improved accessibility.
- Markup-Based Typesetting Engines - A document preparation system that transforms plain text and code into professional-grade layouts using a declarative scripting language.
- Document Compilers - A [gentle introduction][tutorial] to Typst is available in our documentation. However, if you want to see the power of Typst encapsulated in one image, here it is: Let's dissect what's going on: - We use _set rules_ to c
- Document State Management - Typst maintains persistent values across a document using a key-based system that tracks updates based on the final layout order rather than the code sequence.
- Incremental Layout Engines - The system performs multiple passes over the document to resolve cross-references, counters, and dynamic content placement during rendering.
- Programmable Document Compilers - A high-performance engine that processes structured source files into complex, paginated outputs with integrated logic and dynamic content generation.
- Declarative Styling Rules - Formatting is applied through a cascading system of set and show rules that modify element properties based on document structure.
- Typesetting Languages - A [gentle introduction][tutorial] to Typst is available in our documentation. However, if you want to see the power of Typst encapsulated in one image, here it is: Let's dissect what's going on: - We use _set rules_ to c
- Function Invocation Mechanisms - Typst invokes functions by passing positional or named arguments in parentheses or by appending content blocks to perform tasks and apply styling rules.
- Equation Renderers - Typst displays complex math expressions as inline text or centered blocks with automatic numbering and consistent styling for clear scientific communication.
- Formula Typesetters - Typst formats advanced mathematical notation using specialized syntax that supports variables, symbols, and alignment for precise representation of complex scientific concepts.
- Scriptable Publishing Toolchains - A command-line environment that combines text processing, mathematical rendering, and automated document assembly into a unified, fast workflow.
- Professional Typesetting Workflows - Designing high-quality, print-ready documents with precise control over page geometry, typography, and visual element alignment.
- Academic Authoring - Creating professional research papers, theses, and technical reports with automated citations, complex mathematical notation, and structured layout management.
- Document Sectioning - Typst organizes content into hierarchical levels using headings that support automatic numbering and custom styling to improve document navigation and accessibility for readers.
- PDF Exports - Typst converts finished documents into portable files while specifying page ranges, accessibility tags, and industry standards for professional distribution and printing.
- Page Layout Configurations - Typst defines document dimensions, margins, and headers to control how content flows across pages and ensure that outputs meet specific size and formatting requirements.
- Block Containers - Typst groups related content into distinct sections by applying borders, background colors, and sizing constraints to manage how text and images flow within a defined layout area.
- Grid Systems - Typst organizes complex layouts into rows and columns using flexible sizing units to maintain consistent spacing and alignment for elements placed within a structured grid system.
- Alignment Engines - Typst positions text and media blocks horizontally or vertically within a document by applying alignment rules to ensure a balanced and professional visual structure.
- Document Scripting Languages - A [gentle introduction][tutorial] to Typst is available in our documentation. However, if you want to see the power of Typst encapsulated in one image, here it is: Let's dissect what's going on: - We use _set rules_ to c
- Intermediate Representations - The source code is parsed into a structured tree of nodes that separates document content from its final visual layout.
- Document Counters - Typst displays sequential numbers for items like headings or pages by maintaining contextual state that updates automatically as the document renders on the page.
- Document Element Locators - Typst identifies the exact position of specific content within a document to enable accurate cross-referencing and contextual lookups during the layout process.
- Document Counters - Typst tracks sequential values for pages, sections, or figures by defining custom counters that update automatically as the document content flows and grows.
- Declarative Layouts - A design environment where content structure and visual styling are defined through reusable rules and hierarchical composition patterns.
- Data Management Primitives - Typst utilizes foundational data types and core computational functions to manage logic, process numeric data, handle time, and evaluate dynamic code within the environment.
- Functional Scripting Runtimes - A sandboxed interpreter executes user-defined logic and styling rules to transform document data into a final visual representation.
- Document State Engines - The engine maintains a persistent global state that tracks counters and metadata across the entire document flow during compilation.
- Text Formatters - Typst adjusts font properties, colors, and spacing to improve readability and visual hierarchy, ensuring that all text elements follow consistent design standards.
- Bibliography Generators - Typst compiles lists of cited works by referencing external bibliography files and automatically filtering the final output to include only the sources mentioned in the text.
- Symbol Insertors - Typst adds unique characters and icons to text by typing shorthand names that automatically convert into the correct visual glyphs during the rendering process.
- Accessible Document Creation - Structuring digital content with semantic hierarchies and machine-readable metadata to ensure compatibility with screen readers and assistive technologies.
- Captioned Figure Managers - Typst organizes visual content by adding descriptive labels that automatically track numbering sequences for different types of media like images and tables throughout a document.
- Automated Tables of Contents - Typst builds tables of contents or lists of figures by scanning the document for specific headings and displaying their titles alongside corresponding page numbers.
- Document Element Querying - Typst searches for specific content using labels or types to retrieve properties and locations for dynamic processing or automated content generation tasks.
- Argument Collectors - Typst collects variable numbers of positional and named arguments in custom functions using a sink that provides methods to access and process the captured values.
- Argument Spreading - Typst spreads arrays, dictionaries, or captured argument objects into function calls to pass multiple values as individual positional or named arguments dynamically.
- Array Manipulation Utilities - Typst inserts a value into an array at a specified index, shifting subsequent elements to the right to maintain the order of the collection.
- String Manipulators - Typst manipulates strings using built-in methods for slicing, searching, replacing, splitting, and trimming, supporting both literal strings and regular expressions as patterns.