Zathura (document viewer)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Zathura
Screenshot of zathura viewing a PDF file in Arch Linux.
Screenshot of zathura viewing a PDF file in Arch Linux.
Original author(s) Moritz Lipp, Sebastian Ramacher
Developer(s) pwmt[1]
Initial release September 18, 2009 (2009-09-18)
Stable release
0.4.0 / May 20, 2018 (2018-05-20)[2]
Repository Edit this at Wikidata
Written in C
Operating system Unix-like
Type Document viewer
License zlib License[3]
Website pwmt.org/projects/zathura

Zathura is a free, plugin-based document viewer. Plugins are available for PDF (via poppler or MuPDF), PostScript, DjVu, and EPUB. It was written to be lightweight and controlled with vi-like keybindings. Zathura's customizability makes it well-liked by many Linux users.[4]

Zathura has a mature, well-established codebase and a large development team.[5] It has official packages available in Arch Linux,[6] Debian,[7] Fedora,[8] Gentoo,[9] OpenBSD,[10] OpenSUSE,[11] Source Mage GNU/Linux,[12] Ubuntu,[13] and an unofficial macOS package provided by MacPorts.[14]

Zathura was named after the 2005 film Zathura: A Space Adventure.[15]

History[edit]

Development on Zathura began on 12 August 2009.[16] On 18 September 2009, version 0.0.1 was announced to the Arch Linux community.[17]

Zathura has been an official Arch Linux package since April 2010.[18] Same year, by the end of July it was imported into Source Mage test grimoire.[19] It has been an official Debian package since at least 2011, as part of Debian Squeeze.[20]

Features[edit]

Zathura automatically reloads documents. When working in compiled documents such as those written in LaTeX, Zathura will refresh the output whenever compilation takes place. Zathura has the option of enabling inverse search (using "synctex").[21][22]

Zathura can adjust the document to best-fit or to fit width, and it can rotate pages. It can view pages side-by-side and has a fullscreen mode. Pages can also be recolored to have a black background and white foreground.

Zathura can search for text and copy text to the primary X selection. It supports bookmarks and can open encrypted files.

The behavior and appearance of Zathura can be customized using a configuration file. Zathura has the ability to execute external shell commands. It can be opened in tabs using tabbed.[23]

Forward/Inverse Search with Kile[edit]

Modifying the python codes in https://texwiki.texjp.org/[24], with the file name 'zathuraforward.py',

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import re
import subprocess

if __name__ == '__main__':
    m = re.match(r'file:(\S*)#src:(\S*) (\S*)', sys.argv[1])
    if m:
        pdf = m.group(1)
        line = m.group(2)
        tex = m.group(3)
	args = line + ':0:' + tex
    subprocess.call(['zathura', '--synctex-forward', args, pdf])

followed by

$ chmod +x zathuraforward.py
$ sudo cp zathuraforward.py /usr/local/bin

Zathura is ready for the forward search. In Kile -> Setting -> Configure Kile -> Build -> Forward pdf, set the viewer command to be zathuraforward.py with the option '%target', which will pass the line number, tex file name, and pdf file name to Zathura through the python script. To get inverse search done, add following two lines to ~/.config/zathura/zathurarc

set synctex true
set synctex-editor-command "kile --line %{line} %{input}"

See also[edit]

References[edit]

External links[edit]