7

I am using Texstudio. A useful function of the integrated visualizer is that if I right click at some point of the pdf, I can go to the corresponding code. This works for all of my tex files, except ONE ! (the one I'm working on now, of course...) When I click right, the other options are there (zoom in, zoom out, etc) but not go to source code.

Any idea how I can fix this ?

  • 2
    Welcome to TeX.SX! Do you compile with the same tool as your other documents? Is the -synctex=1 option added to that tool? – Torbjørn T. Sep 17 '14 at 12:31
  • hi and thanks for the remply ! I do use the same tool, and I found this written in the compilation options : xelatex.exe -synctex=1 -interaction=nonstopmode %.tex – Kam Sep 17 '14 at 12:47
  • Ok, then that's not the issue at least. I'm afraid I don't know what could be the cause. – Torbjørn T. Sep 17 '14 at 12:53
  • OK, too bad then :( – Kam Sep 17 '14 at 14:04
5

I believe the problem is related to a missing / defect yourFileName.synctex.gz file. In my case the problem was caused by Google Drive (other cloud sync services like Dropbox or OneDrive might cause the same issues).

To solve it, I removed all generated files (.aux, .log, .out, .pdf and .synctex.gz if it exists) and recreated the entire document. Afterwards the button was available again.

2

I found the answer on a related question on this site. My file had spaces in its names, which apparently the forward inverse search didn't like... Easy fix when you know !

  • 2
    I downvoted because this is not the solution. I experience the problem from time to time without any spaces in the file names. So it seems to have nothing to do with spaces in file names... or not only. Besides, this should have been fixed in the last 2 years. But that is all I can say at this point, I have been chasing this ghost for weeks and ultimately I gave up. :/ – henry Sep 22 '14 at 12:14
  • I think it has to do with the number of compiles... – henry Sep 22 '14 at 12:27
  • 2
    @henry Down-voting because an answer fails to fix software for which the answerer is not responsible is, in my view, unfair in the extreme. Bugs in software are the responsibility of the developers and (in the case of free software) the users. Taking out your frustrations on somebody who has found even a partial workaround is petty-minded. In any case, it is very likely the spaces were the problem in the OP's case. Similar problems can be caused by different causes: diagnosing one is not invalidated by a failure to account for all the others. – cfr Mar 17 '15 at 1:49
  • 1
    @henry And the bug report closed as fixed is for a different editor.... – cfr Mar 17 '15 at 1:51
1

I have seen this problem many times with TexStudio. Most often it works perfectly, but suddenly the syncing doesn't work anymore. I don't think that TexStudio is the cause of the problem; because when synching doesn't work, the problem exist in TexMaker and TexWorks, as well. It may be a MikTex problem. Renaming files helps sometimes but not always. In my cases it always helps to (1) split large files into smaller files, (2) avoid reusing "bad filenames" and (3) avoid deep include hierarchies. Of course, this is just a work-around, not a solution.

1

Besides the file name, check the extension. I was frustrated by "Go to Source" working on some files but not others, until I noticed that some files had extension .tex and others .TeX. The problem was only with the .TeX files. I changed all to .tex, and that fixed it!

  • Can you confirm which OS (Win/Mac/Nix) Editor/Viewer you found this occurred on since this may be OS dependant behaviour but may not on others E.G on windows using smatraPDF go to source starts with .PdF no problem and fires up TeXworks via .GZ and jumps to . editor containing filename.TeX so not a problem on this MiKTeX – user170109 Jan 18 at 0:27
0

Sorry for the bump but I had a similar issue. I had the same problem for a fairly large document. Another document however, worked fine but my large document did not.

I tried deleting all the generated files e.g. .aux, .bbl etc and then recompiling. This did not fix the problem.

I also tried resetting my texstudio profile by making a backup of my original profile and then opening texstudio again. This creates then a new profile. Again, this did not solve the problem.

I discovered the problem in my case was with the package:

pdfpages

Once I removed that, I was able to use the "go to source" function correctly. If you guys are having similar issues, where the "go to source" function still works correctly with other documents, I suggest there may exist some compatibility issue with the packages you are using in the problematic document.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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