ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] colors for links
@ 2023-10-12 13:14 Pablo Rodriguez
  2023-10-14 12:19 ` [NTG-context] " Hans Hagen via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: Pablo Rodriguez @ 2023-10-12 13:14 UTC (permalink / raw)
  To: ConTeXt users

Hi Hans,

I have the following source, which tries to resemble three kinds of links:

    \setupinteraction[state=start, style=, focus=standard]

    \def\inone#1{%
      \start\setupinteraction[color=darkgreen]%
      \enabledirectives[references.border=darkgreen]%
      \goto{#1}[url(#1)]\stop}
    \def\intwo#1{%
      \start\setupinteraction[color=darkred]%
      \enabledirectives[references.border=darkred]%
      \goto{#1}[url(#1)]\stop}
    \def\inthree#1{%
      \start\setupinteraction[color=darkblue]%
      \enabledirectives[references.border=darkblue]%
      \goto{#1}[url(#1)]\stop}

    \starttext
    \startTEXpage[offset=1dk, align=middle]
    \inone{one}\blank
    \intwo{two}\blank
    \inthree{three}\blank
    \stopTEXpage
    \chapter[one]{First chapter}
    \chapter[two]{Second chapter}
    \chapter[three]{Second chapter}
    \stoptext

I see that the directive for link borders only allows one color for
links per document.

In my real-world documents, I need to make three different border links:
for destinations inside the document (/GoTo), for destinations in other
documents (/GoToR or /GoToE) and for external destinations (/URI).

With the current document I write now, I have over a hundred links in
twenty pages. Being able to visually distinguish each link helps
interaction with the document (reading or even writing it).

Would it be possible that \setupinteraction could have a bordercolor
key, such as the color one?

Many thanks for your help,

Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-14 20:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-12 13:14 [NTG-context] colors for links Pablo Rodriguez
2023-10-14 12:19 ` [NTG-context] " Hans Hagen via ntg-context
2023-10-14 17:55   ` Pablo Rodriguez
2023-10-14 20:47     ` Hans Hagen via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).