-
Notifications
You must be signed in to change notification settings - Fork 539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyncTeX binary precedence over synctex.js? #4186
Comments
I have good news: we are not crazy yet! I have managed to trace back to the column-locating code. It was introduced in #1161. It is still alive LaTeX-Workshop/src/locate/synctex.ts Lines 471 to 492 in ee13477
Ctrl-clicking inside the pdf calls LaTeX-Workshop/src/preview/viewer.ts Line 300 in 614eec1
If I understand correctly, synctex does provide a column number but it can be quite inaccurate. The function |
[Internal Discussion]
As per #4181 (comment) and #4168, I did not find the column-locating code for synctexjs we have been using. I also backtrace a few years code in the past and did not find that. Strangely both you @jlelong and I seem to have an impression on the feature.
I also checked (roughly) the code on invoking SyncTeX binary and figured that the binary indeed returns with a column index:
LaTeX-Workshop/src/locate/synctex.ts
Lines 98 to 101 in 6c63cc3
instead of the 0-column of synctexjs:
LaTeX-Workshop/src/locate/synctex/worker.ts
Line 236 in 6c63cc3
But now we have
latex-workshop.synctex.synctexjs.enabled
defaults totrue
:LaTeX-Workshop/package.json
Lines 1682 to 1687 in 6c63cc3
What about we return to first try the binary, if anything went wrong (not found, non-zero return), we fallback to the javascript implementation to balance the utility and availability? We may also remove this config if so, or change the purpose of it to be overriding this new logic. May I� have your thoughts? @jlelong
The text was updated successfully, but these errors were encountered: