5

References: Forcing linebreaks in \url

So, in a plain document with

\usepackage{url}
\begin{document}
You can find this at \url{very-long-url}.
\end{document}

the URL will be broken down, e.g. after slashes. When however \usepackage{hyperref} is in effect, breaks are inhibited. I tried adding \usepackage{breakurl} below hyperref, and while it does break URLs again, the colorful border that hyperref added is now very faint. How could this last issue be remedied?

user2859
  • 217

2 Answers2

3

You can reset the width on the border. The needed value depends on the resolution settings of dvips. E.g. with dvips -Ppdf a value of 100 is okay, without -Ppdf you can try 5.

\documentclass[a4paper,10pt]{article}

\usepackage{hyperref}
\usepackage{breakurl}
\hypersetup{pdfborder={0 0 100}}
\textwidth=3cm
\begin{document}
\url{long/long/long/long/long/long/blub/bla/bla}
\end{document}
Hendrik Vogt
  • 37,935
Ulrike Fischer
  • 327,261
0
\href{<link url>}{<link url again>}

Works for my purposes.