I'd like to automatically close \left(
with \right)
in LaTeX via AUCTeX in Emacs 27. The following should work:
(add-hook 'LaTeX-mode-hook
(lambda () (set (make-local-variable 'TeX-electric-math)
(cons "\\left(" "\\right)"))))
But it doesn't. Any clues as to why it doesn't and how I could make it work?
PS: the solution here
adds an extra parenthesis, so in the end you have \left(\right))
.