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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an external bib where I put a reference to an external URL.

  author = {The Author},
  title = {The Title},
  howpublished = "\url{http://thisismyurl/2010/3/a-long-url-here}",
  year = {year}

When I compile, the URL (when displayed in Bibliography) exceeds the bounds of the page (set as customs). The URL is composed by different terms concatenated with - symbol. a-long-url-here can be the following:


The bib is inserted in the following manner:


Is there any mechanism to fix this behaviour? I checked perform a line break of an URL in bibliography manually (biblatex, hyperref) but I don't know how to use it in my situation.


For the sake of completeness, I use PdfLatex.

share|improve this question
Did you try the suggested \sloppy and \emergencystretch settings? – mafp Dec 28 '12 at 18:47
@mafp No. Where do I have to put these commands? Thanks. – Lorenzo Boaro Dec 28 '12 at 18:52
since the url package allows breaks, it sounds like you are using hyperref, which doesn't allow them by default. if you specify the option \usepackage[breaklinks]{hyperref} you should get better results. of course, this is just a guess; i'm not familiar with the IEEEbib style, so it may apply some restrictions i'm not aware of. – barbara beeton Dec 28 '12 at 18:58
To avoid the option clash, you can type \hypersetup{breaklinks=true}. – Mico Dec 28 '12 at 20:51
Don't provide both of these instructions, but only the first one -- after the hyperref package has been loaded either directly by one of your own instructions or indirectly by one of the packages you load (or by the document class). – Mico Dec 30 '12 at 0:15
up vote 3 down vote accepted

Assuming that you have a file named bibliog.bib with the contents given in your posting, the following MWE (minimum working example) generates a reference with the URL string broken at a hyphen. The key steps are (i) load the url package with the hyphens option and (ii) enable the breaklinks=true option of the hyperref package.

\setlength\textwidth{4in} % simulate a very narrow line width
\bibliographystyle{IEEEtran} % *not* IEEEbib...

enter image description here

share|improve this answer
Thanks for your support. – Lorenzo Boaro Dec 31 '12 at 8:53

Your Answer


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.