Set the highlight style of a link to "none" instead of "invert"

2,730

Default for option pdfhighlight is /I for "Invert". It can be changed to "None":

\hypersetup{pdfhighlight=/N}

Other values:

  • /O: "Outline"
  • /P: "Push"

See PDF specification. hyperref is only passing the values through to the link dictionary.

From PDF32000_2008.pdf:

Table 173 – Additional entries specific to a link annotation

  • Key: H
  • Type: name
  • Description: (Optional; PDF 1.2) The annotation’s highlighting mode, the visual effect that shall be used when the mouse button is pressed or held down inside its active area:

    N (None) No highlighting.
    I (Invert) Invert the contents of the annotation rectangle.
    O (Outline) Invert the annotation’s border.
    P (Push) Display the annotation as if it were being pushed below the surface of the page.
    Default value: I.

Share:
2,730
Pedro
Author by

Pedro

Updated on May 14, 2020

Comments

  • Pedro
    Pedro over 3 years

    I've read all documentation possible regarding hyperref but I still don't know how to set the highlight style of a link to "none" instead of "invert" (which is the default by the way). Is there any other package that could deal with this, or is there any workaround to solve this?

    Below is the Adobe Acrobat menu for hyperlinking something. As you can see the default for Highlight style is "invert". With hyperref is easy to change all other properties but how about highlight style?

    Sometimes is awkward to click on an image that is linked since acrobat (for instance) displays it with the colours inverted when clicking (when the mouse button is down)...

    Can someone help me out? Thanks a lot!

    Example file here. If you download the pdf file (because browsers display pdfs in a simpler manner) and open it in adobe reader and if you click (and leave the mouse button down) on a link you'l see that the colors will become inverted. If set the highlight style to none this will not happen. How to do it is the million dollar question? :)

    Adobe Acrobat menu for links

    • jub0bs
      jub0bs over 9 years
      What LaTeX IDE are you using?
    • Pedro
      Pedro over 9 years
      PDFTex / PdfTextify is what I use to compile the document.
    • jub0bs
      jub0bs over 9 years
      I mean: what program do you prepare your document in? Obviously, it runs on Windows, but what is it? This information will probably help people here answer your question.
    • Pedro
      Pedro over 9 years
      Sorry! Then the correct anser is WinEdt! :) But does that make difference? The posted image is from what you get from doing the link in adobe acrobat and is not from any Latex IDE... Sorry for the confusion. I'll change the image title or something.
    • jub0bs
      jub0bs over 9 years
      Pedro, just to clarify: you want to change the style of links from within Adobe Acrobat; not from inside WinEdt. Correct?
    • Pedro
      Pedro over 9 years
      No... I intend to change the highlight style from within Latex. Can't hyperref handle this option? It can for sure handle, colors, styles, etc. But I can't find a way to change this option in hyperref (or any other package, for that matter)...
    • jub0bs
      jub0bs over 9 years
      Ok, I think I understand now. I don't know about this "invert" option. A search in the hyperref manual returns nothing.
  • Pedro
    Pedro over 9 years
    Thanks a lot again Heiko!! Really appreciate your quick and accurate answer! Thanks also to Jubobs for helping me to clarify the question!