diff options
author | JSDurand <mmemmew@gmail.com> | 2022-05-02 13:49:51 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2022-05-02 13:49:51 +0800 |
commit | a4fc45b47fbe2c1d62a28b38d6f0c253d8df56c1 (patch) | |
tree | 306c764688cfb57976c2f45789c1ff608e7a7f83 | |
parent | 519475be66895e542fed4211ce6234e95eb92b63 (diff) |
tex-conf: add parenthesis insertion
-rw-r--r-- | tex-conf.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tex-conf.el b/tex-conf.el index 64fb0af..7d42aa2 100644 --- a/tex-conf.el +++ b/tex-conf.el @@ -256,6 +256,7 @@ where the macro part is without the backslash.") (cons "+" "oplus") (cons "o" "circ") (list "{" "{" "}") + (list "(" "(" ")") (list "b" "lvert" "rvert"))) ;;;###autoload @@ -272,6 +273,13 @@ The list is in the variable `durand-o-things-list'" ((not (consp associated)) ;; length = 1 (insert (format "\\%s" (assoc-default thing durand-o-things-list #'string=)))) + ((and (null (cddr associated)) + (string= (car associated) "(")) + ;; special treatment for the parenthesis + (insert (format "\\left%s" (car associated))) + (save-excursion + (insert + (format "\\right%s" (cadr associated))))) ((null (cddr associated)) ;; length = 2 (insert (format "\\left\\%s" (car associated))) |