pandoc-citeproc如何排序引用? [英] How does pandoc-citeproc sort citations?
问题描述
我有一个pandoc样式的Markdown文本,在同一地方引用同一作者的两篇论文:
I have a pandoc-style Markdown text where I cite two papers by the same author in the same place:
Lorem ipsum [@Author2000;@Author2001] dolor sit amet.
此呈现为
Lorem ipsum(作者2001,2000)dolor sit amet.
Lorem ipsum (Author 2001, 2000) dolor sit amet.
为什么这些引文以这种方式排序,与我的文章顺序相矛盾,与作者年份的排序相矛盾,又与它们在参考文献列表中的出现顺序相矛盾?我该如何更改?是否可以关闭任何排序方式并保持我指定引文的顺序?
Why are these citations sorted this way, contradicting the sequence in my text, contradicting author-year sorting, and contradicting the sequence in which they appear in the list of references? How can I change this? Is it possible to switch off any kind of sorting and keep the order in which I specify the citations?
更多信息:文本由pandoc使用选项--filter pandoc-citeproc --csl=elsevier-harvard.csl
转换为乳胶,然后使用xelatex处理.可以从 Zotero 下载csl文件. Pandoc是v1.13.2,pandoc-citeproc是v0.6.
More information: The text is converted by pandoc with the options --filter pandoc-citeproc --csl=elsevier-harvard.csl
into latex and then processed with xelatex. The csl file can be downloaded from Zotero. Pandoc is v1.13.2, pandoc-citeproc is v0.6.
推荐答案
文本引用格式由CSL在<citation></citation>
标记之间定义.引用的排序是在<sort></sort>
标记之间定义的.您使用的CSL按作者排序,然后按发布日期降序-(Author 2001,2000):
In-text citation formatting is defined by your CSL between <citation></citation>
tags. The sorting of your citations is defined between the <sort></sort>
tags. The CSL you are using sorts by author and then by descending date issued - (Author 2001, 2000):
<citation ...>
<sort>
<key macro="author"/>
<key macro="issued" sort="descending"/>
</sort>
...
</citation>
要按作者排序,然后按发布日期升序进行排序-(作者2000,2001):
To sort by author and then by ascending date issued - (Author 2000, 2001):
<citation ...>
<sort>
<key macro="author"/>
<key macro="issued" sort="ascending"/>
</sort>
...
</citation>
要不对引用进行排序,只需删除<sort></sort>
标记之间的所有内容即可.
To not sort the citations, just remove everything between the <sort></sort>
tags.
<citation ...>
<sort>
</sort>
...
</citation>
这篇关于pandoc-citeproc如何排序引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!