diff options
author | Jay Belanger <jay.p.belanger@gmail.com> | 2005-02-06 16:20:46 +0000 |
---|---|---|
committer | Jay Belanger <jay.p.belanger@gmail.com> | 2005-02-06 16:20:46 +0000 |
commit | 53cf64fd65d06e21b6510a39ceb3c2f2c853d1a7 (patch) | |
tree | 882ca74f4491a1796f384f3d1b9435f1e77c154f /lisp/calc/calccomp.el | |
parent | 1f9ad95a99be9c985bc78f2ccb56148c2592ccde (diff) | |
download | emacs-53cf64fd65d06e21b6510a39ceb3c2f2c853d1a7.tar.gz emacs-53cf64fd65d06e21b6510a39ceb3c2f2c853d1a7.tar.bz2 emacs-53cf64fd65d06e21b6510a39ceb3c2f2c853d1a7.zip |
(math-compose-expr): Allow multiline matrices in TeX mode.
Diffstat (limited to 'lisp/calc/calccomp.el')
-rw-r--r-- | lisp/calc/calccomp.el | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el index dc46159b09b..26ae8c1975c 100644 --- a/lisp/calc/calccomp.el +++ b/lisp/calc/calccomp.el @@ -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}")) |