Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

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

share|improve this answer
    
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? –  WobbyWindows 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. –  WobbyWindows 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
show 1 more comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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