changeset 59965:ca9f30397adc

(math-compose-expr): Allow multiline matrices in TeX mode.
author Jay Belanger <jay.p.belanger@gmail.com>
date Sun, 06 Feb 2005 16:20:46 +0000
parents b45f0570ca5c
children 9eb004b49fc9
files lisp/calc/calccomp.el
diffstat 1 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calccomp.el	Sun Feb 06 15:59:39 2005 +0000
+++ b/lisp/calc/calccomp.el	Sun Feb 06 16:20:46 2005 +0000
@@ -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}"))