0

I am trying to put url and doi from the bibliography to the end of references, but it cannot appear. I would appreciate any suggestions.

The packages that I have in the preamble and main body of Doc is:

\documentclass[12pt]{article} 
\usepackage{natbib}    
\usepackage{bbm}                  
\begin{document}
\citet{fay1979estimates} 
\bibliographystyle{plain}
\bibliography{Bibliography}
\end{document}

The bib item in my Bibliography file is:

@article{fay1979estimates,
  title={Estimates of income for small places: an application of James-Stein procedures to census data},
  author={Fay, Robert E and Herriot, Roger A},
  journal={Journal of the American Statistical Association},
  volume={74},
  number={366},
  pages={269--277},
  year={1979},
  publisher={Taylor \& Francis},
  url={http://www.jstor.org/stable/2286322},
 doi={10.2307/2286322}
}

I would like the reference be like this:

Fay, R. E. and R. A. Herriot (1979). "Estimates of Income for Small Places: An Application of James-Stein Procedures to Census Data." Journal of the American Statistical Association 74: 269-277, Available at: http://www.jstor.org/stable/2286322, DOI=10.2307/2286322.

But it appears like this: Fay, R. E. and R. A. Herriot (1979). Estimates of income for small places: an application of james-stein procedures to census data. Journal of the American Statistical Association 74, 269-277.

Thanks.

2
  • 1
    Welcome, the old system is so old, that it doesn't handle urls and dois properly. Due to that shortcoming, modern biblatex was developed. If you are not publishing with a journal or big publisher, consider using biblatex.
    – Johannes_B
    Jan 7, 2017 at 16:52
  • 1
    In your MWE you use bibtex syntax, but you have tagged the question with biblatex. Can you please clarify? Jan 7, 2017 at 19:20

1 Answer 1

1

It's much easier to change things like that with Biblatex. Then including doi and url is done by default, so you don't have to do anything special for that. Here is a short document showing that:

\documentclass{article} 
\usepackage[style=authoryear,giveninits,natbib]{biblatex}
\addbibresource{Bibliography.bib}

\renewbibmacro{in:}{%
  \ifentrytype{article}{}{%
  \printtext{\bibstring{in}\intitlepunct}}}

\begin{document}
\citet{fay1979estimates} 
\printbibliography
\end{document}

This yields the following

enter image description here

which is closer to what you wanted. I used the option "natbib" so it behaves more like the package you have used before, and the option "giveninits" to get just initials instead of full names. The "renewbibmacro" is for removing "In:" for articles. I didn't try to exactly copy the rest of how you wanted it printed, but that can also be done.

(If you'll do it like this you will use "biber" instead of "bibtex".)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .