2 Commits de97ec9710 ... cf076c824b

Auteur SHA1 Bericht Datum
  Emilia L.K. Blåsten cf076c824b Use org-cdlatex-mode in org-mode 2 maanden geleden
  Emilia L.K. Blåsten 5901924019 Add things to make smartparens work better in latex 2 maanden geleden
1 gewijzigde bestanden met toevoegingen van 15 en 0 verwijderingen
  1. 15 0
      emacs

+ 15 - 0
emacs

@@ -155,6 +155,20 @@
   :config
   (sp-local-pair '(lisp-mode emacs-lisp-mode) "'" nil :actions nil)
   (sp-local-pair '(lisp-mode emacs-lisp-mode) "`" nil :actions nil)
+  ;; Add \big( \big), etc. without having to use \bigl( \bigr).
+  (sp-with-modes '(tex-mode plain-tex-mode latex-mode LaTeX-mode)
+    (sp-local-pair "\\big(" "\\big)" :post-handlers '(sp-latex-insert-spaces-inside-pair))
+    (sp-local-pair "\\bigg(" "\\bigg)" :post-handlers '(sp-latex-insert-spaces-inside-pair))
+    (sp-local-pair "\\Big(" "\\Big)" :post-handlers '(sp-latex-insert-spaces-inside-pair))
+    (sp-local-pair "\\Bigg(" "\\Bigg)" :post-handlers '(sp-latex-insert-spaces-inside-pair))
+    (sp-local-pair "\\big[" "\\big]" :post-handlers '(sp-latex-insert-spaces-inside-pair))
+    (sp-local-pair "\\bigg[" "\\bigg]" :post-handlers '(sp-latex-insert-spaces-inside-pair))
+    (sp-local-pair "\\Big[" "\\Big]" :post-handlers '(sp-latex-insert-spaces-inside-pair))
+    (sp-local-pair "\\Bigg[" "\\Bigg]" :post-handlers '(sp-latex-insert-spaces-inside-pair))
+    (sp-local-pair "\\big\\{" "\\big\\}" :post-handlers '(sp-latex-insert-spaces-inside-pair))
+    (sp-local-pair "\\bigg\\{" "\\bigg\\}" :post-handlers '(sp-latex-insert-spaces-inside-pair))
+    (sp-local-pair "\\Big\\{" "\\Big\\}" :post-handlers '(sp-latex-insert-spaces-inside-pair))
+    (sp-local-pair "\\Bigg\\{" "\\Bigg\\}" :post-handlers '(sp-latex-insert-spaces-inside-pair)))
   (eval-after-load 'latex '(require 'smartparens-latex))
   )
 ;; Helm (completion framework)
@@ -300,6 +314,7 @@
   (cdlatex-takeover-parenthesis . nil)
   :hook
   ((latex-mode LaTeX-mode) . cdlatex-mode)
+  (org-mode . org-cdlatex-mode)
   :config
   (add-hook 'cdlatex-tab-hook 'LaTeX-indent-line)
   (setq cdlatex-env-alist