LaTeX forum ⇒ General ⇒ Prevent Line Break at certain Place in URL

LaTeX specific issues not fitting into one of the other forums of this category.
Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am

Prevent Line Break at certain Place in URL

Is it possible to prevent a linebreak at a certain point in a URL?

Say, for example, I have a document like this:
\documentclass{article}\usepackage{url} \begin{document}Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam accumsan turpis ac est scelerisque dignissim. Sed vel lorem orci, et laoreet leo. \url{http://www.example.com/}\end{document}

The break in the URL appears right after "http:", which I consider unacceptable.

To clarify, I'm just looking to prevent a line break at that particular point, not in the whole URL, so this for example would not be an acceptable solution:

\documentclass{article}\usepackage{url} \begin{document}Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam accumsan turpis ac est scelerisque dignissim. Sed vel lorem orci, et laoreet leo. \mbox{\url{http://www.example.com/}}\end{document}

Is there any way to just prevent the aforementioned line break, but allow others on the same URL?

Tags: