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))))