TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

This is a slightly odd one. I've been trying to get \url{} blocks to wrap really long URLs, and the only thing that seemed to work was to renew the \UrlBreaks command to allow breaking on practically all characters.

However, whilst that prevents the long URL from overlapping the page margins, it seems to still push characters into the marginal notes spaces (defined by \marginparsep and \marginparwidth).

The following document shows the problem:


\usepackage[colorlinks=true, urlcolor=blue]{hyperref}
\usepackage[margin=1cm, bottom=3.5cm, top=3.5cm, head=2cm]{geometry}






When I compile it, half of the 'y' in really, and the entire '-' get pushed into the \marginparsep area. However, this does not seem to happen for blocks of regular text. See here:

enter image description here

Does anyone know why this happens, and what to do to fix it?

share|improve this question
up vote 8 down vote accepted

There is no flexibility in your lines so TeX has nowhere to break.


\Urlmuskip = 0mu plus 1mu

enter image description here

share|improve this answer
That was it. Cheers! – Rsaesha Apr 10 '13 at 17:00

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.