auctex
[Top][All Lists]
Advanced

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

[AUCTeX] Re: redefining PDF viewer


From: Luis Finotti
Subject: [AUCTeX] Re: redefining PDF viewer
Date: Wed, 10 Nov 2010 11:45:50 -0500

> > (setq TeX-view-program-list '(("Okular" "okular %o#src:%n%b")))
>                                                     ^^^^^^^^^ Where did
> you find these options?

My main source was this:

http://web.archiveorange.com/archive/v/1gQRWjOonD7ETcBCBfaJ

I found the %n %b from the xdvi options when running sources special.
It seems that %n is the line of the cursor in the buffer and %b is the
source file (.tex) which is in the buffer.

In general, if file.pdf was made using synctex, doing "okular
file.pdf#src:100file.tex" should open okular with the content from the
100-th line of file.tex appearing at the center of the screen.

> If you find out please let me know. Well, according to the manual the
> viewer should always be opened at the right position of the text, even
> without this "#src:%n%b":
>
> ,----[
> http://www.gnu.org/software/auctex/manual/auctex/I_002fO-Correlation.html ]
> | Forward search happens automatically upon calling the viewer, e.g. by
> | typing C-c C-v (TeX-view). This will open the viewer or bring it to
> | front and display the output page corresponding to the position of point
> | in the source file. AUCTeX will automatically pass the necessary command
> | line options to the viewer for this to happen.
> `----
>
> That's why I always used "%o" only.

But does it work for you?  I did not work for me.  Anyway, I found how
to keep a single version of okular running:

;; New method introduced in AUCTeX 11.86:
(setq TeX-view-program-list '(("Okular" "okular --unique %o#src:%n%b")))
(setq TeX-view-program-selection '((output-pdf "Okular")))

The "--unique" does the trick!  (Found in the same source.)

But, for some reasons sometimes it does not go to the correct place.
(Most of the times it does, though.)

I found out you can also revert to the old "source-specials" method
(to make it work again with xdvi) by changing
TeX-source-correlate-method variable from "auto" to
"sources-special".  (I did it via the menu entry: latex -> Customize
AucTeX -> TeX command -> TeX view -> TeX source correlate mode.)


I hope this helps.  I could not live without forward/inverse search.

Thanks for your help,

Luis



reply via email to

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