diff --git a/.emacs b/.emacs index a903dba..7f8dd89 100644 --- a/.emacs +++ b/.emacs @@ -124,30 +124,27 @@ :ensure auctex :init (progn - (setq-default TeX-master nil) ; Query for master file. - (setq TeX-auto-save t) ; Enable parse on save. - (setq latex-run-command "pdflatex") - (setq TeX-parse-self t) ; Enable parse on load. - (setenv "PATH" (concat (getenv "PATH") ":/Library/TeX/texbin/")) - (setq exec-path (append exec-path '("/Library/TeX/texbin/"))) - ) - ;;:config - ;; + (setq-default TeX-master nil) ; Query for master file. + (setq TeX-auto-save t) ; Enable parse on save. + (setq TeX-save-query nil) + (setq TeX-command-force "LaTex") + (setq latex-run-command "pdflatex") + (setq TeX-parse-self t) ; Enable parse on load. + (setenv "PATH" (concat (getenv "PATH") ":/Library/TeX/texbin/")) + (setq exec-path (append exec-path '("/Library/TeX/texbin/"))) + ;; pdf-tools configuration + (setq TeX-PDF-mode t) + (add-hook 'TeX-after-compilation-finished-functions + #'TeX-revert-document-buffer) + (setq TeX-view-program-selection '((output-pdf "PDF Tools")) + TeX-source-correlate-start-server t) + (setq pdf-info-epdfinfo-program "/usr/local/bin/epdfinfo") + (add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode)) + (add-hook 'pdf-view-mode-hook + (lambda () (pdf-tools-enable-minor-modes))) + ) ) -;; Use pdf-tools to open PDF files -;; (use-package pdf-tools -;; :load-path "site-lisp/pdf-tools/lisp" -;; :magic ("%PDF" . pdf-view-mode) -;; :config -;; (pdf-tools-install :no-query) -;; :init -;; (add-hook 'TeX-after-compilation-finished-functions -;; #'TeX-revert-document-buffer) -;; (setq pdf-info-epdfinfo-program "/usr/local/bin/epdfinfo") -;; (setq TeX-view-program-selection '((output-pdf "PDF Tools"))) -;; ;; (add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode)) -;; ) - +;; pdf-tools (use-package pdf-tools :ensure t :pin melpa @@ -155,14 +152,6 @@ :config (custom-set-variables '(pdf-tools-handle-upgrades nil)) - :init - (setq pdf-view-midnight-colors '("#ff9900" . "#0a0a12" )) ; set the amber profile as default (see below) - (add-hook 'TeX-after-compilation-finished-functions - #'TeX-revert-document-buffer) - (setq TeX-view-program-selection '((output-pdf "PDF Tools")) - TeX-source-correlate-start-server t) - (setq pdf-info-epdfinfo-program "/usr/local/bin/epdfinfo") - (add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode)) ) ;;-------- ;; latex-preview