URLs break fine in my bibliography. My problem is that they are justified which creates a gap between "URL:" and the URL itself (see below). Is there a way to left align only the URL? I am using natbib.
Here is a minimum working example:
\documentclass[11pt, oneside]{report}
\usepackage[hyphens]{url}
\usepackage[round]{natbib}
\begin{document}
\cite{Shaffer2004}
\bibliographystyle{dcu}
\bibliography{references}
\end{document}
This is the references.bib file:
@article{Shaffer2004,
author = {Shaffer, David Williamson and Squire, Kurt R and Gee, James P},
journal = {Phi Delta Kappan},
pages = {104--111},
number = {2},
title = {{Video games and the future of learning}},
url = {http://website.education.wisc.edu/kdsquire/tenure-files/23-pdk-VideoGamesAndFutureOfLearning.pdf},
volume = {87},
year = {2004}
}
Best Answer
The url's in the bibliography are typeset with
\harvardurl
which is defined asAs far as I can tell these are always preceeded by a
\newline
too. So one redefinition would be to box this up as a raggedright paragraph. I prefer to use the\RaggedRight
command from theragged2e
package for this:I would seriously consider replacing the
\textit
in the definition with\url
and perhaps changing the url font in the bibliography to italics, for example as follows: