# Limit author list in reference using natbib

I am writing my thesis using natbib with \bibliographystyle{abbrvnat}. I want the reference list (bibliography) to obey the following rules:

1. Show all authors names when the author number is less than 5.
2. Show "first author et al" when author number is greater than 4.

I do not want to change the citation appearance in the text. I am very very confused while finding a solution for the above. I am in a little bit hurry. Kindly help me and please do not scold.

\documentclass[openright, twoside, 12pt, a4paper]{report}
\usepackage{amstext,amssymb,amsmath,amsfonts}

\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{graphicx}
\usepackage{subfigure}

\usepackage{color}
\usepackage{hyperref}
\usepackage{subfigure,float}
\usepackage{multirow}
\usepackage{array,booktabs}
\usepackage{siunitx}

\usepackage{physics}

\usepackage{float}

\usepackage{natbib}
\usepackage[sc]{mathpazo}

\usepackage{fancyhdr}

\usepackage{rotating}
\usepackage{lscape}
\usepackage{longtable}
\usepackage{tabularx}

\usepackage{makecell}

\usepackage{afterpage}

\begin{document}

\pagenumbering{roman}
\include{cover/title}

\begin{spacing}{1.5}

\tableofcontents

\pagenumbering{arabic}

\include{cover/def} %include all the definitions
\include{chapter_01/introduction}

\appendix

\bibliographystyle{abbrvnat}
\bibliography{thesis_bib}

\end{spacing}

\end{document}

• While your question is fairly clear as it is now, you can increase your chances of getting a good answer quickly by providing us with an MWE/MWEB. If you add an MWE to your question we won't lose time recreating a short example document that you already have and can get started more quickly to write the answer that you desire. – moewe May 23 '18 at 13:37
• I have given one – user43280 May 23 '18 at 14:00
• Unfortunately, that is not an MWE: It is not minimal, because it loads packages that have nothing to do with the bibliography. And it is not working: We have none of the \included files and we also don't have your example .bib entries. – moewe May 23 '18 at 14:05

As far as I can see there is no convenient option to do this, you have to modify the .bst style.

1. Locate abbrvnat.bst on your machine. You can do this by typing kpsewhich abbrvnat.bst into the command line/terminal. Alternatively, obtain a copy of the file from CTAN http://mirrors.ctan.org/macros/latex/contrib/natbib/abbrvnat.bst
2. Copy the file to a location where TeX can find it. The document directory will do fine.
3. Rename the file to abbrvnat-maxbibnames4.bst (this is a requirement of the license for abbrvnat.bst, a modified version of abbrvnat.bst should not bear the same name)
4. Open the file and find the function FUNCTION {format.names} (in my version ll. 216-243) and replace the entire block with

FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$'numnames := numnames 'namesleft := { namesleft #0 > } { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
nameptr #1 >
{ namesleft #1 >
{ ", " * t * }
{ numnames #2 >
{ "," * }
'skip$if$
t "others" =
{ " et~al." * }
{ " and " * t * }
if$} if$
}
{
t
namesleft #4 >
{ " et al."  *
#1 'namesleft := }
'skip$if$
}
if$nameptr #1 + 'nameptr := namesleft #1 - 'namesleft := } while$
}

5. Add your name and date and explain the modification in the comments at the top of the file.

6. Use \bibliographystyle{abbrvnat-maxbibnames4} instead of \bibliographystyle{abbrvnat} in your document.

• Superb. I have never had a more guided help. – user43280 May 24 '18 at 17:52