Re: synctex issue

Gavin via ntg-context <[email protected]>
Newsgroups gmane.comp.tex.context
Message-ID <[email protected]>
Thanks, Jim. I’ll look into that for my projects!

> On Apr 14, 2026, at 5:58 PM, Jim <[email protected]> wrote:
> 
> Hi Gavin,
> 
> Google claims TeXShop 4.65 (the version mentioned below) was released on
> June 18, 2019.  The current version is 5.57, so a lot of water has gone
> under the bridge since then.
> 
> A couple of years ago (2023? 2024?) Hans added the
>        --synctex=repeat
> option (and an analogous ConTeXt command) which makes ConTeXt's synctex
> file compatible with Laurens' synctex.
> 
> When I first started using ConTeXt (2022) I had to write a wrapper around
>        mtxrun --script synctex ...
> to get synctex support in my editor of choice.  But a year or so later I no
> longer needed to do that because --synctex=repeat creates a compatible
> synctex file.
> 
> So...
> I think that some of the information you quote below is seriously outdated.
> It may well be that the "must do this" advice mentioned below still works,
> but I don't believe it is any longer necessary.
> 
> Cheers.
>                                Jim
> 
> On Tue, Apr 14, 2026 at 13:42 (-0600), Gavin via ntg-context wrote:
> 
>> Hi Alan,
> 
>> I haven’t been following this discussion closely, so you may already know
>> this. TexShop needs a magic line to correctly work with SyncTeX. I’m
>> quoting a section of the TeXShop Manual, which can be accessed from the
>> Help menu in TeXShop.
> 
>> Gavin
> 
> 
>>> 21.2 SyncTeX in ConTeXt
>>> SyncTeX is technology by Jerome Laurens; using it, a user can jump from a spot in the source file of a document to the corresponding spot in the output pdf file, and vice versa. Laurens provides code which generates a synctex file during typesetting. This code has been adopted by the authors of most current TeX typesetting engines. Laurens also provides C code for front end developers which can open this synctex file and provide the key information allowing them to sync from one window to another.
> 
>>> But Hans Hagen eventually rewrites everything for ConTeXt, and several years ago he replaced Laurens’ code with his own version to generate the synctex file in ConTeXt. This was painful for me because Hagen used Lauren’s original design of synctex and ignored a later modern version. So TeXShop had to include two versions of the C code for front end developers, one for all engines except ConTeXt and a second just for ConTeXt.
> 
>>> But recently Hagen also wrote code to interprete the synctex file for ConTeXt users. This is a welcome improvement, which has been in TeXShop since version 4.65. To use it, ConTeXt users must take two actions. First, near the top of the root source file of a project, they must include the line
> 
>>> % !TEX useConTeXtSyncParser
> 
>>> And second, users must add to the header section of the root ConTeXt source file the line
> 
>>> \setupsynctex[state=start,method=min]
> 
>>> These rules apply to all recent versions of ConTeXt.

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

maillist : [email protected] / 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
___________________________________________________________________________________
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.