# [NTG-context] two issues with interactive hyperlinks (please comment)

Hans Hagen pragma at wxs.nl
Mon Feb 22 20:08:50 CET 2016

On 2/21/2016 8:54 PM, Pablo Rodriguez wrote:
> Hans,
>
> I’m afraid there is a regression partially displayed in the following
> code:
>
>      \setupinteraction[state=start, focus=standard]
>      \enabledirectives[references.border]
>      \setupinteractionscreen[option=fit]
>      \setupnote[footnote][way=bytext, location=text]
>      \starttext
>      \completecontent
>
>      \chapter{Main issue}
>      Simple steps to reproduce the issue with notes:
>
>      \startitemize[n]
>      \item Open the file and keep browsing it fit to width.
>      \item Click on link for note 24 (on next page).
>      \item Change view to fit to width.
>      \item Search for note 24 in footnotes.
>      \item Click back to return to main text from anchor 24.
>      \item Change view to fit to width.
>      \item Search again for the text with footnote 24 referenced.
>      \item Keep in mind that in a 15 inch screen the fit to height,
>      text is hardly readable.
>      \stopitemize
>
>      \page
>      \dorecurse{10}{%
>          \dorecurse{10}{This is text.%
>              \footnote{This is a footnote.}\par}}
>      \placefootnotes
>      \stoptext
>
> The regression is that \setupinteraction[focus=standard] doesn’t work
> with hyperlink in table of contents for chapter in betas from 2016.02.15
> 10:26.

a bit too complex example

> Beta from 2016.02.08 15:35 adds a link with named destination (/XYZ).
> Next beta from 2016.02.15 10:26 adds a link pointing only to the page
> (/Fit).
>
> This is the regression.

i checked the changes and uploaded beta (split the methods a bit) ..
hopefully i didn't break the patches that taco needed (option=name)

> And I think it is time to discuss an issue with textual links. I know
> you don’t like it. I’m sorry, but I think it is an essential feature for
> hyperlinks.

well, in general i only read full screen, or print a document, or don't
read a pdf at all as i just loose track when views keep changing (so for
me a viewing device is only useful when it can show a page, which the
surface (or even a nexus) can do quite ok)

> [I’d request other users to contribute their experiences with this
> issue, please.]
>
> We need that all links in a text file behave the same way to reach
> their destination. Page 2 from sample above describes what is wrong
> (and crazy to send a PDF document generated this way [at least, not
> relaxing to the reader]).
>
> And if \setupinteraction[focus=standard] is used, all link destinations
> should be named ones (/XYZ). Of course, I’m not talking about widgets
> for presentations. But footnotes, references, linenotes and other
> similar links that may appear in a text should behave the same way in
> the same document.

this also depends on if that xyz info is available in a consistent way
which is not always the case (even then one needs take margins and other
things into account so whatever gets added in the core will always be
suboptimal and imo kind of crappy, so never default)

> Sorry, but some users complained to me about this behavior. I know that
> some PDF readers don’t follow this (only mupdf that I’m aware of
> [and I opened an issue:
> http://bugs.ghostscript.com/show_bug.cgi?id=696442]). SumatraPDF,
> Adobe, evince and xpdf implement named destinations.

well, that is the problem: for 15 years there has been no real
consistent viewer behaviour ... for long i tested using acrobat, but the
interface kept changing and got worse so now i test with sumatrapdf
which lacks some features or has issues) and i find it real hard to test
this kind of stuff (i simply lack the mindset for it) so when something
is needed i need real simple and small examples and/or know what kind of
pdf code is needed that works in most viewers

> It is an extremely useful feature and it isn’t reasonable to expect
> from users that they have huge screens to read PDF documents generated
> with ConTeXt. And in many scenarios, having a screen version (different
> from the print version) is not an option. And as explained in the
> sample code above, I have only a 15-inch screen.

actually i wonder if screens need to be huge ... small high res screens
are quite readable (i consider reading pdf on a small phone a no-go
whatever scaling gets applied and i expect epub like devices eventually
to get the same quality as paper)

> Would it be possible that the destinations with links in a text all
> honored \setupinteraction[focus=standard]?

this can only be implemented stepwise (given that i can motivate myself
so it also depends on the weather, music, reasonable background movie or
talkshow, lack of other tasks, etc) .. and of course a reasonable viewer
(i wasted too much time already on bypassing fuzzy features that i don't
need myself)

Hans

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


More information about the ntg-context mailing list