ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: future versions - synctex
Date: Tue, 21 Aug 2018 10:46:58 -0400 (EDT)	[thread overview]
Message-ID: <nycvar.YAK.7.76.44.1808211043461.25707@ervasbepr.pvz.zptvyy.pn> (raw)
In-Reply-To: <f6ba0c2d-4f0e-1486-3eb1-27b1e6959aec@xs4all.nl>

On Tue, 21 Aug 2018, Hans Hagen wrote:

> On 8/21/2018 3:04 PM, Aditya Mahajan wrote:
>> On Tue, 21 Aug 2018, Hans Hagen wrote:
>> 
>>>> Anyway, a better support for "pick-in-PDF-and-go-to-source" (synctex), 
>>>> namely when user "tunes" the docs to their final stage, would be great.
>>> I think that the current approach to hard code synctex libraries into a 
>>> viewer is a limitation (instead an editor should call an external program 
>>> with the page and coordinates so that an external program can then look at 
>>> the synctex file and decide where to go in the editor. That way more 
>>> sophisticated support is possible than the now hard coded heuristics. Keep 
>>> in mind that these heuristics are tuned for latex and from context we 
>>> generate the real minimal amount of synctex code that works without 
>>> clashing with these heuristics. If that were not that case is would be 
>>> unuseable.
>>> 
>>> Anyhow, there's only so much i can do about it (i'm not going to patch 
>>> viewers). Currently synctex is mostly working for decent structured source 
>>> (can be multiple files).
>> 
>> Which of the existing viewers have this functionality? Last time I tried 
>> using synctex on linux, almost all viewers gave an error that they could 
>> not parse synctex file.
>
> I think that is because the format of the synctex file changed.
>
>> Is there some documentation on what is the format of the synctex file 
>> written by ConTeXt and how the external program should be called with page 
>> and coordinates? With that we can try to raise an issue asking the pdf 
>> viewers to support that.
>
> context outputs a bare minimum of synctex info: basically it identifies text 
> and marks that, so we don't need the whole nested box mess that can confuse 
> the parser (think of boxes that lap or are moved or lie about dimensions)
>
> is you have a context synctex file you only see a few levels (basically words 
> / lines) marked
>
> There is a script:
>
> mtxrun --script synctex
>
> basically all an editor has to do is call:
>
> mtxrun --script synctex
>  --page=123 --x=400 --y=500
>  --editor=scite
>  foo.synctex

Are the x and y values in pts (post script points or big points?) 
measured from the top-left corner?

> the script will look into the synctex file and figure out where to go to. 
> Basically all the viewer needs to do is react to a click/cursor/key 
> combination and call mtxrun .... with the page and positions (basepoints in 
> pdf coordinate space)

How do I configure the editor command, e.g., with VIM, mtxrun will need to 
call:

`vim --servername=VIM --remote +{line_number} {filename}`

What should be the value of `editor` in this case?

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2018-08-21 14:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 18:43 future versions Hans Hagen
2018-07-24 19:07 ` Hans van der Meer
2018-07-24 20:35   ` Pablo Rodriguez
2018-07-24 20:30 ` Pablo Rodriguez
2018-07-24 21:02 ` Idris Samawi Hamid ادريس سماوي حامد
2018-07-24 23:21   ` Hans Hagen
2018-08-21  8:00     ` future versions - synctex Procházka Lukáš Ing.
2018-08-21  8:33       ` Hans Hagen
2018-08-21 13:04         ` Aditya Mahajan
2018-08-21 13:19           ` Hans Hagen
2018-08-21 14:46             ` Aditya Mahajan [this message]
2018-08-21 15:17               ` Hans Hagen
2018-07-25  1:29 ` future versions Rik Kabel
2018-07-25  8:19   ` Henning Hraban Ramm
2018-07-25 13:50     ` Rik Kabel
2018-07-25 16:06       ` Hans Hagen
2018-07-25 16:18       ` Alan Braslau
2018-07-25 17:01         ` Hans Hagen
2018-07-25 11:36   ` Hans Hagen
2018-07-25  7:45 ` Robert Zydenbos
2018-07-25 10:03   ` Richard Mahoney | Indica et Buddhica
2018-07-25 12:50     ` Hans Hagen
2018-07-25 13:12       ` Weber, Matthias
2018-07-25 17:50         ` Hans Hagen
2018-07-25 20:22           ` Henning Hraban Ramm
2018-07-25 11:38   ` Hans Hagen

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=nycvar.YAK.7.76.44.1808211043461.25707@ervasbepr.pvz.zptvyy.pn \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /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).