Forum moved here!

Home / Can not use the inverse search with sumatrapdf and sublime

superghost

I use the guide online, and type the command:
“C:/Program Files/SumatraPDF/sumatrapdf.exe” -inverse-search ““C:\Program Files\Sublime Text 3\sublime_text.exe” “%f:%l””

However, the sumatrapdf said it cann’t load C: “%f:%l”, and it turns out I can not do inverse search. I also try to change the sumatraPDF’s setting directly by adding “%f:%l” after the path of the sublime, but it still can’t work. It said it can’t open the synchronization files.

Did anyone meet and solve this before?

Thank for help.

GitHubRulesOK

Open SumatraPDF with a .pdf that has also has a .synctex file and then go to files > advanced options again look in the settings file for the inverse search setting and double check it is as required that is like this

"C:\Program Files\Sublime Text 3\sublime_text.exe" "%f:%l"

NOTE the last character is small L there should only be normal pair double " around the sublime exe and a separate pair around %f:%l check that the path and filename are correct (some languages have two different paths) or it may be in a different folder like “C:\Program Files (x86)\Sublime Text 3\sublime_text.exe” once it is correct a double click in the pdf will start sublime with the source tex file.

superghost

Hi, thank you for your help. But I tried this, it still can’t work. I take the screen shoot, and I tried this in my another Computer, it can work. But when I use surface pro 6, it can’t. Is this related with some bugs in surface pro 6?

GitHubRulesOK

No synchronisation is the reply when “no record was found close enough to the hit point”

There can be several reasons

  1. Try again near the text itself avoiding large spaces
  2. The .synctex is one from a previous run (check .pdf & .synctex in the same folder have same time)
  3. There is a problem in the construction by the editor of the synctex file
  4. synctex historically has problems with folders and filenames that have spaces e.g. /Tex Writer/ also some packages can have problems with cjk or other “foreign” accented characters

I see from the image your file is in drop box which can also cause such problems, move a copy of the .tex .synctex and .pdf file to a simple local directory e.g. c:\TestFiles\ to check if that works.

superghost

Thank you very much. It can work now. I find this is caused by the dropbox.

I am curious the reason, I can use it with dropbox in another computer. Can you tell me how to solve this?

GitHubRulesOK

Sorry, always interested to get feedback
However drop box is different for some users, it may be the folder names or user access controls and can vary with each version or OS or admin level and even firewalls / anti-virus. There are too many variables beyond TeX or SumatraPDF controls.

Human_Obstacle

Was dealing with the same issue, for me the fix was to remove special characters from my file path

GitHubRulesOK

@Human_Obstacle

Thanks for the confirmation, although I listed it as last reason (# 4) in previous comments above , in fact this is becoming the most common reason, as more international users are using paths with native characters.
The issue raised above was most likely the second (personal surface) machine had Chinese characters for the remote dropbox folder.

There was a related issue where the VIM user found there was an improved difference by setting an option deep in windows to change UTF-8 behaviour. For a hint as to where the setting may be found see:- https://github.com/sumatrapdfreader/sumatrapdf/issues/1140#issuecomment-468358428