BibLatex:两个带有罗马和阿拉伯数字的书目

BibLatex:两个带有罗马和阿拉伯数字的书目

Jannik 问题的答案(Biblatex:两种具有不同风格和排序的书目) 几乎就是我想要的。但是,我不想使用 style=alphabetic,而是使用 style=phys,并在第一个参考书目和相应的文内引用中使用粗体罗马数字作为标签。(即用 {\bf I} 替换 [Bbb02],用 {\bf II} 替换 [Aaa03],并按参考书目中的存在顺序获取它们。)

答案1

这实际上比Biblatex:两种具有不同风格和排序的书目这是因为我们只想混合数字样式,并且不需要改变排序。

\documentclass{article}

\usepackage{filecontents}

\begin{filecontents}{biblatextest1.bib}
@BOOK{BookA03,
  author    = {Author Aaa},
  title     = {Some Title},
  publisher = {Some Publisher},
  year      = 2003,
}
@BOOK{BookB02,
  author    = {Author Bbb},
  title     = {Some Title},
  publisher = {Some Publisher},
  year      = 2002,
}
\end{filecontents}

\begin{filecontents}{biblatextest2.bib}
@MISC{LinkC04,
  author  = {Author Ccc},  
  title   = {Some Title},
  year    = 2004,
  url     = {www.test1.com/bild.jpg},
}
@MISC{LinkD01,
  author  = {Author Ddd},
  title   = {Some Title},
  year    = 2001,
  url     = {www.test2.com/bild.jpg},
}
\end{filecontents}

\usepackage[style = phys, defernumbers = true,  backend = biber]{biblatex}
\addbibresource{biblatextest1.bib}
\addbibresource{biblatextest2.bib}

\usepackage{hyperref}

%Append keywords to identify different bibliography entries.
\DeclareSourcemap{
  \maps[datatype=bibtex, overwrite]{
    \map{
      \perdatasource{biblatextest1.bib}
      \step[fieldset=KEYWORDS, fieldvalue=primary, append]
    }
    \map{
      \perdatasource{biblatextest2.bib}
      \step[fieldset=KEYWORDS, fieldvalue=secondary, append]
    }
  }
}

\DeclareFieldFormat{labelnumber}{\ifkeyword{secondary}{#1}{\mkbibbold{\RN{#1}}}}

\begin{document}

The first two citations \cite{LinkD01} and \cite{BookB02}. 
The others are \cite{LinkC04} and \cite{BookA03}.

\printbibliography[title=Bibliography, keyword=primary]
\printbibliography[title=References, keyword=secondary, resetnumbers]
\end{document}

在此处输入图片描述

如果您尚未将参考书目拆分到不同的.bib文件中,则可以使用更优雅的方法来拆分参考书目。但这取决于您的设置。

相关内容