ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] (off-topic) hovering over links in Acrobat Reader
@ 2024-06-19 17:16 Pablo Rodriguez via ntg-context
  2024-06-19 19:55 ` [NTG-context] " Henning Hraban Ramm
  0 siblings, 1 reply; 9+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-06-19 17:16 UTC (permalink / raw)
  To: ConTeXt users; +Cc: Pablo Rodriguez

[-- Attachment #1: Type: text/plain, Size: 2189 bytes --]

Dear list,

I have the following source:

    \setupbodyfont[dejavu, sans, 24pt]
    \setupinteraction[state=start, style=, color=,
        contrastcolor=, display=new]
    \enabledirectives[references.border=darkgreen]
    \def\myurl#1%
      {{\tt\goto{\hyphenatedurl{#1}}[url(#1)]}}
    \protect\def\myhref#1#2%
      {\goto{\hyphenatedurl{#1}}[url(#2)]}
    \starttext
    \startTEXpage[pagestate=start, offset=1em, align=center]
    {\bfa Hovering Over Links}
    \blank[1st]
    \attachment[method=hidden, file={signed-a.pdf}]
    \goto{An embedded PDF document}[signed-a::]
    \blank[.5st]
    \myurl{https://contextgarden.net}
    \blank[.5st]
    \myhref{A link to the Garden}{https://contextgarden.net}
    \stopTEXpage
    \stoptext

I also attach my output, since the first link is a link to an embedded
document and not the expected link to an external document (I modified
ConTeXt to get that kind of link).

The issue I’m experiencing with Acrobat Reader DC on Windows
(automatically updated to latest version) is that when hovering over
links, I get different results.

The three links are (in order from top to bottom):

1. A link to the embedded document.
2. An external link with its address as text.
3. Another external link without its address as text.

Some days (as today [sorry, I don’t have access to Windows now]),
hovering over the three links displayed the word "link" (even with
Acrobat set to Spanish).

Other days, hovering over the first link displays nothing and hovering
over the two other links show their actual destination address.

This behavior seems so random to me that I‘m not sure I’m not missing
anything.

Would you be so kind to test the attached document (and the one you may
generate from the sample source) hovering over the link frames in
Acrobat (ideally DC updated to latest)?

At least, I would like to be sure what is going on here.

Hovering over links is basic precaution before clicking them.

To explain that to others, I’d rather know how Acrobat (Reader) behaves
in these cases.

Sorry the off-topic issue and many thanks for your help in advance,

Pablo

[-- Attachment #2: hover.pdf --]
[-- Type: application/pdf, Size: 23337 bytes --]

[-- Attachment #3: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* [NTG-context] Re: (off-topic) hovering over links in Acrobat Reader
  2024-06-19 17:16 [NTG-context] (off-topic) hovering over links in Acrobat Reader Pablo Rodriguez via ntg-context
@ 2024-06-19 19:55 ` Henning Hraban Ramm
  2024-06-19 20:10   ` Wolfgang Schuster
  2024-06-20 15:33   ` Pablo Rodriguez via ntg-context
  0 siblings, 2 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2024-06-19 19:55 UTC (permalink / raw)
  To: ntg-context

Am 19.06.24 um 19:16 schrieb Pablo Rodriguez via ntg-context:
> Would you be so kind to test the attached document (and the one you may
> generate from the sample source) hovering over the link frames in
> Acrobat (ideally DC updated to latest)?
> 
> At least, I would like to be sure what is going on here.
> 
> Hovering over links is basic precaution before clicking them.
> 
> To explain that to others, I’d rather know how Acrobat (Reader) behaves
> in these cases.

Build 24.2.20857.0 on MacOS 10.15.7:
1: no hover
2: https://contextgarden.net
3: https://contextgarden.net


Trying to compile your code, I get:

"""
...
fonts           > otf loading > math data wiped from 'DejaVu Sans'

Fatal error: catcode push/pop mismatch. Fix this! (restore level: 0)

system          > don't use \end to finish a document
system          > invalid \starttext ... \stoptext structure
close source    > level 1, order 3, name './hover1.tex'
(\end occurred when \ifcase on line 6 was incomplete)
...
"""

Hraban
___________________________________________________________________________________
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] 9+ messages in thread

* [NTG-context] Re: (off-topic) hovering over links in Acrobat Reader
  2024-06-19 19:55 ` [NTG-context] " Henning Hraban Ramm
@ 2024-06-19 20:10   ` Wolfgang Schuster
  2024-06-19 20:15     ` Henning Hraban Ramm
  2024-06-20 16:01     ` Pablo Rodriguez via ntg-context
  2024-06-20 15:33   ` Pablo Rodriguez via ntg-context
  1 sibling, 2 replies; 9+ messages in thread
From: Wolfgang Schuster @ 2024-06-19 20:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

Henning Hraban Ramm schrieb am 19.06.2024 um 21:55:
> Am 19.06.24 um 19:16 schrieb Pablo Rodriguez via ntg-context:
>> Would you be so kind to test the attached document (and the one you may
>> generate from the sample source) hovering over the link frames in
>> Acrobat (ideally DC updated to latest)?
>>
>> At least, I would like to be sure what is going on here.
>>
>> Hovering over links is basic precaution before clicking them.
>>
>> To explain that to others, I’d rather know how Acrobat (Reader) behaves
>> in these cases.
> 
> Build 24.2.20857.0 on MacOS 10.15.7:
> 1: no hover
> 2: https://contextgarden.net
> 3: https://contextgarden.net
> 
> 
> Trying to compile your code, I get:
> 
> """
> ...
> fonts           > otf loading > math data wiped from 'DejaVu Sans'
> 
> Fatal error: catcode push/pop mismatch. Fix this! (restore level: 0)
> 
> system          > don't use \end to finish a document
> system          > invalid \starttext ... \stoptext structure
> close source    > level 1, order 3, name './hover1.tex'
> (\end occurred when \ifcase on line 6 was incomplete)
> ...
> """

This should be \protected\def

\protect\def\myhref#1#2%
   {...}

Wolfgang
___________________________________________________________________________________
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] 9+ messages in thread

* [NTG-context] Re: (off-topic) hovering over links in Acrobat Reader
  2024-06-19 20:10   ` Wolfgang Schuster
@ 2024-06-19 20:15     ` Henning Hraban Ramm
  2024-06-20 16:01     ` Pablo Rodriguez via ntg-context
  1 sibling, 0 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2024-06-19 20:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 19.06.24 um 22:10 schrieb Wolfgang Schuster:
> Henning Hraban Ramm schrieb am 19.06.2024 um 21:55:
>> Am 19.06.24 um 19:16 schrieb Pablo Rodriguez via ntg-context:
>> Trying to compile your code, I get:
> 
> This should be \protected\def
> 
> \protect\def\myhref#1#2%
>    {...}

Oops, didn’t find that. Thank you!
Now I get the same behavior as with the original PDF, BTW also in Apple 
Preview.

Hraban

___________________________________________________________________________________
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] 9+ messages in thread

* [NTG-context] Re: (off-topic) hovering over links in Acrobat Reader
  2024-06-19 19:55 ` [NTG-context] " Henning Hraban Ramm
  2024-06-19 20:10   ` Wolfgang Schuster
@ 2024-06-20 15:33   ` Pablo Rodriguez via ntg-context
  2024-06-21  9:32     ` Ulrike Fischer
  2024-06-21 16:31     ` Hans Hagen
  1 sibling, 2 replies; 9+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-06-20 15:33 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 6/19/24 21:55, Henning Hraban Ramm wrote:
> Am 19.06.24 um 19:16 schrieb Pablo Rodriguez via ntg-context:
>> Would you be so kind to test the attached document (and the one you may
>> generate from the sample source) hovering over the link frames in
>> Acrobat (ideally DC updated to latest)?
>>
>> At least, I would like to be sure what is going on here.
>>
>> Hovering over links is basic precaution before clicking them.
>>
>> To explain that to others, I’d rather know how Acrobat (Reader) behaves
>> in these cases.
>
> Build 24.2.20857.0 on MacOS 10.15.7:
> 1: no hover
> 2: https://contextgarden.net
> 3: https://contextgarden.net

Many thanks for your help, Hraban.

Thanks to your confirmation, I investigated the issue further (since
there had to be something different with my documents).

\setuptagging[state=start] is the culprit. "link" is the word displayed
when links are hovered over.

Many thanks for your help again,

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] 9+ messages in thread

* [NTG-context] Re: (off-topic) hovering over links in Acrobat Reader
  2024-06-19 20:10   ` Wolfgang Schuster
  2024-06-19 20:15     ` Henning Hraban Ramm
@ 2024-06-20 16:01     ` Pablo Rodriguez via ntg-context
  1 sibling, 0 replies; 9+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-06-20 16:01 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 6/19/24 22:10, Wolfgang Schuster wrote:
> [...]
> This should be \protected\def
>
> \protect\def\myhref#1#2%
>    {...}

Sorry for the mess, Wolfang and Hraban.

I wasn’t aware of the mistake, since the PDF document was neither
deleted not showing the colorful error word.

I created the document with other commands and I rewrote them
(introducing this error).

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] 9+ messages in thread

* [NTG-context] Re: (off-topic) hovering over links in Acrobat Reader
  2024-06-20 15:33   ` Pablo Rodriguez via ntg-context
@ 2024-06-21  9:32     ` Ulrike Fischer
  2024-06-21 16:31     ` Hans Hagen
  1 sibling, 0 replies; 9+ messages in thread
From: Ulrike Fischer @ 2024-06-21  9:32 UTC (permalink / raw)
  To: ntg-context

Am Thu, 20 Jun 2024 17:33:56 +0200 schrieb Pablo Rodriguez via
ntg-context:

> \setuptagging[state=start] is the culprit. "link" is the word displayed
> when links are hovered over.

well it would imho be better not to use that at all. Sorry but what
context is doing here is cheating. It claims to add a structure (and
probably manage to pass automated tests) but all StructElem with the
exception of links are role mapped to NonStruct and so are non
functional. Links miss the OBJR reference. Annotations only all have
as /Content a generic text (link) (which creates your hover effect).  

When I let Adobe+NVDA read a PDF tagged with LaTeX it recognize and
announces structures:

heading    level 2  A section
text
table  with 2 rows and 2 columns  
row 1  column 1  header A
       column 2  header B
row 2  header A  column 1  data A
       header B  column 2  data B
out of table
link    https://www.example.com

I can navigate from one heading to the next and inside tables (and
when I hover a link the pop up is correct as we are setting the
right Contents value.)

If you do the same with a document tagged with context you only get
a large blob of text

A section textHeader AHeader B data Adata B
https://contextgarden.net

and no navigation at all. All the tagging in the file is useless, it
even actually harms because it makes user believe they get an
accessible PDF. 

Tagged, accessible PDF has a lot of shortcomings, especially when it
comes to complex documents and math, but for standard documents it
can do much better then what context is making out of it. 

 
-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___________________________________________________________________________________
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] 9+ messages in thread

* [NTG-context] Re: (off-topic) hovering over links in Acrobat Reader
  2024-06-20 15:33   ` Pablo Rodriguez via ntg-context
  2024-06-21  9:32     ` Ulrike Fischer
@ 2024-06-21 16:31     ` Hans Hagen
  2024-06-21 17:50       ` Pablo Rodriguez via ntg-context
  1 sibling, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2024-06-21 16:31 UTC (permalink / raw)
  To: ntg-context

On 6/20/2024 5:33 PM, Pablo Rodriguez via ntg-context wrote:
> On 6/19/24 21:55, Henning Hraban Ramm wrote:
>> Am 19.06.24 um 19:16 schrieb Pablo Rodriguez via ntg-context:
>>> Would you be so kind to test the attached document (and the one you may
>>> generate from the sample source) hovering over the link frames in
>>> Acrobat (ideally DC updated to latest)?
>>>
>>> At least, I would like to be sure what is going on here.
>>>
>>> Hovering over links is basic precaution before clicking them.
>>>
>>> To explain that to others, I’d rather know how Acrobat (Reader) behaves
>>> in these cases.
>>
>> Build 24.2.20857.0 on MacOS 10.15.7:
>> 1: no hover
>> 2: https://contextgarden.net
>> 3: https://contextgarden.net
> 
> Many thanks for your help, Hraban.
> 
> Thanks to your confirmation, I investigated the issue further (since
> there had to be something different with my documents).
> 
> \setuptagging[state=start] is the culprit. "link" is the word displayed
> when links are hovered over.
It's not that hard to get something less generic displayed but the 
question is what and in what detail. A lot of this stuff is not 
consistent over viewers and it being part of the user interface might 
also change over time (some viewers also interpret the page stream for 
urls).

Anyway, a next upload will have this:

% \disabledirectives[backends.references.descriptions]           % just link
% \enabledirectives [backends.references.descriptions]           % some 
detail (some todo) (default)
% \enabledirectives [backends.references.descriptions=reference] % a bit 
less

so that you can experiment a bit with it. We might at some point provide 
optional descriptions per link but the quesiton is how to cleanly 
interface this (easier if you use \define... instead of your own macros 
for urls).

Hans



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

___________________________________________________________________________________
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] 9+ messages in thread

* [NTG-context] Re: (off-topic) hovering over links in Acrobat Reader
  2024-06-21 16:31     ` Hans Hagen
@ 2024-06-21 17:50       ` Pablo Rodriguez via ntg-context
  0 siblings, 0 replies; 9+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-06-21 17:50 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 6/21/24 18:31, Hans Hagen wrote:
> [...]
> so that you can experiment a bit with it. We might at some point provide
> optional descriptions per link but the quesiton is how to cleanly
> interface this (easier if you use \define... instead of your own macros
> for urls).

Many thanks for the new options, Hans.

Sorry, but I don’t know how I would have to use \define here instead of
my macros.

BTW, I created them long time ago to avoid having two commands (one to
contain the address and another to typeset it), such as in (copied from
the wiki):

  \useURL[anotherurl] [http://xkcd.com/224/]

  \from[aurl]         % typesets the URL

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] 9+ messages in thread

end of thread, other threads:[~2024-06-21 17:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-19 17:16 [NTG-context] (off-topic) hovering over links in Acrobat Reader Pablo Rodriguez via ntg-context
2024-06-19 19:55 ` [NTG-context] " Henning Hraban Ramm
2024-06-19 20:10   ` Wolfgang Schuster
2024-06-19 20:15     ` Henning Hraban Ramm
2024-06-20 16:01     ` Pablo Rodriguez via ntg-context
2024-06-20 15:33   ` Pablo Rodriguez via ntg-context
2024-06-21  9:32     ` Ulrike Fischer
2024-06-21 16:31     ` Hans Hagen
2024-06-21 17:50       ` Pablo Rodriguez 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).