I need to use boxed links and ragged right text. The problem is that when a link spans two lines, though the link is broken correctly (when using pdflatex) the box around the linked text extends until the right margin. Consider the following example:
\documentclass{article}
\usepackage[textwidth=45mm]{geometry}
\usepackage[colorlinks=false]{hyperref}
\begin{document}
\raggedright
\href{http://www.ctan.org/}{The Comprehensive TeX Archive Network}
\end{document}
In the output, the link box extends beyond the end of 'TeX' and up to the right margin, thus enclosing some white space. Is there a way to make the box around the link extend only up to the end of the text and not the right margin?
\href{http://www.ctan.org/}{The Comprehensive TeX} \href{http://www.ctan.org/}{Archive Network}
– Qrrbrbirlbel Nov 6 '12 at 2:32