1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-04 11:40:22 +00:00

(math-compose-expr): Allow multiline matrices in TeX mode.

This commit is contained in:
Jay Belanger 2005-02-06 16:20:46 +00:00
parent 1f9ad95a99
commit 53cf64fd65

View File

@ -266,12 +266,22 @@
(if (or calc-full-vectors (< (length a) 7))
(if (and (eq calc-language 'tex)
(math-matrixp a))
(append '(horiz "\\matrix{ ")
(math-compose-tex-matrix (cdr a))
'(" }"))
(if (and (integerp calc-language-option)
(or (= calc-language-option 0)
(> calc-language-option 1)
(< calc-language-option -1)))
(append '(vleft 0 "\\matrix{")
(math-compose-tex-matrix (cdr a))
'("}"))
(append '(horiz "\\matrix{ ")
(math-compose-tex-matrix (cdr a))
'(" }")))
(if (and (eq calc-language 'latex)
(math-matrixp a))
(if (memq calc-language-option '(-2 0 2))
(if (and (integerp calc-language-option)
(or (= calc-language-option 0)
(> calc-language-option 1)
(< calc-language-option -1)))
(append '(vleft 0 "\\begin{pmatrix}")
(math-compose-tex-matrix (cdr a))
'("\\end{pmatrix}"))