旧答案

旧答案

如同这个帖子,我想将引文中的作者列表限制为一位 + 等人(即使作者团队可能不同)。建议的解决方案(uniquelist=false)本质上也有效,但与结合使用时会出现问题citestyle=authoryear-comp。如果在参考书目中,同一位(第一)作者一次以写出的名字出现,一次仅以姓名首字母出现,则不会将其视为同一作者。因此,在引文列表中,即使如此citestyle=authoryear-comp,引文也会分开。以下是一个例子:

\documentclass{article}

\usepackage[
    citestyle=authoryear-comp,
    maxcitenames=1,
    giveninits=true,
    uniquename=init,
    uniquelist=false,
    ibidtracker=context,
 % 
    bibstyle=authoryear,
    dashed=false, % dashed: substitute rep. author with ---
    date=year,
    sorting=nyt,
    minbibnames=3,
    hyperref=true,
    backref=true,
    citecounter=true,
    citetracker=true,
    natbib=true, % natbib compatibility mode (\citep and \citet still work)
    backend=biber, % Compile the bibliography with biber
]{biblatex}

\usepackage{filecontents}
\usepackage{hyperref}

\begin{filecontents}{\jobname.bib}
@misc{ABC01,
  author = {Author, A. and Buthor, B. and C},
  year = {2001},
  title = {Alpha},
}
@misc{ABC02,
  author = {Author, A. and Buthor, B. and Cuthor, C., and Duthor, D.},
  year = {2001},
  title = {Beta},
}
@misc{ADE01,
  author = {Author, Andrew and Duthor, D. and E},
  year = {2001},
  title = {And now for something completely different},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

Some text \citep{ABC01, ABC02, ADE01}.

Some text \autocite{ADE01}.

\printbibliography

\end{document}

在此处输入图片描述

我尝试通过以下方式修复此行为这个帖子并设置giveninits=trueuniquename=init,但这并没有解决问题。我怎样才能biblatex治疗作者,A.作者安德鲁是同一作者吗?

答案1

biblatexv3.20 开始,您可以告诉biblatex仅使用首字母进行散列,这在这里就足够了,或者您可以使用唯一的“名称 ID”在本地覆盖名称哈希。

如果你只希望使用首字母进行哈希处理,请使用

\documentclass{article}

\usepackage[
  backend=biber,
  style=authoryear-comp,
  maxcitenames=1,
  giveninits=true,
  uniquename=init,
  uniquelist=false,
]{biblatex}

\usepackage{hyperref}

\DeclareNamehashTemplate{
  \namepart[hashscope=full]{family}
  \namepart[hashscope=init]{given}
  \namepart[hashscope=full]{prefix}
  \namepart[hashscope=full]{suffix}
}

\begin{filecontents}{\jobname.bib}
@misc{ABC01,
  author = {Author, A. and Buthor, B. and C},
  year   = {2001},
  title  = {Alpha},
}
@misc{ABC02,
  author = {Author, A. and Buthor, B. and Cuthor, C., and Duthor, D.},
  year   = {2001},
  title  = {Beta},
}
@misc{ADE01,
  author = {Author, Andrew and Duthor, D. and E},
  year   = {2001},
  title  = {And now for something completely different},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Some text \autocite{ABC01, ABC02, ADE01}.

Some text \autocite{ADE01}.

\printbibliography
\end{document}

如果你想覆盖哈希,请使用

\documentclass{article}

\usepackage[
  backend=biber,
  style=authoryear-comp,
  maxcitenames=1,
  giveninits=true,
  uniquename=init,
  uniquelist=false,
]{biblatex}

\usepackage{hyperref}

\begin{filecontents}{\jobname.bib}
@misc{ABC01,
  author = {id=A1, family=Author, given=A. and Buthor, B. and C},
  year   = {2001},
  title  = {Alpha},
}
@misc{ABC02,
  author = {id=A1, family=Author, given=A. and Buthor, B. and Cuthor, C. and Duthor, D.},
  year   = {2001},
  title  = {Beta},
}
@misc{ADE01,
  author = {id=A1, family=Author, given=Andrew and Duthor, D. and E},
  year   = {2001},
  title  = {And now for something completely different},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Some text \autocite{ABC01, ABC02, ADE01}.

Some text \autocite{ADE01}.

\printbibliography
\end{document}

旧答案

您需要一种方法来说服biblatexAuthor, A.是同一个人。一种解决方法是,对于那些 为的条目,Author, Andrew赋予shortauthor相等的值。Author, A.authorAuthor, Andrew

\documentclass{article}

\usepackage[
  backend=biber, 
  style=authoryear-comp,
  maxcitenames=1,
  minbibnames=3,
  giveninits=true,
  uniquename=init,
  uniquelist=false,
  dashed=false
  date=year,
  backref=true,
  citecounter=true,
]{biblatex}

\usepackage{hyperref}

\begin{filecontents}{\jobname.bib}
@misc{ABC01,
  author = {Author, A. and Buthor, B. and C},
  year   = {2001},
  title  = {Alpha},
}
@misc{ABC02,
  author = {Author, A. and Buthor, B. and Cuthor, C., and Duthor, D.},
  year   = {2001},
  title  = {Beta},
}
@misc{ADE01,
  author      = {Author, Andrew and Duthor, D. and E},
  shortauthor = {Author, A. and Duthor, D. and E},
  year        = {2001},
  title       = {And now for something completely different},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

Some text \parencite{ABC01, ABC02, ADE01}.

Some text \autocite{ADE01}.

\printbibliography

\end{document}

一些文本 (作者等 2001a,b,c)。 一些文本 (作者等 2001c)。

相关内容