[Tex/LaTex] How to list more than two authors in a citation

apa-stylebibtexnatbib

When I cite a paper with more than 2 authors, the citation in the text body is "Author1 et al.". Is it possible to change this default number from 2 to 3, so that a paper with 3 authors will be cited as "Author1 and Author2 and Author3"?

I work with bibtex and natbib. I looked at the natbib reference but did not find this option.

Best Answer

You've indicated that you use the apa bibliography style. I suggest you proceed as follows to achieve your formatting objective:

  • Find the file apa.bst in your TeX distribution. Make a copy of this file and call the copy, say, apa-erel.bst.

  • Open the file apa-erel.bst in a text editor. (The editor you use for the main tex file will do fine.

  • In the file apa-erel.bst, locate the function format.lab.names. (In my copy of this file, the function starts on line 866.)

  • Delete (or comment out) all 17 or so lines of this function and replace them with the following code:

    FUNCTION {bbl.and}
    { "and"}
    FUNCTION {space.word}
    { " " swap$ * " " * }
    FUNCTION {format.lab.names}
    {'s :=
     "" 't :=
      #1 'nameptr :=
      s num.names$ 'numnames :=
      numnames 'namesleft :=
        { namesleft #0 > }
        { s nameptr
          "{vv~}{ll}" format.name$
          't :=
          nameptr #1 >
            {
              nameptr #2 =
              numnames #3 > and
                { "others" 't :=
                  #1 'namesleft := }
                'skip$
              if$
              namesleft #1 >
                { ", " * t * }
                {
                  s nameptr "{ll}" format.name$ duplicate$ "others" =
                    { 't := }
                    { pop$ }
                  if$
                  t "others" =
                    { " et~al." * }
                    {
                      numnames #2 >
                        { "," * }
                        'skip$
                      if$
                      bbl.and
                      space.word * t *
                    }
                  if$
                }
              if$
            }
            't
          if$
          nameptr #1 + 'nameptr :=
          namesleft #1 - 'namesleft :=
        }
      while$
    }
    
  • Save the file apa-erel.bst, either in a directory that's searched by BibTeX or in the directory where your main tex file is located. If you choose the former method, be sure to update the filename database of your TeX distribution suitably.

  • In your main tex file, change the instruction \bibliographystyle{apa} to \bibliographystyle{apa-erel} and perform a full recompile cycle -- latex, bibtex, latex, latex -- to fully propagate all changes.

Happy BibTeXing!

A full MWE:

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@misc{ab, author = "A and B", title = "X", year = 3001, }
@misc{abc, author = "A and B and C", title = "Y", year = 3002, }
@misc{abcd, author = "A and B and C and D", title = "Z", year = 3003, }

\end{filecontents}

\documentclass{article}
\usepackage[authoryear,round]{natbib}
\bibliographystyle{apa-erel}
\begin{document}
\cite{ab}

\cite{abc}

\cite{abcd}

\bibliography{mybib}
\end{document}