![图书](https://linux22.com/image/387120/%E5%9B%BE%E4%B9%A6.png)
我一直尝试使用不同的标签来引用不同类型的出版物。例如,有以下 bib 文件
\begin{filecontents}{references.bib}
@article{Anonymous:2013,
Author = {Anonymous, Arthur},
Journal = {Somewhere},
Pages = {46-54},
Title = {Arthur's article},
Volume = {25 (2013)},
Year = {2013},
sorttitle = {b}}
@article{Anonymous:2012c,
Author = {Anonymous, Arthur},
Journal = {Somewhere else},
Pages = {6-12},
Title = {Last words},
Volume = {43 (2012)},
Year = {2012},
sorttitle = {c}}
@book{Anonymous:2012a,
Address = {Someplace},
Author = {Anonymous, Arthur},
Publisher = {Nobody},
Title = {Book by Arthur},
Year = {2012},
sorttitle = {a}}
\end{filecontents}
\bibliography{references.bib}
如何使用 biblatex 生成如下引用列表:
图书
[B1] A. Anonymous,亚瑟所著,等等
文章
[J2] A. Anonymous,Arthur 的文章,Somewhere,2013 年,等等
[J1] A. Anonymous,《遗言》,《别处》,2012,等等
答案1
labelprefix
您可以使用全局启用的选项轻松为数字/字母标签添加前缀\newrefcontext
。参考书目可以按类型拆分,如中所述labelprefix
defernumbers
按参考文献类型划分参考书目并可type
选择\printbibliography
。
参考书目中的条目始终应用当前上下文。引用应用参考书目中打印条目的最后一个上下文(为实现简单起见,为最后一个)。
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=numeric, backend=biber, defernumbers]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{sigfridsson,worman,baez/article,nussbaum,aksin}
\printbibheading
\newrefcontext[labelprefix=B]
\printbibliography[type=book, title=Books, heading=subbibliography]
\newrefcontext[labelprefix=J]
\printbibliography[type=article, title=Articles, heading=subbibliography]
\end{document}