TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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

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.


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

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?

example link

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

share|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.