From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: Jim <zlists+context@jdvb.ca>,
mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@freedom.nl>
Subject: [NTG-context] Re: mtx-synctex.lua question
Date: Fri, 8 Dec 2023 15:03:31 +0100 [thread overview]
Message-ID: <913fa7c5-a9fc-4edf-909f-f7805e97aaa3@freedom.nl> (raw)
In-Reply-To: <ZXINhp8TMcnMQ/75@x360.localdomain>
On 12/7/2023 7:23 PM, Jim wrote:
> Hi,
>
> In mtx-synctex.lua, inside
> local function findlocation(filename,page,xpos,ypos,tolerance)
> there is the following code:
> for s=1,tolerance,max(tolerance//10,1) do
> locate( s, 0) if fi ~= 0 then tl = s ; goto done end
> locate(-s, 0) if fi ~= 0 then tl = s ; goto done end
> locate( s, s) if fi ~= 0 then tl = s ; goto done end
> locate( s,-s) if fi ~= 0 then tl = s ; goto done end
> locate(-s, s) if fi ~= 0 then tl = s ; goto done end
> locate(-s,-s) if fi ~= 0 then tl = s ; goto done end
> end
>
> Is the omission of the
> locate(0, s) ...
> and
> locate(0, -s) ...
> cases intentional, or is that an oversight?
>
> If intentional, can someone explain the rationale to me?
it's too long ago to remember the reason ... did you test with and without?
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
___________________________________________________________________________________
next prev parent reply other threads:[~2023-12-08 14:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 18:23 [NTG-context] " Jim
2023-12-08 14:03 ` Hans Hagen via ntg-context [this message]
2023-12-08 15:38 ` [NTG-context] " Jim
2023-12-08 18:51 ` Jim
2023-12-08 20:18 ` Hans Hagen
2023-12-08 21:36 ` Jim
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=913fa7c5-a9fc-4edf-909f-f7805e97aaa3@freedom.nl \
--to=ntg-context@ntg.nl \
--cc=j.hagen@freedom.nl \
--cc=zlists+context@jdvb.ca \
/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).