2 Commits de97ec9710 ... cf076c824b

Autore SHA1 Messaggio Data
  Emilia L.K. Blåsten cf076c824b Use org-cdlatex-mode in org-mode 2 mesi fa
  Emilia L.K. Blåsten 5901924019 Add things to make smartparens work better in latex 2 mesi fa
1 ha cambiato i file con 15 aggiunte e 0 eliminazioni
  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