BibLatex:兩個帶有羅馬和阿拉伯編號的參考書目

BibLatex:兩個帶有羅馬和阿拉伯編號的參考書目

詹尼克問題的答案(Biblatex:兩本不同風格和排序的參考書目)幾乎是我喜歡擁有的。但我想使用 style=phys 代替 style=alphabetic,並在第一個參考書目和相應的文本引用中使用粗體羅馬數字作為標籤。 (即用 {\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文件中,則可以使用更優雅的方法來分割它們。但這取決於您的設定。

相關內容