如何使用 biblatex-chicago 获取从第二个引文开始的 et al.

如何使用 biblatex-chicago 获取从第二个引文开始的 et al.

我试图在第二次引用后得到“et al.”但到目前为止还没有找到适合我的解决方案,尽管我在互联网上找到了许多可行的例子,包括这个:biblatex – 等从第二次引用开始?。请注意,我使用的是 TeXShop 版本 3.65(其中 biber 由 %!BIB TS-program = biber 调用)、biber 版本 2.1 和 TeXlive 2015。

我很高兴有一个包含脚注的解决方案。以下是 MWE

%!TEX TS-program = xelatex
%!BIB TS-program = biber
%!TEX encoding = UTF-8 Unicode

\documentclass[hidelinks,12pt]{article}
\usepackage[authordate,
    citetracker=true,
    sortcites=true, 
    sorting=ynt, 
    pagetracker=true,
    backref=true,
    minnames=1,
    maxbibnames=10,
    minbibnames=7,
    uniquelist=true,
    uniquename=allfull,
        maxcitenames=3]
        {biblatex-chicago}
\usepackage{xpatch}
\usepackage{filecontents}
\usepackage {hyperref}  

%bibfile        
\begin{filecontents}{myfile.bib}
@article{miscztyn2005history,
  title      = {The History of Economic Growth: An Econometric Perspective},
  author     = {Miscztyn, Martinez and Shirleen, Venucci and Alfred, Villanueva},
  journal    = {World Economics Review},
  volume     = {56},
  number     = {3},
  pages      = {234--257},
  year       = {2005},
  publisher  = {Elsevier},
}
\end{filecontents}

%add bibfile
\addbibresource{myfile.bib}

\AtEveryCitekey{\ifciteseen{}{\clearfield{namehash}}}

\xpatchbibmacro{cite}
{\printnames{labelname}}
{\ifciteseen
{\printnames{labelname}}
{\printnames[][1-99]{labelname}}}
{}
{}

\xpatchbibmacro{textcite}
{\printnames{labelname}}
{\ifciteseen
{\printnames{labelname}}
{\printnames[][1-99]{labelname}}}
{}
{}

\begin{document}
This is the first citation \textcite{miscztyn2005history}. Names of all authors are displayed as specified in maxcitenames. Beginning with the second citation, I want to get Miscztyn et al. (2005). Instead, I am getting \textcite{miscztyn2005history} repeated just as with the first citation.

\begin{refcontext}[sorting=nyt]                     
\printbibliography                           
\end{refcontext}
\end{document}

答案1

解决这个问题的方法是

1)设置默认引用名称数量maxcitenames=1

2)对于所有第一次出现的引用,增加此数字\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{99}}}

%!TEX TS-program = xelatex
%!BIB TS-program = biber
%!TEX encoding = UTF-8 Unicode

\documentclass[hidelinks,12pt]{article}
\usepackage[authordate,
citetracker=true,
sortcites=true, 
sorting=ynt, 
pagetracker=true,
backref=true,
minnames=1,
maxbibnames=10,
minbibnames=7,
uniquelist=true,
uniquename=allfull,
maxcitenames=1]
{biblatex-chicago}
\usepackage{xpatch}
\usepackage{filecontents}
\usepackage{hyperref}  

%bibfile        
\begin{filecontents}{myfile.bib}
    @article{miscztyn2005history,
        title={The History of Economic Growth: An Econometric                 Perspective},
        author={Miscztyn, Martinez and Shirleen, Venucci and Alfred, Villanueva},
        journal={World Economics Review},
        vol={56},
        number={3},
        pages={234--257},
        year={2005},
        publisher={Elsevier}
    }
\end{filecontents}

%add bibfile
\addbibresource{myfile.bib}

\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{99}}}

\xpatchbibmacro{cite}
{\printnames{labelname}}
{\ifciteseen
    {\printnames{labelname}}
    {\printnames{labelname}}}
{}
{}

\xpatchbibmacro{textcite}
{\printnames{labelname}}
{\ifciteseen
    {\printnames{labelname}}
    {\printnames{labelname}}}
{}
{}

\begin{document}
    This is the first citation \textcite{miscztyn2005history}. Names of all authors are displayed as specified in maxcitenames. Beginning with the second citation, I want to get Miscztyn et al. (2005). Instead, I am getting \textcite{miscztyn2005history} repeated just as with the first citation.

    \begin{refcontext}[sorting=nyt]                     
        \printbibliography                           
    \end{refcontext}
\end{document}

在此处输入图片描述

答案2

扩展 samcarter 的答案,我宁愿建议maxcitenames=2

否则,双作者列表中的第二作者也将被替换为这是不受欢迎的,因为“et al.”的意思是“和其他人”。

相关内容