TransWikia.com

Altering format.date in bst to place parentheses around year

TeX - LaTeX Asked on June 2, 2021

I would like to add parentheses to the year in the bibliography of a paper (i.e., Kyle, A. S. (1985). etc.). Unfortunately, the journal .bst file is not quite correct on this point. The link to the .bst file is at:
http://rfssfs.org/files/2012/09/RFS-BibTeX-style-file-010414.pdf

I have been unsuccessful altering the format.date function to accomplish this based on related questions. Below is a MWE:

documentclass[11pt, letterpaper,doublespacing]{article} 
usepackage{setspace} 
makeatother 
usepackage{ntheorem} 
    RequirePackage{amsmath,amsfonts,amssymb,xcolor,graphicx,natbib,booktabs,geometry,chngcntr,comment,array,dcolumn,subfig, lscape, longtable}
usepackage[title]{appendix}
usepackage[labelfont=bf,labelsep=newline]{caption}  %Make Table and Figure bold
theoremstyle{plain}  %COMMENTED 10/6/14

begin{document}
cite{Kyle_Econ_1985} is a seminal paper.

bibliographystyle{rfs}
bibliography{mwe_bib}

end{document}

Here is the .bib entry:

@ARTICLE{Kyle_Econ_1985,
  author = {Kyle, Albert S.},
  title = {Continuous Auctions and Insider Trading},
  journal = {Econometrica},
  year = {1985}, 
  volume = {53},
  pages = {1315--1336},
}

2 Answers

Replace the date function with:

FUNCTION {format.date}
  { year empty$
      { "" }
      { year "(" swap$ * ")" *}
    if$
  }

enter image description here

Correct answer by user2478 on June 2, 2021

A modification of user2478's proposal that will remove the comma between the authors and the year and keep the extra label (a, b in case of multiple entries with the same year) inside the brackets:

FUNCTION {format.date}
  { year empty$
    { "" }
    { year " (" swap$ * extra.label * ")" *}
  if$
  before.all 'output.state :=
  }

Answered by lemontree on June 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP