From 992f077bd8d0a1837e57d86ea88ec5284690a385 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 13 Sep 2015 20:34:21 -0400 Subject: [PATCH] switch to different setup for LaTeX Uses AUCTex and Atril instead of LaTeX-preview-pane, as this is much more flexible --- .emacs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.emacs b/.emacs index 667180e..091bfb8 100644 --- a/.emacs +++ b/.emacs @@ -1,3 +1,5 @@ +(setq gc-cons-threshold 100000000) + ;; indentation (setq c-default-style "linux" c-basic-offset 4 @@ -133,6 +135,15 @@ (use-package todotxt-mode :config (setq todotxt-default-file (expand-file-name "~/Sync/todo/todo.txt"))) -(use-package latex-preview-pane +(use-package tex-site :config - (latex-preview-pane-enable)) + (setq TeX-view-program-list '(("Atril" "/usr/bin/atril %o")) + TeX-view-program-selection '((output-pdf "Atril"))) + (defun my-tex () + "Saves the current buffer and runs LaTeX, all with no prompts or further interaction." + (interactive) + (save-buffer) + (TeX-command "LaTeX" 'TeX-master-file -1)) + (add-hook 'LaTeX-mode-hook + (lambda () (local-set-key (kbd "C-z") 'my-tex) + (local-set-key (kbd "C-c e") 'tex-close-latex-block))))