Closed ig0774 closed 8 years ago
Thanks for opening a pull request, @ig0774 :zap:
I have to say I'm not very familiar with synctex and forward/reverse sync -- the code in this package related to that was mostly added by other contributors. Soooo, I'd like to ask @nsaje for help in reviewing this -- he added the forwardSync code a few days ago in https://github.com/izuzak/atom-pdf-view/pull/111.
@nsaje Does this look okay to you? :thought_balloon:
Yep, this looks good. I didn't notice that synctex can return multiple records. Good job @ig0774 ! :shipit:
Great -- thanks for taking a look, @nsaje, :bow: and thanks again for opening a pull request, @ig0774 :zap:
I've been playing with
forwardSync
function in atom-pdf-view which works pretty well except that it doesn't always sync to the right page. The problem is thatsynctex view...
produces a list of records where the first is likely to be the most accurate. Unfortunately, in the current version, each subsequent record clobbers the previous one, so sometimesforwardSync
will jump to the wrong page. This PR fixes the issue by stopping parsing once we've hit the second record, ensuring that the jump is made to the first page.Sorry for the wall of text.
Thanks for adding the forwardSync feature. It's a real boon to those of us using LaTeX in Atom.