3

This question is about having colored links on screen while printing them black. The solution is

\documentclass{article}
\usepackage[ocgcolorlinks]{hyperref}
\begin{document}
\href{https://tex.stackexchange.com/}{TeX Stackexchange}
\end{document}

enter image description here enter image description here

I would like to have the same functionality in ConTeXt. The only commands touching link colors that I know of are:

\setupcolors[state=start|stop]
\setupinteraction[state=start|stop,color=...]

/edit: The question ConTeXt: Replace PDF Content During Printing provides the building blocks for a solution. Now we only need to find the code that renders links and replace it with \viewerlayer[view]{\color[#gotocolor]{#text}}\llap{\viewerlayer[print]{#text}}

  • 2
    There is no support for coloured links via OCG in ConTeXt. I guess this is due to the fact that OCG would break PDF/A compatibility. – Henri Menke Feb 20 '17 at 11:15
  • 1
    @Aditya This is not a duplicate. See my edit to the question. – Henri Menke Feb 23 '17 at 9:43
  • @HenriMenke Do you want to write up an answer? – TeXnician Aug 8 '18 at 17:31
  • @TeXnician No, because my comment is not an answer. – Henri Menke Aug 8 '18 at 21:03
  • There's a question here where the answers offer two ways to put coloured boxes around links. Not quite what you're asking for, but they're screen-only and don't appear in print. – user31316 Dec 20 '18 at 22:13

Your Answer

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

Browse other questions tagged or ask your own question.