如何在R Markdown/Quarto中用citeproc实现带引用的首字母缩写格式?
我需要给首字母缩写添加引用标注,目标格式如下:
One popular statistic is the Bayesian Information Criterion (BIC; Schwarz, 1978)
但用Citeproc渲染时始终达不到预期,我尝试了以下几种写法及对应的结果:
- 写法:
One popular statistic is the Bayesian Information Criterion [BIC; @schwarz-1978].
渲染结果:
One popular statistic is the Bayesian Information Criterion [BIC; Schwarz (1978)].
- 写法:
One popular statistic is the Bayesian Information Criterion (BIC; Schwarz [-@bic])
渲染结果:
One popular statistic is the Bayesian Information Criterion (BIC; Schwarz (1978)).
- 写法:
One popular statistic is the Bayesian Information Criterion [BIC, @bic]
渲染结果:
One popular statistic is the Bayesian Information Criterion (BIC, Schwarz, 1978).
最后一种写法最接近需求,但缩写后只能用逗号而非分号。我推测这是因为分号通常用于分隔引用键,而此处第一个内容是首字母缩写而非引用键。请问是否能实现这种带分号的首字母缩写+引用的格式?
可以利用Citeproc的**前缀(prefix)**参数实现,把首字母缩写和分号作为引用的前缀内容,具体写法如下:
One popular statistic is the Bayesian Information Criterion ([@schwarz-1978, prefix="BIC; "]).
渲染后就能得到目标格式:
One popular statistic is the Bayesian Information Criterion (BIC; Schwarz, 1978).
原理是通过prefix参数在引用内容前插入自定义文本,既避开了分号作为引用分隔符的冲突,又能精准控制格式。
内容的提问来源于stack exchange,提问作者Jake Thompson

