From 32c07d4c6a9faf7e869322aa045517aedf8199e7 Mon Sep 17 00:00:00 2001 From: Gerardo Marx Date: Sun, 7 Nov 2021 09:55:37 -0600 Subject: [PATCH] two monitors PDF in new frame --- .emacs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.emacs b/.emacs index 6a6b67e..e6a2295 100644 --- a/.emacs +++ b/.emacs @@ -78,9 +78,17 @@ (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) (add-hook 'LaTeX-mode-hook 'turn-on-reftex) (setq reftex-plug-into-AUCTeX t) -(setq TeX-view-program-list '(("Evince" "evince --page-index=%(outpage) %o"))) -(setq TeX-view-program-selection '((output-pdf "Evince"))) +(setq TeX-view-program-selection '((output-pdf "PDF Tools")) + TeX-source-correlate-start-server t) ;; Update PDF buffers after successful LaTeX runs +(defun framesMenus-display-buffer-use-some-frame (fun &rest args) + "Use `display-buffer-use-some-frame' as `display-buffer-overriding-action'. +Then run FUN with ARGS." + (let ((display-buffer-overriding-action '(display-buffer-use-some-frame))) + (apply fun args))) +(advice-add 'TeX-pdf-tools-sync-view :around #'framesMenus-display-buffer-use-some-frame) +(advice-add 'pdf-sync-backward-search-mouse :around #'framesMenus-display-buffer-use-some-frame) + (add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer) (add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode)) @@ -142,8 +150,7 @@ ;; 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. - '(package-selected-packages - '(docker-compose-mode markdown-mode org-ref doom-modeline all-the-icons doom-themes which-key helm use-package))) +) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful.