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.
Rustcompilermarkuptypesetting