/

参考文献

Quarkdown 提供了基于 CSL 的参考文献支持,涵盖以下参考文献格式:

要开始使用,请调用 .bibliography {file} 文档 ↗ 函数,其中 file 是你的参考文献文件的路径(含扩展名)。你可以在此处找到一些 BibTeX 示例。

示例 1

.bibliography {bibliography/file.bib}

参考文献

A. Einstein, 《Zur Elektrodynamik bewegter Körper. (German) [On the electrodynamics of moving bodies]》, Annalen der Physik, 卷 322, Art. 期 10, 1905, doi: http://dx.doi.org/10.1002/andp.19053221004.S. Hawking, A Brief History of Time. Bantam Books, 1988.M. Goossens, F. Mittelbach, 和 A. Samarin, The LaTeX Companion. Reading, Massachusetts: Addison-Wesley, 1993.

引用

你可以使用 .cite {key} 函数来引用参考文献中的一个或多个条目。

考虑以下 BibTeX 条目:

@article{einstein,
  author = "Albert Einstein",
  ...
}

@book{hawking,
  author = "Stephen Hawking",
  ...
}

你可以使用其键来进行引用。多个键可以用逗号分隔的列表指定,从而生成一个合并的引用标签,其格式取决于当前生效的引用样式

示例 2

Einstein's publication .cite {einstein} in 1905 revolutionized the field of physics.
Similarly, Hawking's book .cite {hawking} has had a profound impact
on our understanding of cosmology and black holes.

These works .cite {einstein, hawking} are foundational to modern physics.

Einstein’s publication [1] in 1905 revolutionized the field of physics.Similarly, Hawking’s book [2] has had a profound impacton our understanding of cosmology and black holes.

These works [1], [2] are foundational to modern physics.

样式

可选的 style 参数用于配置参考文献及其引用标注的外观与格式。它接受一个 CSL(引用样式语言)样式标识符。Quarkdown 自带一组来自 CSL 样式仓库 的引用样式,包括 ieee(默认)、apachicago-author-datenaturemodern-language-association 等许多其他样式。

.bibliography {bibliography.bib} style:{apa}
支持的样式完整列表

Error: code

Cannot call function code(...) with arguments (...):
Cannot call function read(Context context, String path, optional Range lines) with arguments (../quarkdown-core/csl-styles.txt): File C:\Users\bbylw\Desktop\quarkdown-main\docs-zh\..\quarkdown-core\csl-styles.txt does not exist.

.code lang:{text} linenumbers:{no}
    .read {../quarkdown-core/csl-styles.txt}

标题

默认情况下,标题会根据当前通过 .doclang 设置的区域(若受支持)进行本地化 。你可以使用 title 参数自定义标题。

示例 3

.bibliography {bibliography/file.bib} title:{我的参考文献}

我的参考文献

A. Einstein, 《Zur Elektrodynamik bewegter Körper. (German) [On the electrodynamics of moving bodies]》, Annalen der Physik, 卷 322, Art. 期 10, 1905, doi: http://dx.doi.org/10.1002/andp.19053221004.S. Hawking, A Brief History of Time. Bantam Books, 1988.M. Goossens, F. Mittelbach, 和 A. Samarin, The LaTeX Companion. Reading, Massachusetts: Addison-Wesley, 1993.

标题选项

参考文献前面的标题可以通过以下参数进一步自定义:

参数说明接受值默认值
headingdepth参考文献前标题的层级深度。整数1
breakpage标题是否触发自动分页布尔值yes
numberheading标题是否应被编号 并在文档层级中跟踪其位置。布尔值no
indexheading标题是否应纳入文档的目录 。会隐式启用 numberheading布尔值no

例如,根据当前自动分页配置,标题可能会导致分页。你可以阻止这一点:

.bibliography {file.bib} title:{我的参考文献} breakpage:{no}