3 Коммиты ead2cfc961 ... 2b1ad33501

Автор SHA1 Сообщение Дата
  Emilia L.K. Blåsten 2b1ad33501 Add wt<tab> for \widetilde{} in cdlatex 6 месяцев назад
  Emilia L.K. Blåsten bbcf6f988f Use Latin Modern font when using xenops 6 месяцев назад
  Emilia L.K. Blåsten 17e9cdf442 Don't use company-mode for latex. Use cdlatex. 6 месяцев назад
1 измененных файлов с 26 добавлено и 2 удалено
  1. 26 2
      emacs

+ 26 - 2
emacs

@@ -212,7 +212,7 @@
 (use-package company ; Company (complete anything) mode
   :ensure t
   :hook
-  ((latex-mode LaTeX-mode emacs-lisp-mode) . company-mode)
+  (emacs-lisp-mode . company-mode)
   ((latex-mode LaTeX-mode) . (lambda ()
                                (set (make-local-variable 'company-backends)
                                     '((company-dabbrev)))))
@@ -287,7 +287,31 @@
 (use-package xenops
   :ensure t
   :hook
-  (org-mode . xenops-mode))
+  (org-mode . xenops-mode)
+  :config
+  (defun my-buffer-face-mode-lm ()
+    "Set font to Latin Modern Roman size 12 in the current buffer"
+    (interactive)
+    (setq buffer-face-mode-face '(:family "LM Roman 10" :foundry "outline" :slant normal :weight regular :height 120 :width normal))
+    (buffer-face-mode))
+  (add-hook 'xenops-mode-hook 'my-buffer-face-mode-lm)
+  )
+(use-package cdlatex
+  :ensure t
+  :hook
+  ((latex-mode LaTeX-mode) . cdlatex-mode)
+  :config
+  (add-hook 'cdlatex-tab-hook 'LaTeX-indent-line)
+  (setq cdlatex-env-alist
+        '(("definition" "\\begin{definition} AUTOLABEL\n?\n\\end{definition}\n" nil)
+          ("theorem" "\\begin{theorem} AUTOLABEL\n?\n\\end{theorem}\n" nil)
+          ("lemma" "\\begin{lemma} AUTOLABEL\n?\n\\end{lemma}\n" nil)))
+  (setq cdlatex-command-alist
+        '(("def" "Insert definition env"   "" cdlatex-environment ("definition") t nil)
+          ("thm" "Insert theorem env"   "" cdlatex-environment ("theorem") t nil)
+          ("lem" "Insert lemma env"   "" cdlatex-environment ("lemma") t nil)
+          ("wt" "Insert \\widetilde{}" "\\widetilde{?}" cdlatex-position-cursor nil nil t))))
+
 (use-package reftex
   :ensure t
   :hook