Browse Source

latex and pdf-tools moro-less

ubuntu
parent
commit
5e0f362704
1 changed files with 60 additions and 35 deletions
  1. +60
    -35
      .emacs

+ 60
- 35
.emacs View File

@ -119,28 +119,46 @@
(use-package magit
:ensure t)
;; latex
(use-package auctex
(use-package tex
:defer t
:ensure t)
;; pdlatex:
(setq latex-run-command "pdflatex")
(setenv "PATH" (concat (getenv "PATH") ":/Library/TeX/texbin/"))
(setq exec-path (append exec-path '("/Library/TeX/texbin/")))
:ensure auctex
:config
(setq TeX-auto-save t)
(setq latex-run-command "pdflatex")
(setenv "PATH" (concat (getenv "PATH") ":/Library/TeX/texbin/"))
(setq exec-path (append exec-path '("/Library/TeX/texbin/")))
)
;; Use pdf-tools to open PDF files
(use-package pdf-tools
:ensure nil
:pin melpa
:load-path "site-lisp/pdf-tools/lisp"
:magic ("%PDF" . pdf-view-mode)
:config
(custom-set-variables
'(pdf-tools-handle-upgrades nil)) ; Use brew upgrade pdf-tools instead.
(setq pdf-info-epdfinfo-program "/usr/local/bin/epdfinfo"))
;; Use pdf-tools to open PDF files
(setq TeX-view-program-selection '((output-pdf "PDF Tools"))
TeX-source-correlate-start-server t)
(add-to-list 'auto-mode-alist '("\\.pff\\'" . pdf-view-mode))
;; Update PDF buffers after successful LaTeX runs
(add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer)
(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))
)
;; (use-package pdf-tools
;; :ensure nil
;; :pin melpa
;; :config
;; (custom-set-variables
;; '(pdf-tools-handle-upgrades nil)) ; Use brew upgrade pdf-tools instead.
;; (setq pdf-info-epdfinfo-program "/usr/local/bin/epdfinfo"))
;; ;;-----------------------
;; ;; Use pdf-tools to open PDF files
;; (setq TeX-view-program-selection '((output-pdf "PDF Tools"))
;; TeX-source-correlate-start-server t)
;;(add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode))
;; ;; Update PDF buffers after successful LaTeX runs
;; (add-hook 'TeX-after-compilation-finished-functions
;; #'TeX-revert-document-buffer)
;;----------------------
;; flycheck
(use-package flycheck
:ensure t
@ -170,20 +188,6 @@
(setq org-latex-create-formula-image-program 'imagemagick)
(setq org-startup-indented t) ; Enable `org-indent-mode' by default
(visual-line-mode 1)
;;
;; Finally, we set up a nice proportional font, in different sizes, for the headlines.
(custom-theme-set-faces
'user
'(org-level-8 ((t (,@headline ,@variable-tuple))))
'(org-level-7 ((t (,@headline ,@variable-tuple))))
'(org-level-6 ((t (,@headline ,@variable-tuple))))
'(org-level-5 ((t (,@headline ,@variable-tuple))))
'(org-level-4 ((t (,@headline ,@variable-tuple :height 1.1))))
'(org-level-3 ((t (,@headline ,@variable-tuple :height 1.12))))
'(org-level-2 ((t (,@headline ,@variable-tuple :height 1.15))))
'(org-level-1 ((t (,@headline ,@variable-tuple :height 1.25))))
'(org-document-title ((t (,@headline ,@variable-tuple :height 1.5 :underline nil)))))
;;
))
;; Company-mode
(use-package company
@ -197,7 +201,7 @@
(setq ispell-program-name "/usr/local/bin/aspell")
;; Set default font:
(add-to-list 'default-frame-alist
'(font . "Source Code Pro-18"))
'(font . "Source Code Pro-20"))
;; Activation org-agenda and capture
(global-set-key (kbd "C-c l") 'org-store-link)
(global-set-key (kbd "C-c a") 'org-agenda)
@ -393,11 +397,32 @@
;; 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.
)
'(custom-safe-themes
(quote
("bf387180109d222aee6bb089db48ed38403a1e330c9ec69fe1f52460a8936b66" default)))
'(pdf-tools-handle-upgrades nil)
'(safe-local-variable-values
(quote
((set-fill-column . 5000)
(set-fill-column . 2000)
(TeX-auto-save . t)
(TeX-parse-self . t)
(org-attach-directory . "students/")
(org-attach-use-inheritance . t)
(org-attach-preferred-new-method . ask))))
'(send-mail-function (quote smtpmail-send-it)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; 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.
)
'(org-document-title ((t (\,@headline (\,@ variable-tuple) :height 1.5 :underline nil))))
'(org-level-1 ((t (\,@headline (\,@ variable-tuple) :height 1.25))))
'(org-level-2 ((t (\,@headline (\,@ variable-tuple) :height 1.15))))
'(org-level-3 ((t (\,@headline (\,@ variable-tuple) :height 1.12))))
'(org-level-4 ((t (\,@headline (\,@ variable-tuple) :height 1.1))))
'(org-level-5 ((t (\,@headline (\,@ variable-tuple)))))
'(org-level-6 ((t (\,@headline (\,@ variable-tuple)))))
'(org-level-7 ((t (\,@headline (\,@ variable-tuple)))))
'(org-level-8 ((t (\,@headline (\,@ variable-tuple))))))

Loading…
Cancel
Save