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

R-Quarto交叉引用问题求助:行内引文无法跳转至参考文献

解决Quarto PDF行内引文跳转与着色问题

核心配置调整

要实现行内引文的可点击跳转和着色,只需在文档配置中添加特定参数,并调整参考文献生成逻辑:

1. 更新YAML头部配置

修改文档的YAML元数据,开启引文交叉引用、颜色链接,并指定兼容的PDF引擎:

---
title: "Untitled"
format: 
  pdf:
    engine: xelatex
    citeproc: true
    link-citations: true
    colorlinks: true
    linkcolor: darkblue  # 可自定义颜色,比如red、green或十六进制码
editor: visual
bibliography: fake_citations.bib
---

2. 删除手动添加的参考文献章节

不要手动写## References,Quarto会自动在文档末尾生成带交叉引用的参考文献列表。如果需要自定义参考文献标题,可在YAML中添加:

format:
  pdf:
    reference-section-title: "参考文献"

3. 完整可运行示例

---
title: "Quarto引文跳转测试"
format: 
  pdf:
    engine: xelatex
    citeproc: true
    link-citations: true
    colorlinks: true
    linkcolor: darkblue
    reference-section-title: "参考文献"
editor: visual
bibliography: fake_citations.bib
---

## 正文内容

Here is a reproducible example [@neumann_norway_2010]

\newpage

测试跨页面跳转效果

\newpage

## 其他章节内容

关键说明

  • link-citations: true是开启引文跳转的核心参数,Quarto会自动为行内引文添加PDF内部链接
  • colorlinks: true和linkcolor控制链接颜色,按需调整即可
  • 必须使用xelatex或lualatex作为PDF引擎,这两个引擎对UTF-8和自定义格式支持更好
  • 手动添加的参考文献章节会覆盖自动生成的带交叉引用列表,因此一定要删除手动章节

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.25 17:52:08