jlaurens / synctex

Synchronization for TeX
MIT License
64 stars 19 forks source link

Differences between versions #83

Open ddanco opened 5 months ago

ddanco commented 5 months ago

We have been using an older version of SyncTeX (see version specs below). We use pdflatex with the synctex option to generate the .synctex files, and then use the values in that output file (via synctex find)to determine various positions in our document (to be used for various custom operations).

We are now attempting to upgrade to a newer version, but there are various changes between the new generated synctex files, and the old, when run on the same document. I've attached a simple example: a .tex file, the .synctex files (old and new), and a visual of (some of) the diff between those files. (All have been changed to .txt files so they can be uploaded here.)

Could you please help us understand the meaning behind the differences, so that we can translate our usage of the points?

Command: pdflatex -shell-escape --interaction=batchmode --synctex=-1 test.tex

Old versions: pdflatex: pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) SyncTeX command line utility, version 1.3 Synchronize TeXnology command-line client, version 1.18

New versions: pdflatex: pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022/Debian) SyncTeX command line utility, version 1.5 Synchronize TeXnology command-line client, version 1.21

test.tex.txt test_old.synctex.txt test_new.synctex.txt

image
jlaurens commented 5 months ago

In the line

r1,10:...

1 corresponds to the input file number 1 10 corresponds to the line number 10 in that file

The changes mean that the line number for rules is inaccurate in the new version. Maybe you can uses a void hbox instead.

Thanks for pointing this out, I will investigate more precisely soon but it will not be updated on texlive and other distributions before some time.

ddanco commented 4 months ago

Thanks for the update, please let me know if you are aware of which version of synctex/texlive this might have started in so that we can use the most recent version possible, while avoiding this issue. (I will also update here if we find this out as we continue to work on this.)