(math-compose-expr): Allow multiline matrices in TeX mode.
authorJay Belanger <jay.p.belanger@gmail.com>
Sun, 6 Feb 2005 16:20:46 +0000 (16:20 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Sun, 6 Feb 2005 16:20:46 +0000 (16:20 +0000)
lisp/calc/calccomp.el

index dc46159..26ae8c1 100644 (file)
              (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}"))