Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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]}
}

@Misc{toll2009leibnitzMonaden,
  author =   {Toll, Andreas},
  title =    {{Leibniz' Philosophie der Monaden}},
  howpublished =
                  {\url{http://www.suite101.de/content/leibnitz-philosophie-der-monaden-a58452}},
  year =     2009,
  note =     {[Online; accessed 04-August-2011]}
}
share|improve this question
2  
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
2  
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

1 Answer 1

up vote 2 down vote accepted

There is a difference between \RaggedRight and \raggedright. Have you tried (and disliked) both?

I must be honest and say, that I do not quite see what you mean by it "looks ugly" from this example. Maybe you could give a more detailed description of what exactly it is that bothers you.

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).

share|improve this answer
    
Thanks for the tip, but \usepackage[hyphens]{url} did a good enough job to avoid modifying the bibliography, so I did not use urlbst. –  user17106 Jan 8 '13 at 11:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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