auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] Forward and inverse search with Emacs 24.1, Auctex 11.86 an


From: AW
Subject: Re: [AUCTeX] Forward and inverse search with Emacs 24.1, Auctex 11.86 and Okular
Date: Thu, 21 Jun 2012 23:00:08 +0200
User-agent: KMail/4.8.4 (Linux/3.4.2-28-desktop; KDE/4.8.4; x86_64; ; )

> Date: Thu, 21 Jun 2012 13:48:52 +0200
> From: Marcus Frings <address@hidden>
> To: address@hidden
> Subject: Re: [AUCTeX] Forward and inverse search with Emacs 24.1,
>         Auctex 11.86 and Okular
> Message-ID:
>         <vita-brevis-breviter-in-brevi-finietur-mors-venit-velociter-quae-ne
> address@hidden> 
> Content-Type: text/plain; charset=utf-8
> 
> * AW <address@hidden> wrote:
> > for curiosity I installed Emacs 24.1, but kept AUCTeX 11.86, all and
> > everything under openSuse 12.1, but with new KDE 4.8.4
> > 
> > 
> > Forward search (C-c C-v) opens Okular, but on the page displayed last
> > time and
> > not where I'm no in my document, and backward search (shift + right
> > click) in
> > Okular does not do anything.
> > 
> > 
> > Hey, is there somewhere a canonical howto make it work? I tried so
> > many
> > things, but much may be outdated.
> 
> Forward search is a little bit tricky at the moment with AUCTeX and
> okular (with backward search I have never had any problems) due to a
> current incompatibility between AUCTeX, synctex and okular, but
> nevertheless this quick-fix (which I took from the okular bug tracker)
> works for me since various months:
> 
> ;; Quick-Fix BEGIN
> (add-hook 'LaTeX-mode-hook
>             '(lambda ()
>                  (add-to-list 'TeX-expand-list
>                                   '("%u" Okular-make-url))))
> (defun Okular-make-url ()
>   (concat
>    "file://"
>    (expand-file-name (funcall file (TeX-output-extension) t)
>                           (file-name-directory (TeX-master-file)))
>    "#src:"
>    (TeX-current-line)
>    (expand-file-name (TeX-master-directory))
>    "./"
>    (TeX-current-file-name-master-relative)))
> ;; Quick-Fix END
> 
> (setq TeX-view-program-list
>       '(("Okular"
>        ("okular --unique %u")))) ;; <<-- This is part of the quick-fix.
>                                  ;; If all is in sync again, one can
>                                  ;; hopefully use the regular method
>                                  ;; from the next line again.
>        ;; ("okular --unique %o" (mode-io-correlate "#src:%n%b")))))
> 
> (setq TeX-view-program-selection '((output-pdf "Okular")))
> 
> HTH,
> Marcus
> -- 
> "SCHEISSE! Zwotes Schraubenger?usch in 76?. Kommt schnell n?her!"

YES! That did the trick after compiling the text again. 

Thank youhoo!

Alexander



reply via email to

[Prev in Thread] Current Thread [Next in Thread]