locate
Provides access to the location of content.
This is useful in combination with queries, counters, state, and links. See their documentation for more details.
#locate(loc => [
My location: \
#loc.position()!
])
参数
参数是函数的输入,它们在函数名称后面的括号中传入。
参数是函数的输入,它们在函数名称后面的括号中传入。
func
A function that receives a location
. Its return value is
displayed in the document.
This function is called once for each time the content returned by
locate
appears in the document. That makes it possible to generate
content that depends on its own location in the document.