ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] (again) wrong destination types?
@ 2023-11-20 18:01 Pablo Rodriguez via ntg-context
  2023-11-21 23:06 ` [NTG-context] " Bruce Horrocks
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2023-11-20 18:01 UTC (permalink / raw)
  To: ConTeXt users; +Cc: Pablo Rodriguez

Dear list,

sorry for insisting, but this is important for my documents.

I have the following sample:

 \setupinteraction[state=start, page=name, focus=standard]
  \starttext
  a\footnote{b}
  \stoptext

If page is set to anything different than no in \setupinteractionscreen,
focus=standard will not work (it will be used as focus=fit).

Could anyone confirm the issue or explain me what I’m doing wrong?

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

* [NTG-context] Re: (again) wrong destination types?
  2023-11-20 18:01 [NTG-context] (again) wrong destination types? Pablo Rodriguez via ntg-context
@ 2023-11-21 23:06 ` Bruce Horrocks
  2023-12-03 15:26   ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Horrocks @ 2023-11-21 23:06 UTC (permalink / raw)
  To: ntg-context mailing list; +Cc: Pablo Rodriguez



> On 20 Nov 2023, at 18:01, Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Dear list,
> 
> sorry for insisting, but this is important for my documents.
> 
> I have the following sample:
> 
> \setupinteraction[state=start, page=name, focus=standard]
>  \starttext
>  a\footnote{b}
>  \stoptext
> 
> If page is set to anything different than no in \setupinteractionscreen,
> focus=standard will not work (it will be used as focus=fit).
> 
> Could anyone confirm the issue or explain me what I’m doing wrong?
> 
> Many thanks for your help
> 

I changed your example to the following:

\setupinteraction[state=start, page=name, focus=standard]
\starttext
\input knuth \par
a\footnote{b} \par
\input knuth \par
\input knuth \par
\input knuth \par
\input knuth \par
\input knuth \par
\input knuth \par
\input knuth \par
\stoptext

Using Preview on the Mac I see the following behaviour:
a) The doc opens at page 1, in continuous scroll mode, with the table of contents sidebar open. I'm pretty sure it's opening at 100% zoom but it's surprisingly hard to verify that in Preview.

b) When I click on the superscript 1 in the main body of the text nothing happens. This is because the footnote text is already visible.

c) When I click on the superscipt 1 in the footnote then the view changes and the document is scrolled so that the superscript 1 line in the main text is at the top of the window.

This is what I would expect for focus=standard as described on the Wiki.

Adobe Acrobat Reader is the same except that the opening view is different - I think it is defaulting to my preferences which is to have a double-page view.

—
Bruce Horrocks
Hampshire, UK

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

* [NTG-context] Re: (again) wrong destination types?
  2023-11-21 23:06 ` [NTG-context] " Bruce Horrocks
@ 2023-12-03 15:26   ` Pablo Rodriguez via ntg-context
  2023-12-04 23:21     ` Bruce Horrocks
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2023-12-03 15:26 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 11/22/23 00:06, Bruce Horrocks wrote:
> [...]
> I changed your example to the following:
> \setupinteraction[state=start, page=name, focus=standard]
> \starttext
> \input knuth \par
> a\footnote{b} \par
> \dorecurse{7}{\input knuth \par}
> \stoptext

Many thanks for your fast reply, Bruce.

I wanted to reply much sooner, but it was really impossible for me.

>From your explanation, the first link (body to footnote, your point b)
has destination to fit the whole page inside the viewer.

The second link (footnote to body, your point c) has the destination to
reach a position inside the page (where the destination lies). This is
what "focus=standard" should achieve.

In PDF terms (simplified), fit to page destinations are /Fit
destinations and placed destinations are /XYZ destinations.

This sample shows what might be the root issue here:

  \setupinteraction[state=start, page=name, focus=standard]
  \starttext
  \completecontent
  \chapter{Chapter}
  a\footnote{b}
  \stoptext

ConTeXt handles internally links in categories. For some reason unknown
to me, "page=name" triggers that special operation links contain /Fit
instead /XYZ destinations.

This is similar to the wrong link destinations (fit instead of standard)
from TOC (but not in footnotes [which are right]) when compiled with MkIV:

  \setupinteraction[state=start, focus=standard]
  \starttext
  \completecontent
  \chapter{Chapter}
  a\footnote{b}
  \stoptext

I hope it is clearer now. Let me know if it is not.

My issue is that I cannot avoid having "page=name" for links to external
documents, but this breaks footnotes and other special operation links.

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

* [NTG-context] Re: (again) wrong destination types?
  2023-12-03 15:26   ` Pablo Rodriguez via ntg-context
@ 2023-12-04 23:21     ` Bruce Horrocks
  2023-12-06 19:05       ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Horrocks @ 2023-12-04 23:21 UTC (permalink / raw)
  To: ntg-context mailing list; +Cc: Pablo Rodriguez



> On 3 Dec 2023, at 15:26, Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> wrote:
> 
> On 11/22/23 00:06, Bruce Horrocks wrote:
>> [...]
>> I changed your example to the following:
>> \setupinteraction[state=start, page=name, focus=standard]
>> \starttext
>> \input knuth \par
>> a\footnote{b} \par
>> \dorecurse{7}{\input knuth \par}
>> \stoptext
> 
> Many thanks for your fast reply, Bruce.
> 
> I wanted to reply much sooner, but it was really impossible for me.
> 
>> From your explanation, the first link (body to footnote, your point b)
> has destination to fit the whole page inside the viewer.
> 
> The second link (footnote to body, your point c) has the destination to
> reach a position inside the page (where the destination lies). This is
> what "focus=standard" should achieve.
> 
> In PDF terms (simplified), fit to page destinations are /Fit
> destinations and placed destinations are /XYZ destinations.
> 
> This sample shows what might be the root issue here:
> 
>  \setupinteraction[state=start, page=name, focus=standard]
>  \starttext
>  \completecontent
>  \chapter{Chapter}
>  a\footnote{b}
>  \stoptext
> 
> ConTeXt handles internally links in categories. For some reason unknown
> to me, "page=name" triggers that special operation links contain /Fit
> instead /XYZ destinations.
> 
> This is similar to the wrong link destinations (fit instead of standard)
> from TOC (but not in footnotes [which are right]) when compiled with MkIV:
> 
>  \setupinteraction[state=start, focus=standard]
>  \starttext
>  \completecontent
>  \chapter{Chapter}
>  a\footnote{b}
>  \stoptext
> 
> I hope it is clearer now. Let me know if it is not.
> 
> My issue is that I cannot avoid having "page=name" for links to external
> documents, but this breaks footnotes and other special operation links.

What are you using for links to external documents? If just a single command such as \goto then you might be able to get away with defining a wrapper (e.g. \myGoto) that does \setupinteraction[state=start,page=name,focus=standard] then the \goto command then \setupinteraction[state=start,page=fit,focus=standard] afterwards.

(Assuming calling \setupinteraction that many times does not cause problems in itself.)

—
Bruce Horrocks
Hampshire, UK

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

* [NTG-context] Re: (again) wrong destination types?
  2023-12-04 23:21     ` Bruce Horrocks
@ 2023-12-06 19:05       ` Pablo Rodriguez via ntg-context
  0 siblings, 0 replies; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2023-12-06 19:05 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 12/5/23 00:21, Bruce Horrocks wrote:
>> On 3 Dec 2023, at 15:26, Pablo Rodriguez via ntg-context wrote:
>> […]
>> My issue is that I cannot avoid having "page=name" for links to external
>> documents, but this breaks footnotes and other special operation links.
>
> What are you using for links to external documents? If just a single
> command such as \goto then you might be able to get away with defining a
> wrapper (e.g. \myGoto) that does
> \setupinteraction[state=start,page=name,focus=standard] then the \goto
> command then \setupinteraction[state=start,page=fit,focus=standard]
> afterwards.

Many thanks for your reply, Bruce.

The following code seems to solve my issues:

  \def\MyGoTo#1[#2]{\setupinteraction[state=start, style=,
      display=new, color=, contrastcolor=,
      page={auto,name},
      focus=standard]%
    \goto{#1}[#2]}
  \setupinteraction[state=start, style=,
      display=new, color=, contrastcolor=,
      page={no},
      focus=standard]

I didn’t thought this issue would be so easy to be solved.

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

end of thread, other threads:[~2023-12-06 19:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-20 18:01 [NTG-context] (again) wrong destination types? Pablo Rodriguez via ntg-context
2023-11-21 23:06 ` [NTG-context] " Bruce Horrocks
2023-12-03 15:26   ` Pablo Rodriguez via ntg-context
2023-12-04 23:21     ` Bruce Horrocks
2023-12-06 19:05       ` 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).