[Tex/LaTex] Syncing feature between editor and pdf viewer not working

forward-inverse-searchmiktextexstudio

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?

Best Answer

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+').