I have GNU Emacs 24.4.1 (i686-pc-mingw32) with AUCTeX 11.88.9. In a recent document, I've noticed that the forward search (source to pdf) from a file that has been included in
main.tex via the
\input command, does not take me exactly to the corresponding line in the output pdf file. Indeed, if I type C-c C-v in the dependent file, emacs says "there's no dependent.pdf".
I've also noticed that the preview-latex feature of AUCTeX does NOT work if I call it from inside the dependent file. Only if I type C-c C-p C-s from
main.tex, the math expressions are correctly visualized in the dependent file.
It seems the Forward search is somehow disconnected. The Backward search (pdf to source), on the other hand, works fine – if I double-click a line in the pdf, I'm taken to the dependent file without any trouble.
I have copy/pasted the following lines in my
.emacs file from this well-known discussion in StackOverflow:
(setq TeX-PDF-mode t) (setq TeX-source-correlate-mode t) (setq TeX-source-correlate-method 'synctex) (setq TeX-view-program-list '(("Sumatra PDF" ("\"C:/Program Files/SumatraPDF/SumatraPDF.exe\" -reuse-instance" (mode-io-correlate " -forward-search %b %n ") " %o")))) (eval-after-load 'tex '(progn (assq-delete-all 'output-pdf TeX-view-program-selection) (add-to-list 'TeX-view-program-selection '(output-pdf "Sumatra PDF"))))
I don't know if I should post this question in the TeX.SX but I wouldn't know where else to find a better crowd, skilled both in elisp and LaTeX.
PS. Given this other question, it seems I'm not the only one with this problem, except I'm not using arara.