LaTeX forum ⇒ GeneralPrevent 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

Postby Fibonacci » Fri Mar 01, 2013 3:25 pm

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

Say, for example, I have a document like this:
  1. \documentclass{article}
  2. \usepackage{url}
  3.  
  4. \begin{document}
  5. 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/}
  6. \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:

  1. \documentclass{article}
  2. \usepackage{url}
  3.  
  4. \begin{document}
  5. 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/}}
  6. \end{document}


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

Tags:

Return to “General”

Who is online

Users browsing this forum: No registered users and 4 guests