当我将降价文件转换为 pdf 时,参考书目中的参考顺序与文件中的顺序相同.bib
。结果,文本中的引用以错误的顺序出现。结果,我可以在文本中使用类似... reported in [2] after [1] ...
while 我希望参考文献在参考书目中出现在文本中时那样的句子,因为它会使用unsrt.bib
.
问题是:如何按照它们在文本中出现的顺序对参考书目部分中的条目进行排序?
MWE,使用编译pandoc -C -f markdown testing.md -o testing.pdf
测试.md:
---
bibliography: test.bib
csl: aps.csl
---
The first reference [@second_title_2015]
The second reference [@author_title_2014]
测试.bib
@article{author_title_2014,
title = {The title},
author = {Author, A. B. and Other, C. D.},
year = {2014},
}
@article{second_title_2015,
title = {The other title},
author = {Second, T. A. and First, F. G.},
year = {2015},
}
输出
更改@article
's in的顺序会test.bib
产生所需的输出:The first reference [1] the second reference [2]
.
我正在使用aps.csl
取自 zotero 样式存储库:
https ://www.zotero.org/styles/american-physics-society?source=1
问题的原因:
我有一个由 conda 安装的过时 pandoc(pandoc 是我需要的一些重要包的先决条件),并且这个版本优先于默认的 arch 安装,因为 conda 的可执行文件目录在$PATH
before中/bin/
。