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.

  • 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 '17 at 16:52
  • 1
    In your MWE you use bibtex syntax, but you have tagged the question with biblatex. Can you please clarify? – samcarter_is_at_topanswers.xyz Jan 7 '17 at 19:20
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".)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.