izuzak / atom-pdf-view

Support for viewing PDF files in Atom.
https://atom.io/packages/pdf-view
MIT License
108 stars 30 forks source link

Confusion on how to implement synctex #151

Closed BoyuLyu closed 7 years ago

BoyuLyu commented 7 years ago

Hello, I am using Atom to compile Latex, however the synctex doesn't work. In the manual the author referred to some configuration on PATH. Could anybody make a more detailed explanation on it?

Thanks~!

izuzak commented 7 years ago

@HHHit Was the PDF you're looking at created with the --synctex=1 option and do you have the synctex program on your machine? If so, then if you open the settings for this package in Atom, you can configure where the synctex program is located there (i.e. the path for the program). Have you tried doing that and it didn't work? If that's correctly configured, then try restarting Atom and see if it works. If it doesn't -- then I'm not sure what might be the problem. If you'd like, you could post the PDF and the source here so that someone else can try reproducing the issue.

Also, it would be helpful if you could post the version of Atom and this package you're using, and your OS+version.

BoyuLyu commented 7 years ago

Thks a lot! I have added a line at the top of source code: \synctex=1 and it still doesn't work. When I click on the pdf, another blank page come out. As to the synctex you referred to, is it the profile generated after compile or something else?

izuzak commented 7 years ago

As to the synctex you referred to, is it the profile generated after compile or something else?

Which profile are you referring to and how is that relevant? In any case, I can't offer much advice about synctex. Synctex work fine for me, and you haven't provided any answers to the questions I asked in my previous message. If you can provide more information and clear reproduction steps -- I'd be happy to reopen this.

hasantahir commented 7 years ago

Hi,

I have run into the same issue where I think I don't know how to configure the path. My LaTeX setup is MikTeX 2.9 (updated a couple of weeks ago) on windows 10 operating system with Atom version 1.12.6. Passing the parameter --synctex=1 during the compilation doesn't trigger anything from the generated pdf. I must mention that synctex feature work fine with TeXworks environment that leads me to believe that synctex is present on my machine. Can you please help in configuring pdf-view to make synctex work?

Thank you.

izuzak commented 7 years ago

@hasantahir Sorry for not responding to your question sooner. I'm afraid I can't help you there -- I'm not familiar with *TeX setups and the synctex feature was added by a contributor to this package. If someone else watching this repository can help you debug -- that would be great. If you've already figured out things -- please post some notes for other folks who might run into the same problem. Thanks!

ig0774 commented 7 years ago

The synctex feature, unfortunately, depends on the synctex binary provided by TeXLive, but not provided by MiKTeX. Synctex usually works with most synctex-aware PDF viewers because they tend to contain a linked version of the synctex library. The only way I'm aware of to get things working on MiKTeX is to install TeXLive and copy the synctex.exe file somewhere then uninstall TeXLive (synctex.exe may have other dependencies; I can't check atm).

MattKang commented 7 years ago

@ig0774 I just wanted to confirm that this does indeed work. You need to copy two files to your MiKTeX path: