Quarkdown 提供了基于 CSL 的参考文献支持,涵盖以下参考文献格式:
.bib).json).yaml/.yml).enl).ris)要开始使用,请调用 .bibliography {file} 文档 ↗ 函数,其中 file 是你的参考文献文件的路径(含扩展名)。你可以在此处找到一些 BibTeX 示例。
.bibliography {bibliography/file.bib}你可以使用 .cite {key} 函数来引用参考文献中的一个或多个条目。
考虑以下 BibTeX 条目:
@article{einstein,
author = "Albert Einstein",
...
}
@book{hawking,
author = "Stephen Hawking",
...
}你可以使用其键来进行引用。多个键可以用逗号分隔的列表指定,从而生成一个合并的引用标签,其格式取决于当前生效的引用样式。
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(默认)、apa、chicago-author-date、nature、modern-language-association 等许多其他样式。
.bibliography {bibliography.bib} style:{apa}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 参数自定义标题。
.bibliography {bibliography/file.bib} title:{我的参考文献}参考文献前面的标题可以通过以下参数进一步自定义:
| 参数 | 说明 | 接受值 | 默认值 |
|---|---|---|---|
headingdepth | 参考文献前标题的层级深度。 | 整数 | 1 |
breakpage | 标题是否触发自动分页。 | 布尔值 | yes |
numberheading | 标题是否应被编号 并在文档层级中跟踪其位置。 | 布尔值 | no |
indexheading | 标题是否应纳入文档的目录 。会隐式启用 numberheading。 | 布尔值 | no |
例如,根据当前自动分页配置,标题可能会导致分页。你可以阻止这一点:
.bibliography {file.bib} title:{我的参考文献} breakpage:{no}