footnote
元素元素元素函数可用set
和show
规则自定义样式。
set
和show
规则自定义样式。A footnote.
Includes additional remarks and references on the same page with footnotes. A footnote will insert a superscript number that links to the note at the bottom of the page. Notes are numbered sequentially throughout your document and can break across multiple pages.
To customize the appearance of the entry in the footnote listing, see
footnote.entry
. The footnote itself is realized as a
normal superscript, so you can use a set rule on the super
function to customize it.
Example
Check the docs for more details.
#footnote[https://typst.app/docs]

The footnote automatically attaches itself to the preceding word, even if
there is a space before it in the markup. To force space, you can use the
string #" "
or explicit horizontal spacing.
By giving a label to a footnote, you can have multiple references to it.
You can edit Typst documents online.
#footnote[https://typst.app/app] <fn>
Checkout Typst's website. @fn
And the online app. #footnote(<fn>)

Note: Set and show rules in the scope where footnote
is called may not
apply to the footnote's content. See here for more information.
参数参数参数是传给函数的输入,写在函数名后的括号中。
numbering
默认值: "1"
展开例子
#set footnote(numbering: "*")
Footnotes:
#footnote[Star],
#footnote[Dagger]

定义定义这些函数和类型带有附属定义。要访问这种定义,请先写上函数或类型的名称,再加上定义的名称,并用句点在中间分隔。
entry
元素元素元素函数可用set
和show
规则自定义样式。
set
和show
规则自定义样式。An entry in a footnote list.
This function is not intended to be called directly. Instead, it is used in set and show rules to customize footnote listings.
Note: Set and show rules for footnote.entry
must be defined at the
beginning of the document in order to work correctly.
See here
for more information.
展开例子
#show footnote.entry: set text(red)
My footnote listing
#footnote[It's down here]
has red text!

note
The footnote for this entry. It's location can be used to determine the footnote counter state.
展开例子
#show footnote.entry: it => {
let loc = it.note.location()
numbering(
"1: ",
..counter(footnote).at(loc),
)
it.note.body
}
Customized #footnote[Hello]
listing #footnote[World! 🌏]

separator
可用set规则可用set规则可用set
规则设置参数,更改后续调用时的默认值。
set
规则设置参数,更改后续调用时的默认值。The separator between the document body and the footnote listing.
默认值: line(length: 30%, stroke: 0.5pt)
展开例子
#set footnote.entry(
separator: repeat[.]
)
Testing a different separator.
#footnote[
Unconventional, but maybe
not that bad?
]

clearance
可用set规则可用set规则可用set
规则设置参数,更改后续调用时的默认值。
set
规则设置参数,更改后续调用时的默认值。The amount of clearance between the document body and the separator.
默认值: 1em
展开例子
#set footnote.entry(clearance: 3em)
Footnotes also need ...
#footnote[
... some space to breathe.
]

gap
可用set规则可用set规则可用set
规则设置参数,更改后续调用时的默认值。
set
规则设置参数,更改后续调用时的默认值。The gap between footnote entries.
默认值: 0.5em
展开例子
#set footnote.entry(gap: 0.8em)
Footnotes:
#footnote[Spaced],
#footnote[Apart]

indent
可用set规则可用set规则可用set
规则设置参数,更改后续调用时的默认值。
set
规则设置参数,更改后续调用时的默认值。The indent of each footnote entry.
默认值: 1em
展开例子
#set footnote.entry(indent: 0em)
Footnotes:
#footnote[No],
#footnote[Indent]
