ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Pablo Rodriguez <oinos@gmx.es>
Subject: [NTG-context] Re: named destinations in /GoToR
Date: Tue, 14 Nov 2023 18:28:48 +0100	[thread overview]
Message-ID: <952c9fc9-39e3-10f1-0141-63e81d8e520c@gmx.es> (raw)
In-Reply-To: <CWY1G7BJGMH3.1R7439BTOFQ1R@gmail.com>

On 11/13/23 23:30, Michal Vlasák wrote:
>> […]
>> With the previous code, the only destination reads in the PDF source:
>>
>>   5 0 obj
>>   <<
>>     /D [ 0 /Fit ]
>>     /F (whatever.pdf)
>>     /S /GoToR
>>   >>
>>   endobj
>
> It seems that the default mode for outer (external file) references is
> the "auto" mode. This one seems to load the whatever.pdf file, check the
> named destinations and decide based on that.

Many thanks for your explanation, Michal.

I was totally ignorant of the page key in \setupinteraction.

It works fine now, with both the options you provided (and the patch,
many thanks for both).

I have accidentally discovered an issue in which users may run in an
uninteded ways.

If many destinations have the same identifier, only the first one is
generated.

Using the following sample:

  \setupinteraction[state=start,
    focus=standard]
  \starttext
  \dorecurse{5}{\dorecurse{5}
    {\chapter[\recurselevel]{Chapter}
      \section[sec-\recurselevel]{Section}}}
  \stoptext

Of course, this kind of identifiers have to be unique to be useful, but
I wonder whether they may be created adding something like:

  identifier
  identifier-1
  identifier-2
  identifier-3
  …
  identifier-n

This way (or a similar one) all named destinations are created.

Of course, when linking with \goto, \in, \at, \about, the right
identifier should be chosen.

With links within the same document, correcting the identifier (or the
link destination) is a trivial matter.

With links from external documents, there may be no option to generate
the external files again. If destinations are there, inspecting the
external document is an option.

Would it be possible that already given destination identifiers could
automatically have another indentifier to generate a new destination?

I hope my explanation is clear. Let me know if it isn’t and I try to
ellaborate it further (in a clearer way 😅).

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
___________________________________________________________________________________

      reply	other threads:[~2023-11-14 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 16:25 [NTG-context] " Pablo Rodriguez via ntg-context
2023-11-13 22:30 ` [NTG-context] " Michal Vlasák
2023-11-14 17:28   ` Pablo Rodriguez via ntg-context [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=952c9fc9-39e3-10f1-0141-63e81d8e520c@gmx.es \
    --to=ntg-context@ntg.nl \
    --cc=oinos@gmx.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).