allefeld/atom-pdfjs-viewer

FR: forward synctex

Edoxile opened this issue · 2 comments

One feature that is useful when writing latex is forward synctex, which allows latex editors to sync the position in the .tex file to the PDF view. If this could be implemented, it would also (partially) solve #12, since you "jump" to the position of the cursor in the .tex file, which is usually where you want to be when (re)generating pdfs.

I know pdf-view has this functionality, see this commit for how they implemented it. Maybe this can serve as a guideline. I believe the atom latex package also has to be modified for this, to allow it to open pdfjs-viewer directly.

Following the observation in this issue, I think synctex used to be implemented in former version.

I managed to make it work again following this post by uncommenting l71 and l72 in lib/pdfjs-viewer-view.js and changing l217 to var lines = output.split(/\r?\n/g).

@Edoxile, sorry for not responding to your issue. There is actually SyncTeX support implemented.

@Yann-Situ, I have no idea why lines 71 and 72 are commented. Regarding line 217, you're saying there should be a var before the assignment?

The general problem is that I haven't been using this package myself for a while now, I've moved to VSCode & Quarto.

I'd be happy if anyone is interested in taking over maintenance.