如果超过三位作者将 et al

如果超过三位作者将 et al

我对以下内容有疑问。我需要以下引用样式:

  • 如果一位作者只展示该作者,
  • 如果有三位作者,首次显示所有三位,但在后续引用中仅显示第一位,
  • 如果超过三位作者,则只显示第一位

以下文档可以正常工作,首次显示作者超过三位时,随后显示第一作者加上

但问题是,当作者超过四位时,如何显示,只显示第一位作者

\documentclass{article}
\usepackage{etoolbox}
\usepackage{natbib}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{test1,
  author = {Author, A.  and Buthor, B  and Cuthor, C and Duthor, D},
  title = {Title},
  journal = {Journal},
  year = 2013
}
@article{test2,
  author = {Author, A. and Buthor, B and Cuthor, C and Duthor, D},
  title = {Title},
  journal = {Journal},
  year = 2012
}
@article{test3,
  author = {Author, A.  and Buthor, B  and Cuthor, C and Duthor, D and wael , mohamed and yafooz },
  title = {Title},
  journal = {Journal},
  year = 2013
}
\end{filecontents}


\newcommand{\citelist}{}

\newcounter{currentcite}
\newcounter{currentcitetotal}
\newcommand{\mycite}[1]{
  \setcounter{currentcitetotal}{0}
  \renewcommand{\do}[1]{\addtocounter{currentcitetotal}{1}}
  \docsvlist{#1}
  \renewcommand{\do}[1]{%
  \addtocounter{currentcite}{1}%
  \ifinlist{##1}{\citelist}
    {\citet{##1}}
    {\citet*{##1}\listadd{\citelist}{##1}}%
  \ifnumcomp{\value{currentcitetotal}}{>}{\value{currentcite}}
    {, }
    {}%
  }
  \docsvlist{#1}
}


\begin{document}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\mycite{test1,test2}
ffffffffffffffffff
\mycite{test1}
yyyyyyyyyyyyyyyyyyyyyyyyyyyy
\mycite{test2}
ffffffffffffffffff\mycite{test3}

\bibliographystyle{plainnat}
\bibliography{\jobname}
\end{document}

相关内容