3 Commitit ead2cfc961 ... 2b1ad33501

Tekijä SHA1 Viesti Päivämäärä
  Emilia L.K. Blåsten 2b1ad33501 Add wt<tab> for \widetilde{} in cdlatex 5 kuukautta sitten
  Emilia L.K. Blåsten bbcf6f988f Use Latin Modern font when using xenops 5 kuukautta sitten
  Emilia L.K. Blåsten 17e9cdf442 Don't use company-mode for latex. Use cdlatex. 5 kuukautta sitten
1 muutettua tiedostoa jossa 26 lisäystä ja 2 poistoa
  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