# hyperref, how to make 'pdfborder' larger, or add some margin between the border and the text

Using the hyperref package, is there a way to make the border around the link or whatever larger so that it is not tightly sticked to the text? Like adding some margin between the text and the box around it?

-
If you don't get an answer you can ask the question at comp.text.tex. The maintainer of packages hyperref is very active in this newsgroup. – Marco Daniel Oct 28 '11 at 19:12
Should the border push the adjacent text and stuff away or cut through it? – Andy Oct 28 '11 at 20:43
@Andy push away – behzad.nouri Oct 29 '11 at 17:00

## 1 Answer

I am not sure what are are trying to accomplish. In principle, you can get that behavior with \marginbox from the adjustbox package. I made a small example for a hyperlink that shows the described feature.

\documentclass{book}

\usepackage[pdfborder={1 1 1},pdfborderstyle={/S/U/W 1}]{hyperref}
\usepackage{adjustbox}

\begin{document}
Foo \href{http://tex.stackexchange.com/questions/32994/hyperref-how-to-make-pdfborder-larger-or-add-some-margin-between-the-border}{\marginbox{2pt}{bar}} what?
\end{document}


If all links should automatically have that behavior, some more work is necessary.

-
i want to do exactly what you have done, but i do not know how to use this workaround for things like \ref{01.fig} – behzad.nouri Oct 28 '11 at 19:57
@runnerup: Do you only want this to be done for things like \ref{...}? – Werner Oct 28 '11 at 21:20
@Werner for some documents, yes – behzad.nouri Oct 29 '11 at 17:01