Types
To style your document, you need to work with values of different kinds: Lengths specifying the size of your elements, colors for your text and shapes, and more. Typst categorizes these into clearly defined types and tells you where it expects which type of value.
Apart from very basic types for numeric values and typical types known from programming languages, Typst provides a special type for content. A value of this type can hold anything that you can enter into your document: Text, elements like headings and shapes, and style information.
In some places of Typst more specialized data types are used. Instead of listing all of them here, they are explained where they are relevant.
Types
none
A value that indicates the absence of any other value.auto
A value that indicates a smart default.boolean
Either `{true}` or `{false}`.integer
A whole number.float
A floating-pointer number.length
A size or distance, possibly expressed with contextual units.angle
An angle describing a rotation.ratio
A ratio of a whole.relative length
A length in relation to some known length.fraction
Defines how the the remaining space in a layout is distributed.color
A color in a specific color space.symbol
A Unicode symbol.string
A sequence of Unicode codepoints.content
A piece of document content.array
A sequence of values.dictionary
A map from string keys to values.function
A mapping from argument values to a return value.arguments
Captured arguments to a function.selector
A filter for selecting elements within the document.module
An evaluated module, either built-in or resulting from a file.