虽然链接(参见 Hyperlinks)通常足以在 Org 中引用内部或外部信息,但在引用多个目标或排版印刷出版物时存在局限性。
Org 模式提供了更完善的标记语法用于 “引用(cite)” 外部资源。以下是一段 Org 模式示例代码:
#+bibliography: citationdata.bib Org mode is used by various communities [cite:teaching: @orgteaching; and TeX: @orgtex]. [cite/author/caps:@orgtex] uses Org mode to simplify writing scientific publications, while [cite/author/caps:@orgteaching] experiments with Org babel to improve teaching. #+print_bibliography:
Org 模式会从 ‘#+bibliography’ 数据库中收集引用元数据,并用于排版导出为任意格式的文档。下方示例为 ASCII 格式的导出效果:
Org mode is used by various communities (teaching: Birkenkrahe, Marcus, 2023, and TeX: Somma, Emmanuele F, 2023). Somma, Emmanuele F uses Org mode to simplify writing scientific publications, while Birkenkrahe, Marcus experiment with Org babel to improve teaching. Birkenkrahe, Marcus (2023). /Teaching Data Science with Literate Programming Tools/, MDPI. Somma, Emmanuele F (2023). /Simplifying LaTeX with ORG-mode in Emacs/, TUGboat volume.
除导出功能外,用户还可以通过补全功能从参考文献库中搜索并插入引用(通过 org-cite-insert )。引用同样具备普通链接的特性,使用 org-open-at-point 执行 “打开(following)” 操作时,会跳转到对应的引用元数据位置。
你可以通过内置或外部的 引用处理器(citation processors) ,自定义引用管理的各项 功能(capability) 。
Org 模式内置多款引用处理器,适配 LaTeX 导出与 BibTeX 文献库( ‘bibtex’ 、 ‘biblatex’ 、 ‘natbib’ 处理器),也支持使用 引用样式语言 定义的通用格式( ‘csl’ 处理器)。 默认引用处理器为 ‘basic’ ,可兼容任意导出格式,并同时识别 BibTeX 与 CSL 文献库。更多引用处理器以 Emacs 扩展包形式分发。
可混合使用多个引用处理器以满足个性化需求。配置 org-cite-activate-processor 、 org-cite-follow-processor 、 org-cite-insert-processor 和 org-cite-export-processors ,为不同引用功能指定对应处理器:
语法高亮、悬浮提示预览等。
通过 org-open-at-point 对光标处引用执行操作。
通过 org-cite-insert 添加和编辑引用。
依托不同库适配各类目标导出格式。