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?


You have to add -synctex=1 to the commands:

  • pdflatex -synctex=1 -interaction=nonstopmode %.tex
  • xelatex -synctex=1 -interaction=nonstopmode %.tex
  • lualatex -synctex=1 -interaction=nonstopmode %.tex

After the next compilation there is a right-click menu item titled "Go to source" (Or shortcut Ctrl+').

  • Hi Qrrbrbirlbel! That almost worked for me. In the haste I accidentally deleted the command that makes me open the pdf viewer automatically. What should I write after pdflatex -synctex=1 -interaction=nonstopmode %.tex for that to happen? – WobblyWindows Sep 4 '12 at 20:55
  • @WobbyWindows That has nothing to do with any *latex commands. Look under the configuration "Build", there should be an item "Build & View". Choose from the dropdown list. I think you want to have txs:///pdf-chain which is later defined as a combination of txs:///pdflatex and txs:///view-pdf. — Hopefully that is correct. I use a SVN version. – Qrrbrbirlbel Sep 4 '12 at 21:07
  • I went to Options menu > Configure TexStudio > Commands and fixed it from there. I symply checked & unchecked the Pdf Viewer > internal viewer box and it took care of itself by offering me to add -synctex=1 to the pdflatex command. All I did was click Yes. – WobblyWindows Sep 4 '12 at 21:14
  • Had the same problem like WobbyWindows (but on a Debian machine). Adding -synctex=1 to the pdflatex command worked for me as well. Regarding the option of checking/unchecking that WobbyWindows mentioned - I do not see that button in my version (2.5.2). – Amir Mar 22 '13 at 17:06
  • 3
    Also: latex -synctex=1 -interaction=nonstopmode %.tex – user29661 Apr 25 '13 at 9:01

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.

protected by Community Aug 26 '16 at 14:11

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.