# AUCTeX pairing large parenthesis for \left(

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)).

• Have you seen the description for LaTeX-electric-left-right-brace in the manual? Dec 10 '20 at 10:02
• Blimey! Sorry for the bother! I had forgotten about LaTeX-electric-left-right-brace! The funny thing is, I have it in my init, but I had commented it out, can't remember why. Thank you! Dec 11 '20 at 16:00