From a2fd61580e4866a78e6730e62dbd2a3e4a5cfe65 Mon Sep 17 00:00:00 2001 From: Frederik Vanrenterghem Date: Mon, 12 Aug 2024 22:57:16 +0800 Subject: [PATCH 1/1] View PDF using pdf-tools. --- emacs/.emacs.d/init.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index ae30d66..d2cc817 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -71,6 +71,7 @@ vc-follow-symlinks t ("\\.py\\'" . python-mode) ("\\.R\\'" . R-mode) ("\\.org\\'" . org-mode) + ("\\.tex\\'" . latex-mode) ("\\.sh\\'" . shell-script-mode) ("\\.hs\\'" . haskell-mode) ("\\.el\\'" . emacs-lisp-mode))) @@ -88,6 +89,14 @@ vc-follow-symlinks t ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. + '(TeX-view-program-selection + '(((output-dvi has-no-display-manager) + "dvi2tty") + ((output-dvi style-pstricks) + "dvips and gv") + (output-dvi "xdvi") + (output-pdf "PDF Tools") + (output-html "xdg-open"))) '(browse-url-browser-function 'browse-url-firefox) '(custom-safe-themes '("0cf95236abcf59e05b1ea69b4edd53d293a5baec4fe4c3484543fee99bfd2204" "80b00f3bf7cdbdca6c80aadfbbb03145f3d0aacf6bf2a559301e61109954e30a" default)) @@ -274,3 +283,5 @@ vc-follow-symlinks t (add-to-list 'zoneinfo-style-world-list '("Australia/Perth" "Perth"))) +;; View PDFs in Emacs +(pdf-loader-install) ; On demand loading, leads to faster startup time -- 2.39.5