[tex-live] SyncTeX should always write absolute paths
Philipp Stephani
st_philipp at yahoo.de
Sat Oct 3 11:27:40 CEST 2009
Am 03.10.2009 um 09:59 schrieb David Kastrup:
> Philipp Stephani <st_philipp at yahoo.de> writes:
>
>> Hello,
>>
>> probably this is the wrong place to ask, but I'm unsure who exactly
>> is
>> responsible for SyncTeX in TeX Live. However, I think that SyncTeX
>> should always output absolute paths. The current behavior is to write
>> relative paths for the input files, which breaks inverse search e.g.
>> in Skim when a different output directory is set via -output-
>> directory. I could easily fix this by having my build script replace
>> all input paths with absolute paths. It would be great if SyncTeX
>> wrote absolute paths right from the beginning.
>
> I don't think that this is a good idea, with the possible exception of
> -output being specified as an absolute path, but even then I am not
> sure. Why don't you run Skim with the same current directory as TeX?
> You don't need to have its current directory be the output
> directory, do
> you?
I don't think OS X applications have a meaningful concept of "current
directory." And even if they have, is the current directory local to
the document or the application? In any case it doesn't work
regardless whether I start Skim from the input directory. Probably it
uses the directory of the .synctex.gz file as starting point for
relative paths, and I think this is entirely fine because the SyncTeX
functionality should not depend on how the viewer was started. Since
the input directory doesn't seem to be stored in the synctex file, the
viewer has no possibility of finding the input files.
> The problem with absolute paths is that moving the TeX directory
> anywhere else (USB stick, separate mount points, zip here, unpack
> there)
> will break things.
That is correct, but I think this would be a minor flaw because the
correct information will be restored as soon as the document is
recompiled. However, if relative paths are a requirement, they should
be either relative to the output directory or not used at all when the
output directory differs from the input directory.
More information about the tex-live
mailing list