On 2/12/26 16:03, Ben Moon via ntg-context wrote:
> Hey,
> I’m trying to put together a document containing citations as well as a
> publication list. I would like to have the text for the citation black
> and the hyperlink in blue.
> [...]
> So for the main text, I do
> \setupinteraction[
>     state=start,
>     color=blue,
>     contrastcolor=,
>     click=yes,
>     style=,
> ]
> 
> And for the bibliography and publications
> 
> \setupinteraction[color=blue, contrastcolor=black]

Hi Ben,

as far as I know, both settings should have the same effect. Although
with `contrastcolor=black` you add black color to text, while with just
`contrastcolor=,` no color is added at all.

I would suggest a single command such as (for now):

  \setupinteraction[
    state=start,
    style=,
    color=blue,
    contrastcolor=,
    %~ click=yes,
    style=,
    focus=standard,
  ]

`focus=standard` helps to understand what’s going on here (and gives
more precise internal links).

> This works well with context 2023.03.10 12:15, however, in more recent
> versions 2024.06.21 23:45 and 2026.01.08 23:30, this stopped working and
> parts of the bibliography are all blue.

Text color is only a mark of having the full bibiliography entry as a
(partially internal back-) link (to body text).

> I tried to put together a minimal working example below.

Well, it was your sample, but not minimal.

> Any ideas how to fix this?

Your sample contains two kinds of links: one internal to the document
and another one for external links (such as to doi.org).

If you replace the initial `\setupinteraction` command above with the
following ones, you will notice the difference:

  \setupinteraction[
    state=start,
    style=,
    color=,
    contrastcolor=,
    click=yes,
    style=,
    focus=standard,
  ]

  \definecolor[internal][.725(green)]
  \definecolor[external][.825(red)]
  \enabledirectives[references.border=inner:internal]
  \enabledirectives[references.border=special
    operation+internal:internal]
  \enabledirectives[references.border=special operation+url:external]

These kinds of link borders won’t be printed by “Acrobat” (and I think
they are way less intrusive [and more elegant, in my opinion]).

If you want to change their colors, you only need to change
`\definecolor[internal]` or `\definecolor[external]`.

With this setting, you see that green link borders (with the
configuration above) are backlinks for references where they have been
mentioned.

So, the problem is not `\setupinteraction` in itself, but how the
bibliographies set their interaction level.

According to
https://www.pragma-pod.com/general/manuals/mkiv-publications.pdf
(`mkiv-publications.pdf` comes with the distribution),
`interaction=number` should be the way to go.

I’m afraid I cannot make it work. I don’t use bibliographies, so others
will know better.

BTW, `\enableregime[utf]` is no longer needed (I think it comes from
MkII and LuaMetaTeX is MkXL).

I hope it helps (and let us know when it doesn’t),

Pablo


PS: are you sure that “Abraham, M. (1909). Zur elektrodynamik bewegter
körper.” shouldn’t read “Abraham, M. (1909). Zur Elektrodynamik bewegter
Körper.”?
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
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
___________________________________________________________________________________

Reply via email to