On Sun, 21 May 2023 at 14:34, Hongyi Zhao <hongyi.z...@gmail.com> wrote: > But I still cannot observe the desired behavior, as shown in the > attached screenshot.
Are you sure that `$' is bound to `TeX-insert-dollar'? In a LaTeX buffer, what does `C-h k $' give you? I get --8<---------------cut here---------------start------------->8--- $ runs the command TeX-insert-dollar (found in LaTeX-mode-map), which is an interactive native-compiled Lisp function in ‘tex.el’. It is bound to $. (TeX-insert-dollar &optional ARG) Insert dollar sign. If current math mode was not entered with a dollar, refuse to insert one when ‘TeX-refuse-unmatched-dollar’ is non-nil. Show matching dollar sign if this dollar sign ends the TeX math mode and ‘blink-matching-paren’ is non-nil. When outside math mode, the behavior is controlled by the variable ‘TeX-electric-math’. With raw C-u prefix, insert exactly one dollar sign. With optional ARG, insert that many dollar signs. --8<---------------cut here---------------end--------------->8--- Bye, Mosè