I tried two ways to format a bibliography with lots of URL's:

1. Without 'RaggedRight'
2. With 'RaggedRight'

In the first case, there are wide spaces between words in some items, that a really not acceptable. In the second case, the whole bibliography looks rather ugly for my taste.

So I'm looking for a third way, without 'RaggedRight' and without the spaces between words. Here is a MWE:

\documentclass[fontsize=14pt, DIV=13, german, a4paper, table]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{url}
\usepackage{ragged2e}
\usepackage[hyphenbreaks]{breakurl}
\sloppy

\begin{document}
\part{Part 1}
\label{part:part-1}

\chapter{Chapter 1}
\label{chap:chapter-1}

\section{Section 1}
\label{sec:section-1}

Here I cite two publications: first \cite{toll2009leibnitzMonaden},
then \cite{duarte2011jobsTrends}.

% \begin{RaggedRight}
\bibliographystyle{alpha}
\bibliography{literatur/literatur}
% \end{RaggedRight}

\end{document}


using the following .bib file:

@Misc{duarte2011jobsTrends,
author =   {Duarte, Gustavo},
title =    {{Programming Language Jobs and Trends}},
howpublished =
{\url{http://duartes.org/gustavo/blog/post/programming-language-jobs-and-trends}},
year =     2011,
note =     {[Online; accessed 25-July-2011]}
}

author =   {Toll, Andreas},
title =    {{Leibniz' Philosophie der Monaden}},
howpublished =
year =     2009,
note =     {[Online; accessed 04-August-2011]}
}

-
You have a tough setup the text contains large "chunks" of characters that can't be broken up, you use a 14pt font size, and the measure (line width) is quite narrow. What is the actual line width you're working with? If you were to work with 1"-wide margins and a \small font size directive for the bibliography, you'd find that -- at least for the two entries you show -- both fully-justified and RaggedRight text may look fairly good. Incidentally, don't use the \usepackage[hyphenbreaks]{breakurl} directive; use \usepackage[hyphens]{url} instead. –  Mico Jan 7 '13 at 17:05
breakurl doesn't work with pdflatex. You getting considerably better results with \usepackage[hyphens]{url} as suggested by Mico. See also tex.stackexchange.com/q/3033/15925 . –  Andrew Swann Jan 8 '13 at 8:34
Ok, thanks, after playing around with the different options I decided to not use RaggedRight, since \usepackage[hyphens]{url} actually does a better job in avoiding the big gaps between words. –  user17106 Jan 8 '13 at 11:47

There is a difference between \RaggedRight and \raggedright. Have you tried (and disliked) both?
Alternatively you could also take a look at this package that is specifically designed to handle URLs in the bibliography: http://www.ctan.org/tex-archive/biblio/bibtex/contrib/urlbst It has a alphaurl.bst, that may do a formatting to your liking. The disadvantage would be that you would need to modify your bibliography to the new tags (URL and Lastchecked).