6

I am writing a paper and I have already added the references through bibtex.

There is something I don't like about the online references, they get to stretched out, from one side of the page to the other. And the online link gets out of the borders of the page.

Check the attached picture to understand what I mean. [3] is the problem

enter image description here

this is the bibtex code I use for that reference. Any solution? Suggestions?

@misc{domination,
Title = {Heterogeneous Systems Dominate the Green500},
Author = { },
Howpublished = {\url{http://www.hpcwire.com/off-the-wire/two-brains-better-one-heterogeneous-systems-dominate-green500/}},
Month = nov,
Year = {2013},
Url = {http://www.hpcwire.com/off-the-wire/two-brains-better-one-heterogeneous-systems-dominate-green500/}}
  • 4
    You can try with \usepackage[hyphens]{url} so that the offending URL can also be split at hyphens. – egreg Jan 14 '14 at 21:34
  • 1
    often, a bibliography with a lot of urls looks better ragged right. – barbara beeton Jan 14 '14 at 21:38
  • @egreg where should I write that piece of code? when I do that in my *.tex file I get error. – Kristof Tak Jan 15 '14 at 8:44
  • 1
    @WolfgangKuehne You should have the code before loading hyperref. – egreg Jan 15 '14 at 8:45
2

Just for the sake of closure:

There are a couple of ways to tackle this problem.

  1. As described by egreg, you can try using:

    \usepackage[hyphens]{url}

    At your preamble (i.e., just after \documentclass{})

  2. You can configure ---or even change--- your .bst file (the one that goes in \bibliographystyle{yourfile.bst}) so you can get exactly the results you want (in the same way as, for example, IEEEtran does it.

Of course I would recommend going for the easiest and direct one: just use \usepackage[hyphens]{url} in your preamble and let the magic happen :)

3

I consider long URLs in bibliographies a real pain: in the printed version they are useless (who sits down and manually types a 99 character long URL?), while in an electronic version they can better be a short hyperlink. Notice that 99 is the length of the present example, but there are longer ones, maybe full of %, & and ? that make it almost impossible to copy them manually. So, what are they for?

After the rant, here's a possible solution. You can use a feature of the url package:

\usepackage[hyphens]{url}

This call should go before loading hyperref (this package also loads url, but without options; if url has already been loaded, it's not reloaded and the options are respected).

The option allows \url to break a line at hyphens, which normally is not desired, because it may introduce ambiguities.

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.