Follow cursor location from kile to evince

1

I know the title is probably not very clear, so I'll try to be as clear as possible here.
I'm running xubuntu on my netbook, and I'm using kile for my latex editing. Since kile is native to kde, I had to manually set it to open pdfs and dvis on evince instead of okular.

Now, last time I played around with LaTeX I was using TeXnic center on windows, and it had a very neat feature. Whenever I hit "QuickBuild", not only would it open the output .dvi file, but it would also show me exactly the piece of text I was editing. That is, if I were editing line 13 of the 7th of my document, when I compiled it, the dvi viewer would automatically take me to line 13 on the 7th page of the document, so I wouldn't have to scroll all the way down to it every time I compiled the .tex file.

I'm guessing this is a pretty standard feature, and kile probably supports it. But since I don't know what it's called, I'm trying to be clear as to what I'm talking about. Problem is, this feature is not working for me right now, and I'm guessing it's either because evince does not support it, or because I have to manually configure it.

Which one is it? And how do I manually configure it, if that's the case?

EDIT: Ok, I guess it's not standard. So doesn't kile support this feature at all?

Malabarba

Posted 2010-03-22T04:57:00.447

Reputation: 7 588

Answers

1

I do not have a solution for your problem, but my guess is that this is not "a pretty standard feature". Sure, you can make evince to display, say, page 7 of your document,

evince -p 7 your_document.pdf

but the really tricky part is to know where the part under your cursor in the editor will end up in the rendered output file.

A (very limited) solution might be to find a phrase close to the cursor in the editor and run evince like

evince -l "phrase under cursor" your_document.pdf

which obviously runs into problems if your cursor is on a word like "the" in the editor.

What I do instead (when editing LaTeX source with emacs) is to just keep an evince window open with the part I am currently working on. If the output file gets updated, evince will refresh that page, (indirectly) putting me right where I wanted to be.

Benjamin Bannier

Posted 2010-03-22T04:57:00.447

Reputation: 13 999