[tex-live] Synctex in TL 2011 requiring redundant /./

Philipp Stephani p.stephani2 at googlemail.com
Wed Aug 17 07:17:03 CEST 2011


2011/8/16 Karl Berry <karl at freefriends.org>:
>    I find this syntax for synctex very counterintuitive, and I wonder if
>    this is intentional and will it last?
>
> Presumably it should be supported but not required.

Without looking into the source code, it seems that SyncTeX uses
string identity to test whether two file names are equal. That doesn't
work because there is always an unpredictable number of wayy to refer
to the same file:
- Absolute and relative path names
- On Windows: there is more than one root in the Win32 namespace
(\a\b\c is not necessarily unique), and there are multiple current
directories (e.g. C:file vs. D:file)
- Unicode normalization (on OS X)
- Case folding (on Windows)
- Special directory names . and ..
- Multiple slashes as directory separator
- Hard links
- Symbolic links
- Junctions, reparse points (on Windows)
- / and \ are both valid directory separators for the Windows API
Therefore a filename comparison may never use plain string comparison.
The only reliable way to test whether two filenames refer to the same
file is to compare their volume and file indices, using
GetFileInformationByHandle on Windows and stat on Unix-like systems.
If I find the time, I'll try to have a look at the SyncTeX source code
to see whether it can be modified accordingly.



More information about the tex-live mailing list