How to color hyperref links so that it works in Chrome/Chromium?












5















The actual usecase: I'm writing a resume in LaTeX, so I defintely want the reader to know that the hyperlinks are there and there are just too many people using Chrome. In my real usecase I'm using underline instead of the box.



See the following minimal example



documentclass{article}

%opening
title{}
author{}
usepackage{hyperref}

begin{document}

maketitle
href{https://google.com}{link}

end{document}


This correctly renders in PDF.js on Firefox and in Evince on Linux:
correct



But Chromium doesn't render the link border at all:
chrome



What should I do so that people using Chrome/Chromium will know that the hyperlinks are there?










share|improve this question




















  • 1





    usepackage[colorlinks]{hyperref} could be an option. (Plus that avoids the borders, which some people may find a nice side-effect.)

    – moewe
    Jan 30 at 9:16













  • @moewe However, that is really printer unfriendly if you have an otherwise monochrome document.

    – Henri Menke
    Jan 30 at 9:18











  • @HenriMenke Very true. tex.stackexchange.com/q/4425/35864 might be able to help, though comments there suggest that one might need a compatible PDF viewer. Last resort is to provide one print version and one online version.

    – moewe
    Jan 30 at 9:22






  • 2





    @HenriMenke: usepackage{hyperref}usepackage[ocgcolorlinks]{ocgx2} prints monochrome links from within Chrome.

    – AlexG
    Jan 30 at 9:23











  • @AlexG then the underline is gone in other viewers.

    – marmistrz
    Jan 30 at 9:31
















5















The actual usecase: I'm writing a resume in LaTeX, so I defintely want the reader to know that the hyperlinks are there and there are just too many people using Chrome. In my real usecase I'm using underline instead of the box.



See the following minimal example



documentclass{article}

%opening
title{}
author{}
usepackage{hyperref}

begin{document}

maketitle
href{https://google.com}{link}

end{document}


This correctly renders in PDF.js on Firefox and in Evince on Linux:
correct



But Chromium doesn't render the link border at all:
chrome



What should I do so that people using Chrome/Chromium will know that the hyperlinks are there?










share|improve this question




















  • 1





    usepackage[colorlinks]{hyperref} could be an option. (Plus that avoids the borders, which some people may find a nice side-effect.)

    – moewe
    Jan 30 at 9:16













  • @moewe However, that is really printer unfriendly if you have an otherwise monochrome document.

    – Henri Menke
    Jan 30 at 9:18











  • @HenriMenke Very true. tex.stackexchange.com/q/4425/35864 might be able to help, though comments there suggest that one might need a compatible PDF viewer. Last resort is to provide one print version and one online version.

    – moewe
    Jan 30 at 9:22






  • 2





    @HenriMenke: usepackage{hyperref}usepackage[ocgcolorlinks]{ocgx2} prints monochrome links from within Chrome.

    – AlexG
    Jan 30 at 9:23











  • @AlexG then the underline is gone in other viewers.

    – marmistrz
    Jan 30 at 9:31














5












5








5








The actual usecase: I'm writing a resume in LaTeX, so I defintely want the reader to know that the hyperlinks are there and there are just too many people using Chrome. In my real usecase I'm using underline instead of the box.



See the following minimal example



documentclass{article}

%opening
title{}
author{}
usepackage{hyperref}

begin{document}

maketitle
href{https://google.com}{link}

end{document}


This correctly renders in PDF.js on Firefox and in Evince on Linux:
correct



But Chromium doesn't render the link border at all:
chrome



What should I do so that people using Chrome/Chromium will know that the hyperlinks are there?










share|improve this question
















The actual usecase: I'm writing a resume in LaTeX, so I defintely want the reader to know that the hyperlinks are there and there are just too many people using Chrome. In my real usecase I'm using underline instead of the box.



See the following minimal example



documentclass{article}

%opening
title{}
author{}
usepackage{hyperref}

begin{document}

maketitle
href{https://google.com}{link}

end{document}


This correctly renders in PDF.js on Firefox and in Evince on Linux:
correct



But Chromium doesn't render the link border at all:
chrome



What should I do so that people using Chrome/Chromium will know that the hyperlinks are there?







hyperref incompatibility






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 30 at 9:18







marmistrz

















asked Jan 30 at 9:13









marmistrzmarmistrz

26718




26718








  • 1





    usepackage[colorlinks]{hyperref} could be an option. (Plus that avoids the borders, which some people may find a nice side-effect.)

    – moewe
    Jan 30 at 9:16













  • @moewe However, that is really printer unfriendly if you have an otherwise monochrome document.

    – Henri Menke
    Jan 30 at 9:18











  • @HenriMenke Very true. tex.stackexchange.com/q/4425/35864 might be able to help, though comments there suggest that one might need a compatible PDF viewer. Last resort is to provide one print version and one online version.

    – moewe
    Jan 30 at 9:22






  • 2





    @HenriMenke: usepackage{hyperref}usepackage[ocgcolorlinks]{ocgx2} prints monochrome links from within Chrome.

    – AlexG
    Jan 30 at 9:23











  • @AlexG then the underline is gone in other viewers.

    – marmistrz
    Jan 30 at 9:31














  • 1





    usepackage[colorlinks]{hyperref} could be an option. (Plus that avoids the borders, which some people may find a nice side-effect.)

    – moewe
    Jan 30 at 9:16













  • @moewe However, that is really printer unfriendly if you have an otherwise monochrome document.

    – Henri Menke
    Jan 30 at 9:18











  • @HenriMenke Very true. tex.stackexchange.com/q/4425/35864 might be able to help, though comments there suggest that one might need a compatible PDF viewer. Last resort is to provide one print version and one online version.

    – moewe
    Jan 30 at 9:22






  • 2





    @HenriMenke: usepackage{hyperref}usepackage[ocgcolorlinks]{ocgx2} prints monochrome links from within Chrome.

    – AlexG
    Jan 30 at 9:23











  • @AlexG then the underline is gone in other viewers.

    – marmistrz
    Jan 30 at 9:31








1




1





usepackage[colorlinks]{hyperref} could be an option. (Plus that avoids the borders, which some people may find a nice side-effect.)

– moewe
Jan 30 at 9:16







usepackage[colorlinks]{hyperref} could be an option. (Plus that avoids the borders, which some people may find a nice side-effect.)

– moewe
Jan 30 at 9:16















@moewe However, that is really printer unfriendly if you have an otherwise monochrome document.

– Henri Menke
Jan 30 at 9:18





@moewe However, that is really printer unfriendly if you have an otherwise monochrome document.

– Henri Menke
Jan 30 at 9:18













@HenriMenke Very true. tex.stackexchange.com/q/4425/35864 might be able to help, though comments there suggest that one might need a compatible PDF viewer. Last resort is to provide one print version and one online version.

– moewe
Jan 30 at 9:22





@HenriMenke Very true. tex.stackexchange.com/q/4425/35864 might be able to help, though comments there suggest that one might need a compatible PDF viewer. Last resort is to provide one print version and one online version.

– moewe
Jan 30 at 9:22




2




2





@HenriMenke: usepackage{hyperref}usepackage[ocgcolorlinks]{ocgx2} prints monochrome links from within Chrome.

– AlexG
Jan 30 at 9:23





@HenriMenke: usepackage{hyperref}usepackage[ocgcolorlinks]{ocgx2} prints monochrome links from within Chrome.

– AlexG
Jan 30 at 9:23













@AlexG then the underline is gone in other viewers.

– marmistrz
Jan 30 at 9:31





@AlexG then the underline is gone in other viewers.

– marmistrz
Jan 30 at 9:31










2 Answers
2






active

oldest

votes


















6














It is possible to combine underlined and OCG-coloured links to satisfy more Browser-embedded PDF readers. OCG-coloured links are printed monochrome, if the PDF reader adheres to the PDF specification, such as Chrome:



documentclass{article}

usepackage{hyperref,xcolor}
usepackage[ocgcolorlinks]{ocgx2}

begin{document}Huge
hypersetup{allcolors=blue,allbordercolors=blue,pdfborderstyle={/S/U/W 1}}

Visit: href{https://www.ctan.org}{CTAN}!

end{document}


(For some obscure reason, hyperref defines different default colours for border and link text. Therefore the use of allcolors and allbordercolors in hypersetup.)






share|improve this answer

































    6














    What you are observing is an unfixed and abandoned bug in the Chromium PDF Viewer.




    https://bugs.chromium.org/p/chromium/issues/detail?id=237527




    There are alternatives, like usepackage[ocgcolorlinks]{ocgx2} (mentioned in a comment by AlexG) but link borders are just broken.






    share|improve this answer

























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "85"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f472520%2fhow-to-color-hyperref-links-so-that-it-works-in-chrome-chromium%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      6














      It is possible to combine underlined and OCG-coloured links to satisfy more Browser-embedded PDF readers. OCG-coloured links are printed monochrome, if the PDF reader adheres to the PDF specification, such as Chrome:



      documentclass{article}

      usepackage{hyperref,xcolor}
      usepackage[ocgcolorlinks]{ocgx2}

      begin{document}Huge
      hypersetup{allcolors=blue,allbordercolors=blue,pdfborderstyle={/S/U/W 1}}

      Visit: href{https://www.ctan.org}{CTAN}!

      end{document}


      (For some obscure reason, hyperref defines different default colours for border and link text. Therefore the use of allcolors and allbordercolors in hypersetup.)






      share|improve this answer






























        6














        It is possible to combine underlined and OCG-coloured links to satisfy more Browser-embedded PDF readers. OCG-coloured links are printed monochrome, if the PDF reader adheres to the PDF specification, such as Chrome:



        documentclass{article}

        usepackage{hyperref,xcolor}
        usepackage[ocgcolorlinks]{ocgx2}

        begin{document}Huge
        hypersetup{allcolors=blue,allbordercolors=blue,pdfborderstyle={/S/U/W 1}}

        Visit: href{https://www.ctan.org}{CTAN}!

        end{document}


        (For some obscure reason, hyperref defines different default colours for border and link text. Therefore the use of allcolors and allbordercolors in hypersetup.)






        share|improve this answer




























          6












          6








          6







          It is possible to combine underlined and OCG-coloured links to satisfy more Browser-embedded PDF readers. OCG-coloured links are printed monochrome, if the PDF reader adheres to the PDF specification, such as Chrome:



          documentclass{article}

          usepackage{hyperref,xcolor}
          usepackage[ocgcolorlinks]{ocgx2}

          begin{document}Huge
          hypersetup{allcolors=blue,allbordercolors=blue,pdfborderstyle={/S/U/W 1}}

          Visit: href{https://www.ctan.org}{CTAN}!

          end{document}


          (For some obscure reason, hyperref defines different default colours for border and link text. Therefore the use of allcolors and allbordercolors in hypersetup.)






          share|improve this answer















          It is possible to combine underlined and OCG-coloured links to satisfy more Browser-embedded PDF readers. OCG-coloured links are printed monochrome, if the PDF reader adheres to the PDF specification, such as Chrome:



          documentclass{article}

          usepackage{hyperref,xcolor}
          usepackage[ocgcolorlinks]{ocgx2}

          begin{document}Huge
          hypersetup{allcolors=blue,allbordercolors=blue,pdfborderstyle={/S/U/W 1}}

          Visit: href{https://www.ctan.org}{CTAN}!

          end{document}


          (For some obscure reason, hyperref defines different default colours for border and link text. Therefore the use of allcolors and allbordercolors in hypersetup.)







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 30 at 10:21

























          answered Jan 30 at 9:59









          AlexGAlexG

          34k480149




          34k480149























              6














              What you are observing is an unfixed and abandoned bug in the Chromium PDF Viewer.




              https://bugs.chromium.org/p/chromium/issues/detail?id=237527




              There are alternatives, like usepackage[ocgcolorlinks]{ocgx2} (mentioned in a comment by AlexG) but link borders are just broken.






              share|improve this answer






























                6














                What you are observing is an unfixed and abandoned bug in the Chromium PDF Viewer.




                https://bugs.chromium.org/p/chromium/issues/detail?id=237527




                There are alternatives, like usepackage[ocgcolorlinks]{ocgx2} (mentioned in a comment by AlexG) but link borders are just broken.






                share|improve this answer




























                  6












                  6








                  6







                  What you are observing is an unfixed and abandoned bug in the Chromium PDF Viewer.




                  https://bugs.chromium.org/p/chromium/issues/detail?id=237527




                  There are alternatives, like usepackage[ocgcolorlinks]{ocgx2} (mentioned in a comment by AlexG) but link borders are just broken.






                  share|improve this answer















                  What you are observing is an unfixed and abandoned bug in the Chromium PDF Viewer.




                  https://bugs.chromium.org/p/chromium/issues/detail?id=237527




                  There are alternatives, like usepackage[ocgcolorlinks]{ocgx2} (mentioned in a comment by AlexG) but link borders are just broken.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Feb 3 at 21:05

























                  answered Jan 30 at 9:24









                  Henri MenkeHenri Menke

                  76.3k8167282




                  76.3k8167282






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f472520%2fhow-to-color-hyperref-links-so-that-it-works-in-chrome-chromium%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Questions related to Moebius Transform of Characteristic Function of the Primes

                      List of scandals in India

                      Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?