3

I have a functional setup that does bidirectional search between emacs (auctex) and okular but lacks the highlighting of the position in pdf.

In "conventional" editors, e.g. texstudio, when doing forward search the pdf is highlighted with a yellow background helping me to locate the correct position in pdf.

Can achieve this with auctex-okular? Currently forward search jumps to the correct page in okular but it is my job to identify the exact point.

My current setup, inspired by this QA, is as follow:

 '(TeX-source-correlate-method (quote synctex))
 '(TeX-source-correlate-mode t)
 '(TeX-source-correlate-start-server t)
 '(TeX-view-program-list (quote (("Okular" "okular --unique %o#src:%n%b"))))
 '(TeX-view-program-selection (quote ((engine-omega "dvips and gv") (output-dvi "xdvi") (output-pdf "Okular") (output-html "xdg-open"))))
Pouya
  • 7,269
  • Unfortunately my config using okular is gone because I use pdf-tools since some years. Under Linux it is fast and has one advantage, at least for me. Clicking on a certain letter in the PDF moves the focus to this letter in the *.tex file, so I can correct typos quickly. – Keks Dose Feb 26 '19 at 12:52
  • Generally this is solved a different way by every user since there are so many ways to init Emacs however the official line (which I have not always found to be fully accurate especially beware that cut and paste of punctuation can go wrong (reverse call should be "emacsclient -a emacs --no-wait +%l %f" ) at https://www.emacswiki.org/emacs/AUCTeX#toc27 Okular.pdf indicates page and name-dest only but I think that is old info and would like you expect to go to the line not just the page, are you using an uptodate version –  Feb 26 '19 at 16:27
  • @KJO thanks for the comment. My okular setting is exactly as you have. Indeed the backward search is working fine but the problem is the forward search. That is, I want the pdf get highlighted so that I can easily identify the changes. I rephrased the question to address the ambiguity presented in the original question. – Pouya Feb 27 '19 at 13:02

0 Answers0