You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Quarto Book PDF中实现分章参考文献并前置全文参考文献至附录前?

解决方案

核心思路

关闭全局自动生成全文参考文献的功能,让section-bibliographies.lua单独处理分章参考文献,同时手动在指定位置(附录前)生成全文参考文献。

具体步骤

1. 修改全局配置

更新项目的YAML配置(如_quarto.yml或主文档的yaml头),关闭全局citeproc自动生成,保留分章过滤器:

filters:
  - section-bibliographies.lua
bibliography: rap_v002.bib
citeproc: false

# 配置分章参考文献的参数(按需调整)
section-bibliographies:
  section-level: 1  # 按一级标题(章节)生成参考文献
  bibliography-title: "References"  # 分章参考文献的标题

2. 调整全文参考文献生成逻辑

修改bibliography.qmd,通过LaTeX命令手动触发全文参考文献生成(适配PDF导出):

---
# 若需包含未在正文引用的文献,添加nocite配置
nocite: '@*'
---

# References {.unnumbered}

```{=latex}
\printbibliography
### 3. 确认章节顺序
确保`_quarto.yml`中章节顺序正确,将`bibliography.qmd`放在附录之前:
```yaml
chapters:
  - abstract.qmd
  - index.qmd
  - dedication.qmd
  - acknowledgements.qmd
  - list_abbreviations.qmd
  - chapter_1_intro.qmd
  - chapter_2_lm.qmd
  - chapter_3_ml.qmd
  - chapter_4_conclusions.qmd
  - bibliography.qmd
appendices:
  - appendices.qmd

原理说明

  • 关闭全局citeproc: true后,Quarto不会自动在文档末尾生成全文参考文献
  • section-bibliographies.lua过滤器不受影响,仍会按章节生成分章参考文献
  • 在bibliography.qmd中使用\printbibliography命令,直接调用LaTeX的biblatex功能生成全文参考文献,位置由该文件在章节列表中的顺序决定

内容的提问来源于stack exchange,提问作者ronnyale

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.02 00:57:23