How to color hyperref links so that it works in Chrome/Chromium?
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:

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

What should I do so that people using Chrome/Chromium will know that the hyperlinks are there?
hyperref incompatibility
|
show 1 more comment
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:

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

What should I do so that people using Chrome/Chromium will know that the hyperlinks are there?
hyperref incompatibility
1
usepackage[colorlinks]{hyperref}could be an option. (Plus that avoids the borders, which some people may find a nice side-effect.)
– moewe
yesterday
@moewe However, that is really printer unfriendly if you have an otherwise monochrome document.
– Henri Menke
yesterday
@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
yesterday
2
@HenriMenke:usepackage{hyperref}usepackage[ocgcolorlinks]{ocgx2}prints monochrome links from within Chrome.
– AlexG
yesterday
@AlexG then the underline is gone in other viewers.
– marmistrz
yesterday
|
show 1 more comment
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:

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

What should I do so that people using Chrome/Chromium will know that the hyperlinks are there?
hyperref incompatibility
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:

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

What should I do so that people using Chrome/Chromium will know that the hyperlinks are there?
hyperref incompatibility
hyperref incompatibility
edited yesterday
marmistrz
asked yesterday
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
yesterday
@moewe However, that is really printer unfriendly if you have an otherwise monochrome document.
– Henri Menke
yesterday
@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
yesterday
2
@HenriMenke:usepackage{hyperref}usepackage[ocgcolorlinks]{ocgx2}prints monochrome links from within Chrome.
– AlexG
yesterday
@AlexG then the underline is gone in other viewers.
– marmistrz
yesterday
|
show 1 more comment
1
usepackage[colorlinks]{hyperref}could be an option. (Plus that avoids the borders, which some people may find a nice side-effect.)
– moewe
yesterday
@moewe However, that is really printer unfriendly if you have an otherwise monochrome document.
– Henri Menke
yesterday
@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
yesterday
2
@HenriMenke:usepackage{hyperref}usepackage[ocgcolorlinks]{ocgx2}prints monochrome links from within Chrome.
– AlexG
yesterday
@AlexG then the underline is gone in other viewers.
– marmistrz
yesterday
1
1
usepackage[colorlinks]{hyperref} could be an option. (Plus that avoids the borders, which some people may find a nice side-effect.)– moewe
yesterday
usepackage[colorlinks]{hyperref} could be an option. (Plus that avoids the borders, which some people may find a nice side-effect.)– moewe
yesterday
@moewe However, that is really printer unfriendly if you have an otherwise monochrome document.
– Henri Menke
yesterday
@moewe However, that is really printer unfriendly if you have an otherwise monochrome document.
– Henri Menke
yesterday
@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
yesterday
@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
yesterday
2
2
@HenriMenke:
usepackage{hyperref}usepackage[ocgcolorlinks]{ocgx2} prints monochrome links from within Chrome.– AlexG
yesterday
@HenriMenke:
usepackage{hyperref}usepackage[ocgcolorlinks]{ocgx2} prints monochrome links from within Chrome.– AlexG
yesterday
@AlexG then the underline is gone in other viewers.
– marmistrz
yesterday
@AlexG then the underline is gone in other viewers.
– marmistrz
yesterday
|
show 1 more comment
2 Answers
2
active
oldest
votes
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.)
add a comment |
What you are observing is an unfixed and abandoned bug in the Chromium PDF Viewer.
There are alternatives, like usepackage[ocgcolorlinks]{ocgx2} (mentioned in a comment by AlexG) but link borders are just broken.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.)
add a comment |
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.)
add a comment |
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.)
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.)
edited yesterday
answered yesterday
AlexGAlexG
32.8k479145
32.8k479145
add a comment |
add a comment |
What you are observing is an unfixed and abandoned bug in the Chromium PDF Viewer.
There are alternatives, like usepackage[ocgcolorlinks]{ocgx2} (mentioned in a comment by AlexG) but link borders are just broken.
add a comment |
What you are observing is an unfixed and abandoned bug in the Chromium PDF Viewer.
There are alternatives, like usepackage[ocgcolorlinks]{ocgx2} (mentioned in a comment by AlexG) but link borders are just broken.
add a comment |
What you are observing is an unfixed and abandoned bug in the Chromium PDF Viewer.
There are alternatives, like usepackage[ocgcolorlinks]{ocgx2} (mentioned in a comment by AlexG) but link borders are just broken.
What you are observing is an unfixed and abandoned bug in the Chromium PDF Viewer.
There are alternatives, like usepackage[ocgcolorlinks]{ocgx2} (mentioned in a comment by AlexG) but link borders are just broken.
edited yesterday
Lorenzo B.
1033
1033
answered yesterday
Henri MenkeHenri Menke
72.5k8160269
72.5k8160269
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
usepackage[colorlinks]{hyperref}could be an option. (Plus that avoids the borders, which some people may find a nice side-effect.)– moewe
yesterday
@moewe However, that is really printer unfriendly if you have an otherwise monochrome document.
– Henri Menke
yesterday
@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
yesterday
2
@HenriMenke:
usepackage{hyperref}usepackage[ocgcolorlinks]{ocgx2}prints monochrome links from within Chrome.– AlexG
yesterday
@AlexG then the underline is gone in other viewers.
– marmistrz
yesterday