Biblatex:获取唯一名称以包含在收藏编辑器中

Biblatex:获取唯一名称以包含在收藏编辑器中

我正在使用biblatex后端biber和引用样式biblatex-juardiss。我正在使用选项uniquename=allfull来避免产生歧义的作者姓名。我的问题是 uniquename 列表包括来自@BOOK@ARTICLE和 的作者和编辑@COMMENTARY。但 的编辑@INCOLLECTION未包含在 uniquename 列表中。 \value{uniquename}来自@INCOLLECTION编辑器的始终返回零。

我尝试了以下最小代码:

\begin{filecontents*}{lit.bib}

@BOOK{werner,
  author = {Werner, Dennis},
  title = {Title of the Book}
}

@INCOLLECTION{werner2,
  editor = {Schneider, Uwe AND Werner, Hans},
  title = {Title of the Article},
  booktitle = {Title of the Book},
  Author = {Tester, Hans}
}


@COMMENTARY{werner3,
  editor = {Schneider, Uwe AND Werner, Hans},
  title = {Title of the Article}
}

\end{filecontents*}



\documentclass{article}
\usepackage[a5paper, left=1.9cm, right=2.1cm, top=1.2cm, bottom=2.3cm]{geometry}

\usepackage[
backend=biber,
style=authortitle,
uniquename=allfull
]{biblatex}

\bibliography{lit}

\renewbibmacro*{cite}{%
  \iffieldundef{shorthand}
    {\ifnameundef{labelname}
       {}
       {\printnames{labelname}%
        \setunit{\nametitledelim}}%
     \usebibmacro{cite:title}}%
    {\usebibmacro{cite:shorthand}}%
    \ifentrytype{incollection}{\addcomma\addspace\printnames{editor}}{}%
    }
    
\DeclareNameFormat[incollection]{editor}{%
  \iffootnote{%
    \ifcase\value{uniquename}%
      {\usebibmacro{name:first-last}{#1}{#6}{}{#7}}%
    \or
      \ifuseprefix
        {\usebibmacro{name:first-last}{#1}{#4}{#5}{#8}}
        {\usebibmacro{name:first-last-init}{#1}{#4}{#6}{#8}}%
    \or
      \usebibmacro{name:first-last-init}{#1}{#3}{#5}{#7}%
    \fi%
    \usebibmacro{name:andothers}%
    }
    {\mkbibemph{%
      \iffirstinits%
        {\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}%
        {\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}%
      \usebibmacro{name:andothers}%
    }}%
}%

\begin{document}

1\footcite{werner}
2\footcite{werner2}
% 3\footcite{werner3}

\end{document}

结果我得到:

1 Werner,本书标题。

2 Tester,“文章标题”,Schneider 和 Werner。

由于两个 Werners 是不同的人,因此这个结果是不可预测的。

如果我引用werner3,我会得到:

1 D. Werner,本书标题。

2 Tester,“文章标题”,Schneider 和 Werner。

3 Schneider 和 H. Werner,文章标题。

如何将编辑者@INCOLLECTION纳入唯一名称列表?

答案1

姓名消歧义仅考虑labelname列表中的姓名。对于您的@incollection条目,编辑者不属于其中,labelname因为该author字段可用。解决此问题的一种方法是交叉引用@collection其中编辑者构成条目的条目labelname

\begin{filecontents*}{\jobname.bib}
@BOOK{werner,
  author = {Werner, Dennis},
  title = {Title of the Book}}
@COLLECTION{schneider,
  options = {skipbib},
  editor = {Schneider, Uwe AND Werner, Hans},
  title = {Title of the Book}}
@INCOLLECTION{tester,
  title = {Title of the Article},
  author = {Tester, Hans},
  crossref = {schneider}}
\end{filecontents*}

\documentclass{article}
\usepackage[backend=biber,style=authortitle,uniquename=allfull,mincrossrefs=1]{biblatex}
\bibliography{\jobname}

\newbibmacro*{in:labelname}[1]{%
  \entrydata{#1}{\printnames{labelname}}}

\renewbibmacro*{cite}{%
  \iffieldundef{shorthand}
    {\ifnameundef{labelname}{}{%
       \printnames{labelname}%
       \setunit{\nametitledelim}}%
     \usebibmacro{cite:title}%
     \ifentrytype{incollection}
       {\setunit{\addcomma\space}%
        \usebibmacro{in:labelname}{\thefield{crossref}}}{}}
    {\usebibmacro{cite:shorthand}}}

\begin{document}
\null\vfill
Filler.\footcite{werner} Filler.\footcite{tester}
\printbibliography
\end{document}

在此处输入图片描述

请注意,此mincrossrefs=1设置可确保交叉引用的条目在名称消歧义中得到考虑。为了在参考书目中隐藏此条目,我们在文件skipbib=true中进行了设置bib

相关内容