注意 / Info
本站经 Typst GmbH 许可,提供 Typst v0.10.0+后期随缘更新 官方文档的翻译,由中文社区维护。建议与官方文档一同阅读,因为可能存在错译、漏译或过时信息。如有意改进翻译内容或网站本身,可在GitHub上提出 Issue、发起 Pull Requests。此外,也欢迎加入「Typst 非官方中文交流群」(QQ 793548390)
This site provides a Chinese translation of the Typst v0.10.0+后期随缘更新 documentation maintained by the “Typst Chinese Community” with permission from Typst GmbH. We recommend using this alongside the official documentation. We welcome contributions through Issues and Pull Requests on our GitHub repository for both translation improvements and website enhancements. Feel free to join our QQ chat group “Typst 非官方中文交流群” (793548390).
Typst文档简体中文版
v0.10.0+后期随缘更新

footnote
元素
元素
元素函数可用setshow规则自定义样式。

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]
Preview

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>)
Preview

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
可用set规则
可用set规则
可用set规则设置参数,更改后续调用时的默认值。

How to number footnotes.

By default, the footnote numbering continues throughout your document. If you prefer per-page footnote numbering, you can reset the footnote counter in the page header. In the future, there might be a simpler way to achieve this.

默认值:

"1"

展开例子
#set footnote(numbering: "*")

Footnotes:
#footnote[Star],
#footnote[Dagger]
Preview

body
必需参数
必需参数
必需参数在调用函数时必须传入。
位置参数
位置参数
位置参数按顺序传入,不带参数名。

The content to put into the footnote. Can also be the label of another footnote this one should point to.

定义
定义
这些函数和类型带有附属定义。要访问这种定义,请先写上函数或类型的名称,再加上定义的名称,并用句点在中间分隔。

entry
元素
元素
元素函数可用setshow规则自定义样式。

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!
Preview

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! 🌏]
Preview

separator
可用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?
]
Preview

clearance
可用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.
]
Preview

gap
可用set规则
可用set规则
可用set规则设置参数,更改后续调用时的默认值。

The gap between footnote entries.

默认值:

0.5em

展开例子
#set footnote.entry(gap: 0.8em)

Footnotes:
#footnote[Spaced],
#footnote[Apart]
Preview

indent
可用set规则
可用set规则
可用set规则设置参数,更改后续调用时的默认值。

The indent of each footnote entry.

默认值:

1em

展开例子
#set footnote.entry(indent: 0em)

Footnotes:
#footnote[No],
#footnote[Indent]
Preview
转到官方文档(英文)

搜索