[Tex/LaTex] Change bibliographystyle AEA to put year after author in brackets

bibliographiesbibtex

I already made a few changes to the original AEA bibliographystyle code. Now I want the year of publication after the authors in brackets. What should I change? This is my Latex-file:

\documentclass{article}
\usepackage{natbib}

\begin{document}

\section{Test}

Here is an example to cite \citet{abeler2010gift} in text.

\pagebreak
\addcontentsline{toc}{section}{References}
\bibliographystyle{aea}
\bibliography{paper}
\nocite{*}


\end{document}

The references are generated with Jabref and saved in a separate bibliography file (paper) and are formatted like this:

@Article{abeler2010gift,
  author    = {Abeler, Johannes and Altmann, Steffen and Kube, Sebastian and Wibral, Matthias},
  title     = {Gift exchange and workers' fairness concerns: When equality is unfair},
  year      = {2010},
  volume    = {8},
  number    = {6},
  pages     = {1299--1324},
  journal   = {Journal of the European Economic Association},
  publisher = {Wiley Online Library},
}

The bibliography style is a modified version of the American Economic Review – Style (AEA). I uploaded the file here:
https://www.file-upload.net/download-12626400/aea.bst.html

Best Answer

You can achieve the desired effect by modifying the .bst file, with a small caveat as pointed out by the 'comments' in the aea.bst file:

Copying of this file is authorized only if either
     (1) you make absolutely no changes to your copy, including name, or
     (2) if you do make changes, you name it something other than
     btxbst.doc, plain.bst, unsrt.bst, alpha.bst, abbrv.bst, agsm.bst,
     dcu.bst, cje.bst, aer.bst, or kluwer.bst.
     This restriction helps ensure that all standard styles are identical.

If you make the changes as I show below, please save it as a new .bst file and name it something else, like robinho.bst perhaps.


  1. In the .bst file, find (Ctrl+F) the FUNCTION {output.month.year} entry. This controls the formatting of the month and year output. So to add the desired brackets (note that this will change all of the formatting of the year field to include brackets), replace

    FUNCTION {output.month.year}
      {
          space month plain.space.output
          space year plain.comma "year" output.check
      }
    

    with

    FUNCTION {output.month.year}
      {
          space month plain.space.output
          space "(" year * ")" * plain.comma "year" output.check
      }
    
  2. To influence the location of the year field, go ahead and find (Ctrl+F) in the .bst file, FUNCTION {article}. Replace

    FUNCTION {article}
    { output.bibitem
      author.item.check
      format.title.if.not.sortkey.check
      crossref missing$
        { space journal italic comma "journal" output.check
          output.month.year
          output.vol.num.pages
        }
        { space format.article.crossref plain.space output.nonnull
          comma format.pages plain.space.output
        }
      if$
      fin.entry
    }
    

    with

    FUNCTION {article}
    { output.bibitem
      author.item.check
      output.month.year
      format.title.if.not.sortkey.check
      crossref missing$
        { space journal italic comma "journal" output.check
          output.vol.num.pages
        }
        { space format.article.crossref plain.space output.nonnull
          comma format.pages plain.space.output
        }
      if$
      fin.entry
    }
    
  3. Save as robinho.bst. (Do so, for the reasons I mentioned at the beginning of this answer.)

Then consider the following MWEB:

\begin{filecontents*}{\jobname.bib}
    @Article{abeler2010gift,
        author    = {Abeler, Johannes and Altmann, Steffen and Kube, Sebastian and Wibral, Matthias},
        title     = {Gift exchange and workers' fairness concerns: When equality is unfair},
        year      = {2010},
        volume    = {8},
        number    = {6},
        pages     = {1299--1324},
        journal   = {Journal of the European Economic Association},
        publisher = {Wiley Online Library},
    }
\end{filecontents*}

\documentclass{article}
\usepackage{natbib}
\usepackage{filecontents}

\begin{document}
    \section{Test}

    Here is an example to cite \citet{abeler2010gift} in text.

    \bibliographystyle{robinho}% <-----------
    \bibliography{\jobname}% <-----------
%   \nocite{*}

\end{document}

which gives the output:

enter image description here

Related Question