一个 biblatex 字段中的多个字符串 - 多个引用

一个 biblatex 字段中的多个字符串 - 多个引用

据我了解,biblatex-fields 只eprint接受related一个字符串/键,尽管我希望它们引用两个或更多项目/地址。

举一个例子可能可以清楚地说明我的意思(该示例需要运行三次:latex --> biber --> latex):

\begin{filecontents}{MyBib.bib}
@Article{Barney:Notes,
  author =   {Rachel Barney},
  title =    {Notes on Plato on the \mkbibemph{Kalon} and the Good},
  journaltitle = {Classical Philology},
  year =     2010,
  commentator =  {Paula Gottlieb},
  eprint =   {10.1086/657026, 10.1086/659326}, %the first number is
                                     % the article, the second one the
                                     % comment, which I want to appear in one entry
  eprinttype =   {jstor},
  volume =   105,
  number =   4,
  pages =    {363-77, 378-80} % the same as with eprint
  }

@Article{Derrida:Pharmacie1-1,
  author =   {Jacques Derrida},
  title =    {La pharmacie de Platon},
  journaltitle = {Tel Quel},
  year =     1968,
  volume =   32,
  pages =    {3-48}
}

@Article{Derrida:Pharmacie1-2,
  author =   {Jacques Derrida},
  title =    {La pharmacie de Platon},
  journaltitle = {Tel Quel},
  year =     1968,
  volume =   33,
  pages =    {18-59}
}

@InBook{Derrida:Pharmacie2,
  title =    {La pharmacie de Platon},
  year =     1993,
  bookauthor =   {Jacques Derrida},
  author =   {Jacques Derrida},
  gender =   {sm},
  booktitle =    {La Diss{\'e}mination},
  bookauthor =   {Jacques Derrida},
  publisher =    {{\'E}dition Points},
  location =     {Paris},
  pages =    {77-213}, % perhaps: {77-148, 149-213}
  related =  {Derrida:Pharmacie1-1}, % both articles are reprinted in one book,
                   % the unity of the deconstructed separation, which might duly be called 
                          % the voice of the separated unification as voiced deconstruction
                          % of no-pposites
  related =      {Derrida:Pharmacie1-2},
  relatedstring ={Nachdruck von}
}
\end{filecontents}
\documentclass{scrartcl}
\usepackage{filecontents}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\input{ix-utf8enc.dfu}
\usepackage[english]{babel}
\usepackage{xpatch}
\usepackage[pdftex]{hyperref}
\usepackage{csquotes}
\usepackage[style=philosophy-modern, sorting=nyvt,
            backend=biber, citetracker=constrict,
            opcittracker=constrict, 
            idemtracker=constrict, relatedformat=parens, 
            autolang=hyphen, clearlang=true]{biblatex}
\addbibresource{MyBib.bib}
\begin{document}

\nocite{*}
\printbibliography
\end{document}

如果我用德里达式的逗号分隔两个键,我会得到两次引用,中间用换行符分隔。

答案1

crossref正确使用这两个,只需将它们放入同一crossref字段即可。引用我上面的评论

您必须将两个相关条目放入一个字段中(当然,用逗号分隔),否则 Biber 将只采用该字段的最后一次出现,并忽略所有先前的出现(我本来希望 Biber 会发出警告,但没有。如果您向条目related添加第二个(不同的)字段,您可以非常清楚地看到这种行为。)author

@InBook{Derrida:Pharmacie2,
  title         = {La pharmacie de Platon},
  year          = 1993,
  bookauthor    = {Jacques Derrida},
  author        = {Jacques Derrida},
  gender        = {sm},
  booktitle     = {La Diss{\'e}mination},
  bookauthor    = {Jacques Derrida},
  publisher     = {{\'E}dition Points},
  location      = {Paris},
  pages         = {77-213}, % perhaps: {77-148, 149-213}
  related       = {Derrida:Pharmacie1-1,Derrida:Pharmacie1-2},
  relatedtype   = {reprintof},
  %relatedstring = {Nachdruck von}
}

既然您写了relatedstring ={Nachdruck von}relatedtype = {reprintof}这里似乎很合适。

但在我看来,default相关的宏biblatex-philosophy有点混乱,reprintof也被损坏了,所以我们必须告诉我们biblatex如何处理它:

\newbibmacro*{related:reprintof}[1]{%
  \entrydata*{#1}{%
    \usedriver
      {\ifnameundef{savedauthor}
         {\ifnameundef{savededitor}
            {}
            {\ifnamesequal{editor}{savededitor}
               {\clearname{editor}}
               {}}}
         {\ifnamesequal{author}{savedauthor}
            {\clearname{author}}
            {}}%
       \renewbibmacro*{related:init}{}%
       \DeclareNameAlias{sortname}{default}%
       \ifbibmacroundef{date+extrayear}
         {}
         {\renewbibmacro*{date+extrayear}{}%
          \renewbibmacro*{date}{\printdate}}%
       \renewbibmacro*{pageref}{}}
      {\thefield{entrytype}}}}

related:default如果我们进一步重新定义标准

\renewbibmacro*{related:default}[1]{%
  \entrydata*{#1}{%
    \usedriver
      {\renewcommand*{\labelnamepunct}{\addcolon\space}%
       \renewbibmacro*{author/translator+others}{\printnames{author}}%
       \iffieldsequal{savedjournaltitle}{journaltitle}%
         {\renewbibmacro*{journal}{\bibstring{ibidem}}%
          \ifboolexpr{test {\iffieldsequal{savedvolume}{volume}} and test {\iffieldsequal{savednumber}{number}}}
            {\renewbibmacro*{volume+number+eid}{}}
            {}%
         }
         {}
       \ifnameundef{savedauthor}
         {\ifnameundef{savededitor}
            {}
            {\ifnamesequal{editor}{savededitor}
               {\clearname{editor}}
               {}}}
         {\ifnamesequal{author}{savedauthor}
            {\clearname{author}}
            {}}%
       \renewbibmacro*{related:init}{}%
       \DeclareNameAlias{sortname}{default}%
       \ifbibmacroundef{date+extrayear}
         {}
         {\renewbibmacro*{date+extrayear}{}%
          \renewbibmacro*{date}{\printdate}}%
       \renewbibmacro*{pageref}{}}
      {\thefield{entrytype}}}}

更新 related:defaultibidem如果相关条目的日记帐与父条目的日记帐相同,则现在打印通知。

并将 视为Barney:Notes如下,注意 是Gottlieb:responsedataonly并且 的related字段Barney:Notes指的是Gottlieb:response

@Article{Barney:Notes,
  author =   {Rachel Barney},
  title =    {Notes on Plato on the \mkbibemph{Kalon} and the Good},
  journaltitle = {Classical Philology},
  year =     2010,
  doi =   {10.1086/657026},
  volume =   105,
  number =   4,
  pages =    {363-377},
  related={Gottlieb:response},
  relatedstring = {Commentary:},
}

@Article{Gottlieb:response,
  author =   {Paula Gottlieb},
  title =    {Response to Barney},
  journaltitle = {Classical Philology},
  year =     2010,
  doi =   {10.1086/659326},
  volume =   105,
  number =   4,
  pages =    {378-380},
  options = {dataonly},
}

我想我们可以得到相当理想的结果。

平均能量损失

\documentclass{scrartcl}
\usepackage{filecontents}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{xpatch}
\usepackage[pdftex]{hyperref}
\usepackage{csquotes}
\usepackage{filecontents}
\usepackage[style=philosophy-modern, sorting=nyvt,
            backend=biber, citetracker=constrict,
            opcittracker=constrict,
            idemtracker=constrict, relatedformat=parens,
            autolang=hyphen, clearlang=true]{biblatex}

\begin{filecontents*}{\jobname.bib}
@Article{Barney:Notes,
  author =   {Rachel Barney},
  title =    {Notes on Plato on the \mkbibemph{Kalon} and the Good},
  journaltitle = {Classical Philology},
  year =     2010,
  doi =   {10.1086/657026},
  volume =   105,
  number =   4,
  pages =    {363-377},
  related={Gottlieb:response},
  relatedstring = {Commentary:},
}

@Article{Gottlieb:response,
  author =   {Paula Gottlieb},
  title =    {Response to Barney},
  journaltitle = {Classical Philology},
  year =     2010,
  doi =   {10.1086/659326},
  volume =   105,
  number =   4,
  pages =    {378-380},
  options = {dataonly},
}


@Article{Derrida:Pharmacie1-1,
  author =   {Jacques Derrida},
  title =    {La pharmacie de Platon},
  journaltitle = {Tel Quel},
  year =     1968,
  volume =   32,
  pages =    {3-48}
}

@Article{Derrida:Pharmacie1-2,
  author =   {Jacques Derrida},
  title =    {La pharmacie de Platon},
  journaltitle = {Tel Quel},
  year =     1968,
  volume =   33,
  pages =    {18-59}
}

@InBook{Derrida:Pharmacie2,
  title =    {La pharmacie de Platon},
  year =     1993,
  bookauthor =   {Jacques Derrida},
  author =   {Jacques Derrida},
  gender =   {sm},
  booktitle =    {La Diss{\'e}mination},
  bookauthor =   {Jacques Derrida},
  publisher =    {{\'E}dition Points},
  location =     {Paris},
  pages =    {77-213}, % perhaps: {77-148, 149-213}
  related =  {Derrida:Pharmacie1-1,Derrida:Pharmacie1-2},
  relatedtype = {reprintof},
  %relatedstring ={Nachdruck von}
}
\end{filecontents*}

\newbibmacro*{related:reprintof}[1]{%
  \entrydata*{#1}{%
    \usedriver
      {\ifnameundef{savedauthor}
         {\ifnameundef{savededitor}
            {}
            {\ifnamesequal{editor}{savededitor}
               {\clearname{editor}}
               {}}}
         {\ifnamesequal{author}{savedauthor}
            {\clearname{author}}
            {}}%
       \renewbibmacro*{related:init}{}%
       \DeclareNameAlias{sortname}{default}%
       \ifbibmacroundef{date+extrayear}
         {}
         {\renewbibmacro*{date+extrayear}{}%
          \renewbibmacro*{date}{\printdate}}%
       \renewbibmacro*{pageref}{}}
      {\thefield{entrytype}}}}

\renewcommand*{\relateddelim}{\adddot\space}

%\renewbibmacro*{related:clearauthors}{}

\renewbibmacro*{related:default}[1]{%
  \entrydata*{#1}{%
    \usedriver
      {\renewcommand*{\labelnamepunct}{\addcolon\space}%
       \renewbibmacro*{author/translator+others}{\printnames{author}}%
       \iffieldsequal{savedjournaltitle}{journaltitle}%
         {\renewbibmacro*{journal}{\bibstring{ibidem}}%
          \ifboolexpr{test {\iffieldsequal{savedvolume}{volume}} and test {\iffieldsequal{savednumber}{number}}}
            {\renewbibmacro*{volume+number+eid}{}}
            {}%
         }
         {}
       \ifnameundef{savedauthor}
         {\ifnameundef{savededitor}
            {}
            {\ifnamesequal{editor}{savededitor}
               {\clearname{editor}}
               {}}}
         {\ifnamesequal{author}{savedauthor}
            {\clearname{author}}
            {}}%
       \renewbibmacro*{related:init}{}%
       \DeclareNameAlias{sortname}{default}%
       \ifbibmacroundef{date+extrayear}
         {}
         {\renewbibmacro*{date+extrayear}{}%
          \renewbibmacro*{date}{\printdate}}%
       \renewbibmacro*{pageref}{}}
      {\thefield{entrytype}}}}

\addbibresource{\jobname.bib}
\begin{document}

\nocite{*}
\printbibliography
\end{document}

在此处输入图片描述

这里的解决方案可能有些脆弱,在其他用例中可能会失效。但相关条目的默认处理philosophy-modern似乎确实包含一些错误和我不得不反驳的狡猾的重新定义。

相关内容