Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it possible to setup SyncTeX with Emacs on debian stable (squeeze)?

Emacs24 is available from http://emacs.naquadah.org/ but squeeze is at its end of cycle and most other tools are outdated.

$ evince --version
GNOME Document Viewer 2.30.3

$ okular --version
Qt: 4.6.3
KDE Development Platform: 4.4.5 (KDE 4.4.5)
Okular: 0.10.5

I found the article Setup SyncTeX with Emacs but could not reproduce it here yet and want to know if there is a chance.

share|improve this question
    
Possible duplicate of tex.stackexchange.com/q/29813/3406 –  Faheem Mitha Feb 1 at 22:02

2 Answers 2

up vote 4 down vote accepted

SyncTeX has been supported by Evince since version 2.32, while the Evince version on Debian Squeeze is 2.30. So it is not possible to setup SyncTeX with Evince.

share|improve this answer

I see no reason why it shouldn't work. In my opinion, you should try it right away and come back here only if you have any trouble during the setting up.

Since you have okular, I would disadvise following the guide you mentioned : it is made for evince, which is known to be way more troublesome than okular for synctex.

With okular, forward search is just a matter of compiling the file with synctex, and setting the viewer to go to the corresponding line.

For this, addind the following lines to your .emacs shoud do (taken from Quick View (C-c C-v) does not work anymore after upgrading to 11.04 ):

(server-start)
(add-hook 'LaTeX-mode-hook 'TeX-PDF-mode) 
(defun pdf-with-okular ()
(add-to-list 'TeX-output-view-style
(quote ("^pdf$" "." "okular %o %(outpage)"))))
(add-hook 'LaTeX-mode-hook 'pdf-with-okular t)

(custom-set-variables
 '(LaTeX-command "latex -synctex=1")
)

Reverse search is even easier : all you have to do is, in okular options, set emacsclient as default viewer, and, if needed, start emacs server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.