Hi!
For all of you who didn't get forward/backward search to work. Here is my solution. Thanks to José Aliste who wrote gedit-synctex-plugin:
Preamble
- Download these files
- deflate them to ~/bin (or something within $PATH)
Backward Search (Evince → Editor)
- Adopt the first line of »~/bin/evince« (EDITORCMD) to your needs. (run »evince_backward_search« to get help for possible entries)
- Compile your .tex File with synctex (»pdflatex -synctex=1 myfile.tex«)
- Run »evince myfile.pdf« (The script should run evince_backward_search and evince)
- click on some text in evince with »Ctrl+leftclick«
- the editor should jump to the corresponding line
Forward Search (Editor → Evince)
- you have to tell your editor, to run »evince_forward_search $PDFFILE $LINE $TEXFILE« when pressing some key.
- go to some line in your editor and press the key
- evince should mark the corresponding line
in my case (using vim-latexsuite), I wrote in ~/.vim/after/ftplugin/tex.vim:
Code:
function! Tex_ForwardSearchLaTeX()
let cmd = 'evince_forward_search ' . fnamemodify(Tex_GetMainFileName(), ":p:r") . '.pdf ' . line(".") . ' ' . expand("%:p")
let output = system(cmd)
endfunction
Afterwards you can do forward search in vim with \ls
Ben
edit: thanks to hugmenot, I changed the code according to your comment
edit: changed .vim/ftplugin to .vim/after/ftplugin (thanks to jorges00)
Bookmarks