jlaurens / synctex

Synchronization for TeX
MIT License
64 stars 19 forks source link

1.19 incompatible with 1.18 #5

Closed stloeffler closed 6 years ago

stloeffler commented 7 years ago

Commit fcbfa2c seems to have introduced some incompatibility with previous versions. I tested with the synctex command line utility (built on Ubuntu Linux) with the files sync.* from https://github.com/TeXworks/texworks/tree/master/testcases. I used the command line synctex view -i 1:1:sync.tex -o sync.pdf in all cases. The output with 66200ee (1.18) was

SyncTeX result begin
Output:sync.pdf
Page:1
x:184.688583
y:134.764618
h:133.768356
v:134.764618
W:343.711060
H:6.918498
before:
offset:0
middle:
after:
SyncTeX result end

Since fcbfa2c (1.19), this has changed to

SyncTeX result begin
Output:sync.pdf
Page:1
x:171.128296
y:134.764618
h:133.768356
v:124.801979
W:343.711060
H:547.945190
before:
offset:0
middle:
after:
SyncTeX result end

Note in particular the different values for v and H. In particular H seems to correspond to the line height in 1.18, but to the better part of the whole page in 1.19.

jlaurens commented 7 years ago

Some synctex stuff has been pushed to texlive after it has been released and the command line tool needs an update. Below is the expected output for the latest version, only the x property has changed from previous version (and the offset). I guess you are running SyncTeX command line utility version 1.3, do you ?

This is SyncTeX command line utility, version 1.4
SyncTeX result begin
Output:sync.pdf
Page:1
x:171.128296
y:134.764618
h:133.768356
v:134.764618
W:343.711060
H:6.918498
before:
offset:-1
middle:
after:
SyncTeX result end
stloeffler commented 7 years ago

Yes, the SyncTeX command line utility version was 1.3 (though I had to make some minor adjustments - mostly synctex_node_t to synctex_node_p etc.) to get it to compile. Note that both reported revisions are part of the master branch. The 2017 branch (FWIW: c862194) seems to work as expected (reporting the version as 1.4 and a H of approx. 6.9). As there are no tags or releases, could you please tell me which branch/revision could be considered as current and stable? (I had assumed master was stable and 2017 was an experimental feature branch, but apparently I was mistaken).

PS: Note that I also saw the large height values when using the parser files from master (fcbfa2c) in TeXworks, resulting in some very strange behavior without using the command line utility.

jlaurens commented 7 years ago

2017 branch is the stable branch for this year. It is meant to mirror texlive. 2017-1.20 is the experimental one. There is also a version in pdftex svn tree... but that one is not reliable. All this is quite difficult to maintain ;-)