763 |
((eq (nth 1 code) 'punc) |
((eq (nth 1 code) 'punc) |
764 |
(setq math-exp-token 'punc |
(setq math-exp-token 'punc |
765 |
math-expr-data (nth 2 code))) |
math-expr-data (nth 2 code))) |
766 |
((and (eq (nth 1 code) 'mat) |
((and (eq (nth 1 code) 'begenv) |
767 |
(string-match " *{" math-exp-str math-exp-pos)) |
(string-match " *{\\([^}]*\\)}" math-exp-str math-exp-pos)) |
768 |
|
(setq math-exp-pos (match-end 0) |
769 |
|
envname (match-string 1 math-exp-str) |
770 |
|
math-exp-token 'punc |
771 |
|
math-expr-data "[") |
772 |
|
(cond ((or (string= envname "matrix") |
773 |
|
(string= envname "bmatrix") |
774 |
|
(string= envname "pmatrix")) |
775 |
|
(if (setq j (string-match (concat "\\\\end{" envname "}") |
776 |
|
math-exp-str math-exp-pos)) |
777 |
|
(setq math-exp-str |
778 |
|
(replace-match "]" t t math-exp-str)) |
779 |
|
(error "%s" (concat "No closing \\end{" envname "}")))))) |
780 |
|
((and (eq (nth 1 code) 'mat) |
781 |
|
(string-match " *{" math-exp-str math-exp-pos)) |
782 |
(setq math-exp-pos (match-end 0) |
(setq math-exp-pos (match-end 0) |
783 |
math-exp-token 'punc |
math-exp-token 'punc |
784 |
math-expr-data "[") |
math-expr-data "[") |