问题很简单,但我似乎无法弄清楚。
我使用 biblatex/biber,并在我的文档中使用了几种不同文档类型的参考书目(例如,一种用于文章和书籍,其他用于法律文件)。问题是我似乎无法按年份对一个特定的参考书目进行排序(“ynt”),而另一个仍然需要按“nyt”排序。
如何使只有一个书目的文献主要按年份排序?
一位 MWE 表示:
\documentclass{article}
\usepackage[autocite=footnote, language=german, style=authoryear-ibid, sorting=nyt, backend=biber]{biblatex}
\usepackage[bottom]{footmisc}
\bibliography{lit.bib}
\makeindex
\begin{document}
test\autocites[]{test1}[]{test2}[]{test3}[]{test4}
\printbibliography[title={Literatur}, type=book] %this is articles and books, which needs to be sorted NYT
\printbibliography[title={Deutsche Rechtsquellen und Gesetzmaterialien}, type=misc] %this is legal documents, which needs to be sorted YNT.
\end{document}
使用以下 lit.bib
@book{test1,
Author = {{Karl Marx}},
Title = {Capital},
Year = {1867}}
@book{test2,
Author = {Calliess, Christian and Ruffert, Matthias},
Title = {Kommentar zum EUV/EGV},
Year = {2007}}
@misc{test3,
Author = {{BT-Drs. 9/743}},
Howpublished = {Bundestagsdrucksache 1},
Year = {1981}}
@misc{test4,
Author = {{BT-Drs. 9/735}},
Howpublished = {Bundestagsdrucksache 2},
Year = {1985}}
结果如下:
“文献”已正确排序(按作者姓名排序),但我需要按年份对其他书目进行排序。全局更改排序无济于事,因为我只需要对法律文件进行不同的排序。但是,删除全局排序选项并引入本地排序选项不起作用。我做错了什么?
答案1
最新版本的biblatex
删除了排序选项,\printbibliography
并将其移至\refcontext
。因此,您必须\refcontext
为要显示的参考书目添加 s。
因此,MWE 应该看起来像
\documentclass{article}
\usepackage{filecontents}
@book{test1,
Author = {{Karl Marx}},
Title = {Capital},
Year = {1867}}
@book{test2,
Author = {Calliess, Christian and Ruffert, Matthias},
Title = {Kommentar zum EUV/EGV},
Year = {2007}}
@misc{test3,
Author = {{BT-Drs. 9/743}},
Howpublished = {Bundestagsdrucksache 1},
Year = {1981}}
@misc{test4,
Author = {{BT-Drs. 9/735}},
Howpublished = {Bundestagsdrucksache 2},
Year = {1985}}
\end{filecontents}
\usepackage[autocite=footnote, language=german, style=authoryear-ibid, sorting=nyt, backend=biber]{biblatex}
\usepackage[bottom]{footmisc}
\bibliography{\jobname.bib}
\makeindex
\begin{document}
test\autocites[]{test1}[]{test2}[]{test3}[]{test4}
\newrefcontext[sorting=nyt]
\printbibliography[title={Literatur}, type=book] %this is articles and books, which needs to be sorted NYT
\newrefcontext[sorting=ydnt]
\printbibliography[title={Deutsche Rechtsquellen und Gesetzmaterialien}, type=misc] %this is legal documents, which needs to be sorted YNT.
\end{document}