2

I am trying to get "et al." after the second citation but so far haven't found a solution that works for me despite the many working examples I have found across the Internet including this one: biblatex – et al. beginning from second citation?. Note that I am using TeXShop version 3.65 (where biber is invoked by %!BIB TS-program = biber), biber version 2.1 and TeXlive 2015.

I will be happy for a solution that encompasses footnotes as well. Below is 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}

2 Answers2

5

On way to tackle this problem is to

1) set the default number of cites names maxcitenames=1

2) and for all cites, occuring the first time, increase this number \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}

enter image description here

  • Yes it does! I guess maxcitenames=1 did the trick!! I am grateful – manmadiji Aug 05 '16 at 11:18
  • @manmadiji If the answer helped you, you might want to consider accepting it (using the green tick mark). That is the preferred way to say "thank you" for an answer (once you have enough reputation, you can also up-vote the answer). – moewe Aug 05 '16 at 16:10
0

Extending on the answer by samcarter, I would rather suggest maxcitenames=2

Otherwise, the second author in a 2-author list will also be replaced by et al. This is undesired as "et al." means "and others."

malvoisen
  • 1
  • 2