带罗马数字和 Biblatex 的子书目

带罗马数字和 Biblatex 的子书目

我目前正在写一篇论文,其中必须使用一个子书目。这非常适合Biblatex和关键词。现在我的教员希望用大罗马数字对这个子书目(并且只用这个)进行编号。文档末尾的主要书目仍应按第一作者后的字母顺序排列。

有什么办法可以做到这一点吗?或者您是否有我迄今为止错过的指示?

这是一个 MWE:

\documentclass{scrreprt}   
\usepackage{filecontents}
\usepackage[%
 natbib=true,%
 citestyle=authoryear,%
 bibstyle=authoryear,%
 backend=bibtex,%
 ]{biblatex}

\defbibfilter{subbib}{keyword=subbib} % Authors publications must have set keyword to "own"
\begin{filecontents}{test.bib}
 @article{hoek2008b,
   author = {Hoek, K. S. and Schlegel, N. C.},
   title = {Novel MITF targets identified using a two-step DNA microarray strategy},
   journal = {Pigment Cell Melanoma Res},
   volume = {21},
   number = {6},
   pages = {665-76},
   keywords = {subbib},
   year = {2008}
}
 @article{hou2008,
   author = {Hou, L. and Pavan, W. J.},
   title = {Transcriptional and signaling regulation in neural crest stem cell-derived melanocyte development: do all roads lead to Mitf?},
   journal = {Cell Res},
   keywords = {subbib},
   year = {2008}
}

 @article{alister2013,
   author = {Alister, J.A.},
   title = {MITF from missense to malady},
   journal = {Pigment Cell Melanoma Res},
   keywords = {pigment},
   year = {2013}
}
 \end{filecontents}

 \addbibresource{test.bib}
\begin{document}
\tableofcontents
 \chapter{This is a test chapter}
 This is only test text.
  \printbibliography[title={Subbibliography}, filter=subbib]

 \chapter{Test for bibliography}
  This is a test to cite \parencite{alister2013} and also cite\parencite{hou2008} which has also been 
  described by \textcite{hoek2008b}.

  \printbibliography[title=References]
\end{document} 

我希望用罗马数字对参考书目进行编号,末尾的参考文献应为作者年份。

答案1

我已经得到了这个问题的答案德国 tex 社区,如下所示:

它基于以下主题“同一文档中存在两种不同风格的书目“来自 tex.sx 并为这两个参考书目定义了新环境。此外,它还用于\DeclareFieldFormat引入罗马数字的新格式。为了顺利引用文献,refsection使用了仅引用我自己的文献的 a。

代码:

\documentclass{article}
\usepackage[citestyle=authoryear, frontend=bibtex8]{biblatex}
\DeclareFieldFormat{Roman}{\RN{#1}}
% The following definition is copied from numeric.bbx
\defbibenvironment{roman-numerals}
  {\list
     {\printtext[labelnumberwidth]{%
    \printfield{prefixnumber}%
    \printfield[Roman]{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}

% The following definition is copied from authortitle.bbx/authoryear.bbx
\defbibenvironment{nolabelbib}
  {\list
     {}
     {\setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{-\leftmargin}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}
  {\item}
\defbibfilter{subbib}{keyword=subbib}
\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
  keywords = {subbib},
}
@misc{C03,
  author = {Cuthor, C.},
  year = {2003},
  title = {Charlie},
  keywords = {subbib},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\begin{refsection}
\nocite{B02, C03}
\printbibliography[title={Subbibliography}, keyword=subbib, env=roman-numerals]
\end{refsection}
Some text \autocite{A01,B02}.
\printbibliography[env=nolabelbib, title=References]
\end{document}

相关内容