metadata元素元素元素函数可用set和show规则自定义样式。
元素
元素函数可用
set和show规则自定义样式。Exposes a value to the query system without producing visible content.
This element can be retrieved with the query function and from
the command with typst query. Its
purpose is to expose an arbitrary value to the introspection system. To
identify a metadata value among others, you can attach a label
to it and query for that label.
The metadata element is especially useful for command line queries because
it allows you to expose arbitrary values to the outside world.
// Put metadata somewhere.
#metadata("This is a note") <note>
// And find it from anywhere else.
#locate(loc => {
query(<note>, loc).first().value
})

参数参数参数是传给函数的输入,写在函数名后的括号中。
参数
参数是传给函数的输入,写在函数名后的括号中。
valueany必需参数必需参数必需参数在调用函数时必须传入。位置参数位置参数位置参数按顺序传入,不带参数名。
any
必需参数
必需参数
必需参数在调用函数时必须传入。
位置参数
位置参数
位置参数按顺序传入,不带参数名。
The value to embed into the document.