Use zathura as the Pdf viewer for latex

This commit is contained in:
Thomas Dehaeze 2020-11-25 12:20:45 +01:00
parent bdf11fc7b5
commit ea1e720ba6

View File

@ -2656,37 +2656,10 @@ Provides nice functions such as:
- https://tex.stackexchange.com/questions/52179/what-is-your-favorite-emacs-and-or-auctex-command-trick - https://tex.stackexchange.com/questions/52179/what-is-your-favorite-emacs-and-or-auctex-command-trick
- https://tex.stackexchange.com/questions/20843/useful-shortcuts-or-key-bindings-or-predefined-commands-for-emacsauctex - https://tex.stackexchange.com/questions/20843/useful-shortcuts-or-key-bindings-or-predefined-commands-for-emacsauctex
** Master file ** Basic Config
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq-default TeX-master nil) (after! auctex
#+end_src (setq +latex-viewers '(zathura pdf-tools)))
** Clean Output Files
#+begin_src emacs-lisp
(defun tdh-latex-clean ()
"Clean LaTeX output using latexmk"
(interactive)
(async-shell-command
;; command and parameters
"latexmk -c "
(shell-quote-argument buffer-file-name)
" &"
))
(map! :map LaTeX-mode-map
:n ",C" 'tdh-latex-clean)
(add-hook 'TeX-mode-hook #'TeX-fold-mode)
#+end_src
** PDF Viewer
#+begin_src emacs-lisp
(setq TeX-view-program-selection '((output-pdf "Zathura")))
(setq TeX-source-correlate-mode t)
(setq TeX-source-correlate-start-server t)
(setq TeX-source-correlate-method 'synctex)
(setq TeX-view-program-list
'(("PDF Tools" TeX-pdf-tools-sync-view)))
#+end_src #+end_src
** Bibtex ** Bibtex