I'm trying to use AUCTeX to write my LaTeX documents. However I'm having issues with performing inverse search from Xdvi to Emacs.
I currently use Emacs 24.3.1 / AUCTeX-11.87 in Ubuntu 12.04.
The Emacs was downloaded and installed from ppa:Cassou and installed using their recommended commands.
The AUCTeX-11.87 was downloaded from the AUCTeX website which was then configured (using just
./configure) and installed (using
make) inside the
The following AUCTeX environment was set in the init file (
(add-to-list 'load-path "~/.emacs.d/auctex-11.87") (load "auctex.el" nil t t) (load "preview-latex.el" nil t t) (setq TeX-auto-save t) (setq TeX-parse-self t) (setq-default TeX-master nil) (add-hook 'LaTeX-mode-hook 'visual-line-mode) (add-hook 'LaTeX-mode-hook 'flyspell-mode) (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) (add-hook 'LaTeX-mode-hook 'turn-on-reftex) (setq reftex-plug-into-AUCTeX t) ;; Inverse DVI Search (tex-dvi-view-command "xdvi -editor 'emacsclient -a emacs --no-wait +%l %f'") (setq TeX-source-correlate-method 'source-specials) ;;(setq TeX-source-correlate-method 'SyncTeX) ;; auctex 10.86 (TeX-source-correlate-mode) (setq TeX-source-correlate-start-server t) ;;(TeX-source-correlate-mode) ;;(add-to-list 'TeX-command-list '("View" "%V" TeX-run-discard nil t)) ;;update the dvi file after each successful compilation (add-to-list 'TeX-output-view-style '("^dvi$" "." "%(o?)xdvi -watchfile 1 %dS %d"))
The most important issues that I have are
Inspite of the environment specification, the
TeX-source-correlate-modeis not automatically enabled when I open a
.texfile. I need to enable it every time employing C-c C-t C-s command.
The source special is not attached by AUCTeX automatically when I compile the
Command -> LaTeXoption. Because when I open the
.dviouput using xdvi, it complains to me stating the following Warning No source specials in this DVI file - couldn't do reverse search.
The source specials do get attached to the dvi file if I just perform the following command line option
latex --src-specials main.tex
It will be of help if someone can help me identify the mistake I'm making in trying to create an inverse search from