;; Function obtained from https://wiki.archlinux.org/index.php/Emacs#SyncTeX_support (defcustom tex-my-viewer "zathura --fork -s -x \"emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"'\"'\"%{input}\"'\"'\")) (goto-line %{line}))'\"" "PDF Viewer for TeX documents. You may want to fork the viewer so that it detects when the same document is launched twice, and persists when Emacs gets closed. Simple command: zathura --fork We can use emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"%{input}\")) (goto-line %{line}))' to reverse-search a pdf using SyncTeX. Note that the quotes and double-quotes matter and must be escaped appropriately." :safe 'stringp)