zathura/doc/man/_synctex.txt
Sebastian Ramacher 1d67949b32 Improve synctex documentation
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2017-12-21 15:24:25 +01:00

32 lines
1.3 KiB
Text

Both synctex forward and backwards synchronization are supported by zathura, To
enable synctex forward synchronization, please look at the *--synctex-forward*
and *--synctex-editor* options. zathura will also emit a signal via the D-Bus
interface. To support synctex backwards synchronization, zathura provides a
D-Bus interface that can be called by the editor. For convince zathura also
knows how to parse the output of the *synctex view* command. It is enough to
pass the arguments to *synctex view*'s *-i* option to zathura via
*--syntex-forward* and zathura will pass the information to the correct
instance.
For gvim forward and backwards synchronization support can be set up as follows:
First add the following to the vim configuration:
::
function! Synctex()
execute "silent !zathura --synctex-forward " . line('.') . ":" . col('.') . ":" . bufname('%') . " " . g:syncpdf
redraw!
endfunction
map <C-enter> :call Synctex()<cr>
Then launch *zathura* with
::
zathura -x "gvim --servername vim -c \"let g:syncpdf='$1'\" --remote +%{line} %{input}" $file
Some editors support zathura as viewer out of the box:
* LaTeXTools for SublimeText
(https://latextools.readthedocs.io/en/latest/available-viewers/#zathura)
* LaTeX for Atom (https://atom.io/packages/latex)