export
delm
q
$FILE
$PAGE
$DBUS
!
o
save(!)
Tab
nohl
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:
The customization of zathura is be managed via a configuration file called zathurarc. By default zathura will evaluate the following files:
The zathurarc file is a simple plain text file that can be populated with various commands to change the behaviour and the look of zathura which we are going to describe in the following subsections. Each line (besides empty lines and comments (which start with a prepended #) is evaluated on its own, so it is not possible to write multiple commands in one single line.
In addition to the build-in :set command zathura offers more options to be changed and makes those changes permanent. To overwrite an option you just have to add a line structured like the following
set <option> <new value>
The option field has to be replaced with the name of the option that should be changed and the new value field has to be replaced with the new value the option should get. The type of the value can be one of the following:
In addition we advice you to check the options to get a more detailed view of the options that can be changed and which values they should be set to.
The following example should give some deeper insight of how the set command can be used
set option1 5 set option2 2.0 set option3 hello set option4 hello\ world set option5 "hello world" set option6 "#00BB00"
Especially for options with strings as values, note that escaping of special characters and white spaces is necessary. In the above example, option4 and option5 are both set to hello world, but set option6 hello world would set option6 only to hello.
option4
option5
hello world
set option6 hello world
option6
hello
For colors, zathura supports HTML color codes and CSS3-style rgb(r,g,b) and rgba(r,g,b,a) values. If you want to use color codes for some options, make sure to quote them accordingly or to escape the hash symbol.
rgb(r,g,b)
rgba(r,g,b,a)
set default-fg "#CCBBCC" set default-fg \#CCBBCC
For rgba, note that it parses the color components as integers between 0 and 255 and the alpha component as float between 0 and 1.
rgba
This commands allows one to include other configuration files. If a relative path is given, the path will be resolved relative to the configuration file that is currently processed.
include another-config
It is possible to map or remap new key bindings to shortcut functions which allows a high level of customization. The :map command can also be used in the zathurarc file to make those changes permanent:
map [mode] <binding> <shortcut function> <argument>
The map command expects several arguments where only the binding as well as the shortcut-function argument is required. Since zathura uses several modes it is possible to map bindings only for a specific mode by passing the mode argument which can take one of the following values:
The brackets around the value are mandatory.
The (possible) second argument defines the used key binding that should be mapped to the shortcut function and is structured like the following. On the one hand it is possible to just assign single letters, numbers or signs to it:
map a shortcut_function optional_argument map b shortcut_function optional_argument map c shortcut_function optional_argument map 1 shortcut_function optional_argument map 2 shortcut_function optional_argument map 3 shortcut_function optional_argument map ! shortcut_function optional_argument map ? shortcut_function optional_argument
It is also possible to use modifiers like the Control or Alt button on the keyboard. It is possible to use the following modifiers:
If any of the modifiers should be used for a binding, it is required to define the binding with the following structure:
binding
map <A-a> shortcut_function map <C-a> shortcut_function
zathura allows it also to assign keys like the space bar or the tab button which also have to be written in between angle brackets. The following special keys are currently available:
Of course it is possible to combine those special keys with a modifier. The usage of those keys should be explained by the following examples:
map <Space> shortcut_function map <C-Space> shortcut_function
It is also possible to map mouse buttons to shortcuts by using the following special keys:
They can also be combined with modifiers:
map <Button1> shortcut_function map <C-Button1> shortcut_function
If a mapping does not match one of the previous definition but is still a valid mapping it will be mapped as a buffer command:
map abc quit map test quit
The following shortcut functions can be mapped:
best-fit
width
forward
backward
next
previous
top
bottom
up
down
half-up
half-down
partial-up
partial-down
expand
collapse
expand-all
collapse-all
toggle
select
rotate-ccw
rotate-cw
page-top
page-bottom
full-up
full-down
full-left
full-right
half-left
half-right
left
right
bidirectional
goto <current_page>
in
out
x
<s-x>
Some shortcut function require or have optional arguments which influence the behaviour of them. Those can be passed as the last argument:
map <C-i> zoom in map <C-o> zoom out
In addition to mapping or remaping custom key bindings it is possible to remove existing ones by using the :unmap command. The command is used in the following way (the explanation of the parameters is described in the map section of this document
unmap [mode] <binding>
This section describes settings concerning the behaviour of zathura.