content
Representation of text, elements, and more.
This type is at the heart of Typst. All markup you write and most functions you call produce content values. You can create a content value by enclosing markup in square brackets. This is also how you pass content to functions. Typst does not allow you to peek into content, but you can affect its appearance in various ways using set and show rules. See the chapter on styling for more details.
#type([*Hello!*]) \
#strong[Hello!]

Content can be added with the +
operator,
joined together and multiplied with
integers. Wherever content is expected, you can also pass a
string or none
.
Reactivity
Content is reactive to the styles that are active where it is inserted. When you write a set or show rule, content that was created before the show rule is stilled affected by the show rule if it is inserted after the show rule.
// Content is created here.
#let mytext = [= A heading]
// But still affected by the
// styles that are active here.
#show heading: set text(green)
#mytext
