[texshop] Synctex and component files

Bruno Voisin bvoisin at icloud.com
Fri Oct 14 08:24:40 CEST 2022


> On 13 Oct 2022, at 18:56, Alan C. Bowen <bowen at ircps.org> wrote:
> 
> I have been trying to get Synctex to work with a ConText structure of product and component files using
> 
> 	% !TEX useAlternatePath
> 	% !TEX useConTeXtSyncParser
> 	\setupsynctex[state=start, method=max]
> 
> and the various preference settings for the Sync Method in the Typesetting menu. This works  when I typeset a single source file but, so far, I have had no luck no matter whether theses lines are in the product file or in the component source files. Is there a way to get syncing with source files structured in this way? I have checked the files that come with TeXShop itself and did not see an answer there.


First a disclaimer: I'm not a ConTeXt user myself, I'm only posting something because nobody did so far, to initiate the discussion. So what follows may be entirely irrelevant.

I was about to write stuff about the separate evolutions of SyncTeX, LuaTeX and ConTeXt. But then looking at CommentLines.pdf (in TeXShop's Help > Comment Lines and Hidden Preferences) to find what useConTeXtSyncParser is, it turns out the matter is discussed there in detail already. 

The only things I could think of:


- You mention a "structure of product and component files". Is this something specific to ConTeXt? Is this similar to having a root file and ancillary files in LaTeX (like a main book root file and separate files for each chapter), which would use \include or \input commands?

If so, based on "Setting a Project Root File" and "Synchronizing Source and Preview" in the Advanced section of TeXShop's Help panel, there seems to be separate comments for LaTeX and ConTeXt, "root" for the former and "projectfile" for the latter. Namely:

"
ConTeXt uses a different method of inputting files, so a search for \include and \input statements will not find related ConTeXt files. There is a manual method to indicate files to be searched for synchronization; this method works with any typesetting method and is required in ConTeXt. At the top of the root file, list files to be searched via

	% !TEX projectfile =

Here are examples:

	% !TEX projectfile = /Users/koch/MyDoc/chapter1.tex
	% !TEX projectfile = chapter2.tex
	% !TEX projectfile = ../chapter3.tex
"

However, given the "From now on, we discuss the older Search method; most of these comments do not apply to SyncTeX" a few lines above in the Help, it's unclear whether projectfile is still to be used for ConTeXt, or only with the older search-based method.

Did you try either (root or projectfile)?


- A few weeks ago, looking for information on LuaMetaTeX, I think I read somewhere about a complete reimplementation of SyncTeX in it. Maybe it was just the mention of the removal of the \synctex primitive in the LuaMetaTeX manuel <http://www.pragma-ade.nl/general/manuals/luametatex.pdf>, I don't remember.

Are you using LMTX, the latest, LuaMetaTeX-based version of ConTeXt? Or an earlier version? Dick wrote about useConTeXtSyncParser "One consequence of this development is that Hans can modify sync code if he wishes without breaking sync in TeXShop", but you never know.


Hope this helps,

Bruno Voisin




More information about the texshop mailing list.