当作者列表不同时,引用显示“a”“b”,例如 (2018a) 和 (2018b)

当作者列表不同时,引用显示“a”“b”,例如 (2018a) 和 (2018b)

因此,问题在于,即使作者列表不同,如果第一作者相同,它也会添加“a”和“b”,例如 2018a 和 2018b。如果文章类型为 @techreport 而不是 @article,则似乎不会发生此问题。

在此处输入图片描述

这是完整的代码。

% Preview source code

%% LyX 2.3.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,lmargin=3cm,rmargin=3cm}
\PassOptionsToPackage{natbib=true}{biblatex}
\usepackage{color}
\usepackage{babel}
\usepackage{setspace}
\usepackage[unicode=true,pdfusetitle,
 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=true]
 {hyperref}
\hypersetup{
 linkcolor=blue, urlcolor=blue, citecolor=blue}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{amssymb}
\usepackage{afterpage}
\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{changepage}
\usepackage{afterpage}

\usepackage{newunicodechar} 
\DeclareUnicodeCharacter{FFFD}{?????}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Code for citation in good style
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage[style=authoryear, uniquename=false, uniquelist=false, maxbibnames=99]{biblatex}
\renewbibmacro{in:}{}
\usepackage{hyperref}

% Just for demo
\ExecuteBibliographyOptions{maxcitenames=1}

\DeclareFieldFormat{citehyperref}{%
  \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
  \bibhyperref{#1}}

\DeclareFieldFormat{textcitehyperref}{%
  \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
  \bibhyperref{%
    #1%
    \ifbool{cbx:parens}
      {\bibcloseparen\global\boolfalse{cbx:parens}}
      {}}}

\savebibmacro{cite}
\savebibmacro{textcite}

\renewbibmacro*{cite}{%
  \printtext[citehyperref]{%
    \restorebibmacro{cite}%
    \usebibmacro{cite}}}

\renewbibmacro*{textcite}{%
  \ifboolexpr{
    ( not test {\iffieldundef{prenote}} and
      test {\ifnumequal{\value{citecount}}{1}} )
    or
    ( not test {\iffieldundef{postnote}} and
      test {\ifnumequal{\value{citecount}}{\value{citetotal}}} )
  }
    {\DeclareFieldAlias{textcitehyperref}{noformat}}
    {}%
  \printtext[textcitehyperref]{%
    \restorebibmacro{textcite}%
    \usebibmacro{textcite}}}

\makeatother

\usepackage[style=authoryear]{biblatex}
\addbibresource{References_test2.bib}
\begin{document}
\begin{doublespace}
\citet*{suarez2018unintended}

\citet*{suarez2018testtesttest}

\citet*{last2018test1}

\citet*{last2018test2}
\end{doublespace}

\pagebreak{}

\printbibliography

\pagebreak
\end{document}

并且 Reference_test2.bib 中有这个。

% Encoding: UTF-8

@techreport{suarez2018unintended,
  title={Test1},
  author={Su{\'a}rez Serrato, Juan Carlos and Einstein, Albert},
  year={2018},
  institution={Journal1}
}

@techreport{suarez2018testtesttest,
  title={Test2},
  author={Su{\'a}rez Serrato, Juan Carlos},
  year={2018},
  institution={Journal2}
}

@article{last2018test1,
  title={test1},
  author={Last, First and Lasttwo, Firsttwo},
  journal={Journal1},
  year={2018}
}

@article{last2018test2,
  title={test2},
  author={Last, First and Lasthi, Firsthi and Laster, Firster},
  journal={Journal2},
  volume={30},
  number={2},
  pages={47--60},
  year={2018}
}
@Comment{jabref-meta: databaseType:bibtex;}

答案1

这是一个有趣的效果。它可以在以下降低的 MWE 中重现

\documentclass{article}

\usepackage[style=authoryear,
  maxbibnames=99,
  maxcitenames=1,
  uniquename=false,
  uniquelist=false,
  natbib=true]{biblatex}

\begin{filecontents}{\jobname.bib}
@article{last2018test1,
  title   = {test1},
  author  = {Last, First and Lasttwo, Firsttwo},
  journal = {Journal1},
  year    = {2018},
}
@article{last2018test2,
  title   = {test2},
  author  = {Last, First and Lasthi, Firsthi and Laster, Firster},
  journal = {Journal2},
  volume  = {30},
  number  = {2},
  pages   = {47--60},
  year    = {2018},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\citet*{last2018test1}

\citet*{last2018test2}

\citet{last2018test1}

\citet{last2018test2}

\printbibliography
\end{document}

Last 和 Lasttwo (2018b)//Last、Lasthi 和 Laster (2018a)

显然,“a”和“b”对于唯一标识条目来说不是必需的。

这里的“问题”是带星号的natbib兼容性命令的使用\citet*。在natbib兼容模式下,无论输出内容是什么,都会产生(在说话时)\citet*的输出,但包含完整的作者列表。\citet\textcitebiblatexmaxcitenames

将其与 'normal' 的输出进行比较\citet,即

Last 等人(2018b)//Last 等人(2018a)

这里的“a”和“b”是必需的,以便能够将两个引用与参考书目条目唯一匹配。


根据所需的输出,您可以做几件事。

我可能会安排一些东西,这样我就不必一直使用。这可以通过删除和选项\citet*来实现。maxcitenamesuniquelist

\documentclass{article}

\usepackage[style=authoryear,
  maxbibnames=99,
  uniquelist=false,
  natbib=true]{biblatex}

\begin{filecontents}{\jobname.bib}
@article{last2018test1,
  title   = {test1},
  author  = {Last, First and Lasttwo, Firsttwo},
  journal = {Journal1},
  year    = {2018},
}
@article{last2018test2,
  title   = {test2},
  author  = {Last, First and Lasthi, Firsthi and Laster, Firster},
  journal = {Journal2},
  volume  = {30},
  number  = {2},
  pages   = {47--60},
  year    = {2018},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\citet*{last2018test1}

\citet*{last2018test2}

\citet{last2018test1}

\citet{last2018test2}

\printbibliography
\end{document}

Last and Lasttwo (2018)//Last、Lasthi 和 Laster (2018)//Last and Lasttwo (2018)//Last、Lasthi 和 Laster (2018)

但如果您想要不同的输出,也许您需要稍微不同的设置。

相关内容