mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 15:26:01 +01:00
32 lines
1.3 KiB
Text
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
|
|
*--synctex-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)
|