# HG changeset patch # User HIROSE Yuuji # Date 1493861569 -32373 # Node ID 428584533eab852236c9c0a46ef1fb8fd4722caa # Parent 7bf780961390ba6666c207e0739eac908b5949fb Enclosing with amsmath envs strips $...$ diff -r 7bf780961390 -r 428584533eab yatexenv.el --- a/yatexenv.el Mon Mar 06 17:54:31 2017 +0859 +++ b/yatexenv.el Thu May 04 10:32:22 2017 +0859 @@ -1,6 +1,6 @@ ;;; yatexenv.el --- YaTeX environment-specific functions ;;; (c) 1994-2017 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Thu Jan 5 17:45:53 2017 on firestorm +;;; Last modified Thu May 4 10:19:20 2017 on firestorm ;;; $Id$ ;;; Code: @@ -391,6 +391,11 @@ (fset 'YaTeX-enclose-eqnarray 'YaTeX-enclose-equation) (fset 'YaTeX-enclose-eqnarray* 'YaTeX-enclose-equation) +(mapcar (function ;; Add all AMS LaTeX envs + (lambda (sym) + (fset (intern (concat "YaTeX-enclose-" (car sym))) + 'YaTeX-enclose-equation))) + YaTeX-ams-math-begin-alist) (defun YaTeX-enclose-verbatim (beg end)) ;do nothing when enclose verbatim (fset 'YaTeX-enclose-verbatim* 'YaTeX-enclose-verbatim)