I installed texstudio on a windows 8.1 computer. I first installed Miktex, then Texstudio, all are in the latest vision. It confused me that when I run some texfile, the inverse search function is fine. That is, when I right click at the pdf, then there is "go to the source", and it works. But for some texfile, when I right click at the pdf, there is no such "go to the source". Does anyone knows the reason behind this?

1 Answer 1


This is a feature called synctex. The inverse search function relies on an auxillary file named [jobname].synctex (or [jobname].synctex.gz). If you delete this file, then you will unable to do an inverse search.

By default, TeXStudio will compile your document with the command line like

(pdf)latex -synctex=1 \jobname.tex

With the option -synctex=1, it will generate the file [jobname].synctex.gz for inverse search. However, if you compile the paper using command line directly, like

(pdf)latex \jobname.tex

Then no synctex file is created, so you can't do an inverse search.

More details can be found in synctex.man1.pdf, in your TeX distribution (MikTeX).

  • Then why does it work for some file not the others?
    – user146671
    Commented Oct 27, 2017 at 2:17
  • Have you ever deleted the synctex files unintentionally?
    – stone-zeng
    Commented Oct 27, 2017 at 9:48
  • Thanks for your attention for my question. No, I did not delete the synctex file. Everytime I run the tex file, it would generate a synctex file. For some file, when i click left at the embedded pdf, there is the "go to source" option. But some tex file, no such option. I found that the difference may come from the location of the latex file. The ones works are on the desktop, those do not work are in my D disk. So now when I want to edit some thing, I first put it to the desktop. This is not a good solution, But it seems that I have to go with it. Thanks again.
    – user146671
    Commented Oct 29, 2017 at 14:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .