I'm using TeXStudio on Windows 7 with MikTeX. I don't know how to get the "Jump to source" command that appears in the mouse right-click menu, in the pdf viewer, once I compile a *.tex file with Quick Build. This feature is present and works well in TeXStudio under UBUNTU 12.04. How can I get it in Windows 7 too?
3 Answers
You have to add -synctex=1 to the commands:
pdflatex -synctex=1 -interaction=nonstopmode %.texxelatex -synctex=1 -interaction=nonstopmode %.texlualatex -synctex=1 -interaction=nonstopmode %.tex
After the next compilation there is a right-click menu item titled "Go to source" (Or shortcut Ctrl+').
- 119,821
In my case, the option -synctex=1 was in the command line. Yet it didn't work. What fixed it is deleting a file with the extension *.synctex. After that, syncing worked perfectly. Apparently, the file was a remnant of a previous latex compilation on a different machine.
- 161
- 1
- 1
I had the option -synctex=1 in the command line, but I generated the .pdf file and all auxiliary files on a different folder than the .tex file by means of the option -output-directory=/some/different/directory.
After having compiled, I had a post-compiling command copy only the .pdf back to the .tex directory.
The problem was that I had to copy also the synctex file (thanks to @FahadAlrashed for the hint). So, when on post-compiling I copied not only the .pdf, but also the .synctex.gz file to the .tex directory the synchronizing feature was again operative.
Conclusion: Be sure that the right file .synctex.gz (Linux) or .synctex (Windows) is at the same directory of the .pdf file accessed by the TexStudio pdf Viewer. :)
- 3,848
pdflatex -synctex=1 -interaction=nonstopmode %.texfor that to happen? – WobblyWindows Sep 04 '12 at 20:55*latexcommands. Look under the configuration "Build", there should be an item "Build & View". Choose from the dropdown list. I think you want to havetxs:///pdf-chainwhich is later defined as a combination oftxs:///pdflatexandtxs:///view-pdf. — Hopefully that is correct. I use a SVN version. – Qrrbrbirlbel Sep 04 '12 at 21:07-synctex=1to the pdflatex command. All I did was click Yes. – WobblyWindows Sep 04 '12 at 21:14PdfLatex,xelatexandlualatex. Does this have to do with running Bibtex? Or is it because I'm running "Build & View"? – Sos May 21 '13 at 12:02