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?
This is a feature called
synctex. The inverse search function relies on an auxillary file named
[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
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).