My question is related to here and here, but I could not yet find a satisfying answer. I will use the same example from this post.
I like the apalike reference style but I have trouble with breaking long references in the text. With the suggested natbib package and using citep, I get the references to break all right. However, I do not like the bibliography when using natbib, because (1) the reference key is not displayed, (2) first names are spelled out and (3) URLs are displayed.
With the following bibtex file
@Article{citeme1,
author = {Longlastname, Longfirstname and Helloworld E. Xample },
title = {A Title},
journal = {A journal},
year = {2009}
}
@Article{citeme2,
author = {Hofstadter, L. and Cooper, S.},
title = {Experiences with a roommate that has Asperger syndrome},
journal = {The Big Bang Journal},
year = {2010},
url = {http://u.rl},
}
@Article{citeme3,
author = {Cooper, Sheldon and Koothrappali, Rajesh and Wolowitz, Howard},
title = {Another example},
journal = {Another journal},
year = 2010
}
I get the following reference list when using apalike (of course, in my document, the references are not broken nicely):

This would be exactly what I want. However, of course the references in my text are not broken appropriately.
When using natbib and the expression in the preamble suggested here:
\documentclass[a5paper]{article}
\usepackage[square]{natbib}
\makeatletter
\def\@lbibitem[#1]#2{%
\if\relax\@extra@b@citeb\relax\else
\@ifundefined{br@#2\@extra@b@citeb}{}{%
\@namedef{br@#2}{\@nameuse{br@#2\@extra@b@citeb}}}\fi
\@ifundefined{b@#2\@extra@b@citeb}{\def\NAT@num{}}{\NAT@parse{#2}}%
\item[\hfil\hyper@natanchorstart{#2\@extra@b@citeb}\citep{#2}%
\hyper@natanchorend]%
\NAT@ifcmd#1(@)(@)\@nil{#2}}
\makeatother
\begin{document}
This is a paragraph with normal line breaking and hyphenation, isn't it?
Yes! It is.
This is paragraph that does not break well when citing \citep{citeme1},
or even \citep{citeme1, citeme2, citeme3}.
\bibliographystyle{plainnat}
\bibliography{f}
\end{document}
then I get the following reference list:

in which the first and third reference has full names and the second doesn't (because the full names are not in the bibtex entry). Also, the second reference still has the URL.
My question is: How can I use natbib for nice line breaking in the references in the text and get a reference list that resembles the apalike reference list (with keys, letters for first names and no URLs)?
biblatexand its APA implementationbiblatex-apa. – moewe Jan 06 '14 at 18:42biblatex-apalooks like a nice package, but I have not yet managed to install it on my ubuntu machine. I now found a workaround by using\bibliographystyle{abbrvnat}to get all names abbreviated and to parse out the url fields in my bibtex file. – user1981275 Jan 07 '14 at 18:25biblatex. – moewe Jan 08 '14 at 07:49biblatex-apawork with ubuntu (three years lateer ^^)? Does the package solved your problem? If yes maybe you could write an answer... – Bobyandbob Nov 24 '17 at 22:37