On 10/12/2023 3:14 PM, Pablo Rodriguez wrote:
Hi Hans,

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

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


     \startTEXpage[offset=1dk, align=middle]
     \chapter[one]{First chapter}
     \chapter[two]{Second chapter}
     \chapter[three]{Second chapter}

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?
All is possible but not all should be done, especially not features that mostly serve a few viewers (like acrobat) and don't really relate to typesetting.

That said, we can add some styling. First of all, you can use a bit of abstraction

\defineinteraction[one]  [color=darkgreen,style=\underbar]
\defineinteraction[two]  [color=darkred,  style=\underbar]
\defineinteraction[three][color=darkblue, style=\underbar]


which already might help you. To make it easier I'll add \namedgoto do that one can say:

\def\inone  #1{\namedgoto[#1]{#1}[url(#1)]}
\def\intwo  #1{\namedgoto[#1]{#1}[url(#1)]}

I'll also add \outline and \outlined

\defineinteraction[one]  [color=darkgreen,style=\outlined]%
\defineinteraction[two]  [color=darkred,  style=\outline]%
\defineinteraction[three][color=darkblue, style=\outlined]%

which of course you then will wikify ...

I attached an example but there is no upload (will happen when the build is running again because I can't make osx bins here).


                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl

Attachment: oeps.pdf
Description: Adobe PDF document

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

maillist : 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

Reply via email to