I know that I can use hyperref to make cross-references and hyperlinks clickable. That makes the clickable areas outlined in fluorescent green, however. How can I make the green boxes go away?

  • 33
    Seeing what an important and popular question this is, I suggest choosing @meep.meep's answer as the accepted answer because it does exactly the same as Jukka's (which is nonetheless correct), but in a much more elegant way. Many new and unexperienced users will come across this question so it's worth thinking about it. – doncherry Aug 30 '11 at 16:28
  • 2
    And what if I want to keep them even for printing? How can i do that, please? – Perlnika May 26 '13 at 18:06
  • 2
    Some PDF viewers like qpdfview show boxes around links. So disable this first or make sure with other viewers that these boxes are actually in the PDF before you try to remove them. – Frank Breitling Mar 20 '17 at 15:32
  • 1
    In particular in qpdfview deselect the setting: Edit->Settings->Grapics->General->Decorate links – Harald Jul 12 '18 at 15:30
  • @Harald This settings does not seem to have any effect (even after restarting qpdfviewer). Links to references (green) and to figures & tables table of content (both red) and external links (cyan) all remain marked in in the program. (Though I if I view the same PDF in e.g. chromium then there are no color markings.) – zrajm Jun 18 at 16:07

With \usepackage[hidelinks]{hyperref} you get active links in \textcolor (usually black) without a box around them.

| improve this answer | |
  • 68
    I think there is no need for using \usepackage[hidelinks]{hyperref}. This problem may be fixed by just adding [hidelinks] as a global option to the \documentclass declaration (for instance: \documentclass[hidelinks,12pt]{report}). I read this in the quick help of MiKTeX 2.9. – user13436 Apr 10 '12 at 1:50
  • 79
    @AhmedNaji: This is because global options, specified with the document class, will be passed down to the packages. However, I'm not aware of any package other than hyperref that knows an option hidelinks, so imho it isn't really helpful to move the option to the document class. An example where it does make sense to specify such an option globally (i.e. with the document class) is the option draft, which will influence e.g. graphicx and hyperref, or perhaps a language option like ngerman. – doncherry May 19 '12 at 23:41
  • 5
    What if other packages refer to hidelinks, that you may not want to disable? – Nicholas Hamilton Dec 20 '12 at 9:02
  • 3
    The suggested solution causes an "option clash" if you use the classicthesis package. In that case the comment of @user13436 solves the issue. – Emanuele Paolini Sep 19 '17 at 8:09
  • 6
    \usepackage[hidelinks]{hyperref} doesn't work. my code here and here – alhelal Oct 3 '17 at 5:53

I use something like


This gets rid of the ugly color boxes, but uses dark colored fonts which still make it clear that they are clickable.

| improve this answer | |
  • 109
    I really think something like this should be the default rather than the neon boxed links. – einpoklum Nov 26 '11 at 21:32
  • 14
    The use of dark colours here is also important: brighter colours, like the defaults, usually come out too pale when printing. – Peter LeFanu Lumsdaine Dec 3 '12 at 1:17
  • 3
    @einpoklum, at the time the "hypertext" was popularized not long ago, the idea was to highlight it as much as possible, just because it was new. Remember that hyperlinks in web pages used to be highlighted and underlined in bright blue. – alfC Sep 9 '15 at 18:49
  • 9
    @alfC: But not boxed in bright green... :-) – einpoklum Sep 9 '15 at 18:59
  • 4
    @alfC By default, they still are in most browsers. – JAB Feb 1 '16 at 18:05

Well, I see there are a lot of answers already, and they work, however I thought I'd give more detail:

As above, you can use




However, if your problem is with the ugly green boarder there are very nice ways to remove that, without making it unclear what is a hyperlink.

I like

  colorlinks   = true, %Colours links instead of ugly boxes
  urlcolor     = blue, %Colour for external hyperlinks
  linkcolor    = blue, %Colour of internal links
  citecolor   = red %Colour of citations

That should be pretty self-explanatory, since I've commented everything so I can keep track of it.

There is also


Which replaces the colour with small caps. No idea why it is French, or why small caps, but it is also an option.

There, I felt this helps complete the above answers; Yes, you can remove the box by hiding all the links, but there are other choices out there.

| improve this answer | |
  • 6
    This is a real solution, otherwise how is the reader supposed to distinguish clickable links from plain text? Thank you – neurino Jan 9 '13 at 23:06
  • You are very welcome. – Canageek Jan 10 '13 at 17:10
  • @Canageek, I used your suggestion and it worked perfectly, but it changed also all text color from black (dark) to grey. How can I control this problem? I mean, what should I do to have the black (dark) color in the text? – Gilson Aug 20 '14 at 2:33
  • @Gilson I've not had that problem, at least, not that I've noticed. Could you make a new question with a MWE so I can test it out? Tag me in the comment please. – Canageek Aug 20 '14 at 18:31
  • @Canageek I've just done it in link – Gilson Aug 20 '14 at 19:57
    pdfborder={0 0 0},

Edit: Fortunately, this is no longer needed. Since 2011-02-05 (hyperref version 6.82a), you can use the hidelinks option to achieve the same result; see this answer.

| improve this answer | |
  • 6
    Besides \hypersetup you may provides those settings as options when loading the hyperref package. – Stefan Kottwitz Aug 2 '10 at 17:03
  • 6
    Although I find them helpful- otherwise some people wouldn't know that clicking on a reference will take them to a bibliography entry. They don't show up in the printed copies. – Sharpie Aug 2 '10 at 17:26
  • 2
    I agree with Sharpie. It's better to change the borders and/or colours to something more pleasing but still visible (see Juan's answer), than to get rid of them entirely. – ShreevatsaR Aug 11 '10 at 21:24
  • 7
    I personally use \ifpdf\usepackage[pdftex,pdfborderstyle={/S/U/W 1},hyperfootnotes=false]{hyperref}\fi. This gets rid of the box by making links underlined instead. You can then use the linkcolor option to make the colours more palatable to humans. – kahen Dec 2 '10 at 14:39
  • Congrats! The fact that your answer was un-accepted got you the first Populist badge ever awarded here, this is quite a funny turn. Referring to the more up-to-date answer is really good style though, kudos for that! – doncherry Sep 8 '11 at 17:15

You can also use \usepackage[colorlinks=true, urlcolor=blue, pdfborder={0 0 0}]{hyperref}.

Can add any options of your choice, in order to only have urls without color or anything, use only pdfborder={0 0 0} option

| improve this answer | |

If you are using a modern release of LyX, then these options can be set in Document -> Settings -> PDF Properties -> Hyperlinks -> No frames around links.

| improve this answer | |

As Canageek mentions, there are already a bunch of answers here, but there's another option that I developed in answer to another question, which you can see here: it refines the experimental "ocgcolorlinks" option so that the text is highlighted on screen and not in print, but avoids the boxing that caused weird line-wrapping of the current ocgcolorlinks implementation.

| improve this answer | |
  • 1
    Thank you for your idea of implementing line-breakable ocgcolorlinks! It is the basis for further refinement made in the ocgx2 package, allowing for ocg colour links that also wrap around page breaks and which can be nested. Also the empty-link issue could be solved. See here . – AlexG Apr 13 '17 at 10:49

For the sake of completion, if you use qpdfview, check that the option Decorate links is unselected (Edit -> Settings). I spent quite some time finding this was the actual problem!

enter image description here

| improve this answer | |
  • 2
    Thanks! I was about to debug the hyperref package as none of the above work to hide the decoration around links and refs. – scrutari Mar 21 '19 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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