I'm writing latex code with overleaf and I want to make hyperlinks with the hyperref packages. From Googling, I learned that by default (or setting colorlinks=false) should make borders around the links. However, this doesn't work for me. Here is my code:







\begin{theorem} \label{theorem1}
Famous theorem


Using Theorem \ref{theorem1}.

  • Strange, I do see a red border with my pdf viewer (okular) in the "using theorem 1" sentence. Do you have a recent tex distribution?
    – tobiasBora
    Sep 16, 2021 at 20:03

1 Answer 1


It fully depends on the PDF viewer you are using. Some viewers show this border while some others don't.

This is when your document was viewed using Adobe Acrobat Reader and the box was visible. Adobe

And this is when your document was viewed using the Brave browser and the box disappeared. Brave

Also, if you print your document, this box won't get printed. If you want to highlight a link, I think it's better to use color or underline or both.

  • 1
    About the final remark: I always considered that the box doesn't get printed the biggest advantage of using these boxes. Marked links in printed documents always feels odd IMO since you can't actually click them, so the fact that they used to be links feels rather irrelevant. Sep 16, 2021 at 20:09
  • 1
    @MarcelKrüger Yes, I also agree that highlighted links in the printed document are of no use. However, I don't like these red boxes, so I usually hide these boxes and instead highlight the links.
    – Imran
    Sep 16, 2021 at 20:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .