I am syncing AUCTeX with Sumatra PDF on MSWindows. I used the instructions in https://www.barik.net/archive/2012/07/18/154432/ (I write here the setqs instead of customization)
(setq TeX-source-correlate-mode t)
(setq TeX-source-correlate-method 'synctex)
(setq TeX-view-program-list
'(("Sumatra PDF" ("\"C:/bin86/SumatraPDF/SumatraPDF.exe\" -reuse-instance"
(mode-io-correlate " -forward-search %b %n ") " %o"))))
(setq TeX-view-program-selection
'(((output-dvi style-pstricks) "dvips and start") (output-dvi "Yap")
(output-pdf "Sumatra PDF") (output-html "start")))
However, when there is a space in the file name (e.g. "example 1.tex"), the syncing has problems: when from Emacs I do CRTL-c CRTL-v, it opens both the the file "example 1.pdf" and a dummy "123" file, where 123 is the line number in the source file.
Any suggestions on how to solve this problem?
C-h i
to open the info system,m Auctex <return>
to pick the AucTeX manual,m viewing <return>
to open the chapter on viewers. It looks like your value forTeX-source-correlate-method
is not in the right format. It should be(setq TeX-source-correlate-method '((dvi . source-specials) (pdf . synctex)))
– Tyler Feb 1 '19 at 18:45TeX-source-correlate-method
can be set to the symbolsynctex
. Check the docstring withC-h v TeX-source-correlate-method RET
. – Arash Esbati Feb 2 '19 at 12:31