aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2005-02-06 16:20:46 +0000
committerJay Belanger2005-02-06 16:20:46 +0000
commit53cf64fd65d06e21b6510a39ceb3c2f2c853d1a7 (patch)
tree882ca74f4491a1796f384f3d1b9435f1e77c154f
parent1f9ad95a99be9c985bc78f2ccb56148c2592ccde (diff)
downloademacs-53cf64fd65d06e21b6510a39ceb3c2f2c853d1a7.tar.gz
emacs-53cf64fd65d06e21b6510a39ceb3c2f2c853d1a7.zip
(math-compose-expr): Allow multiline matrices in TeX mode.
-rw-r--r--lisp/calc/calccomp.el18
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 @@
266 (if (or calc-full-vectors (< (length a) 7)) 266 (if (or calc-full-vectors (< (length a) 7))
267 (if (and (eq calc-language 'tex) 267 (if (and (eq calc-language 'tex)
268 (math-matrixp a)) 268 (math-matrixp a))
269 (append '(horiz "\\matrix{ ") 269 (if (and (integerp calc-language-option)
270 (math-compose-tex-matrix (cdr a)) 270 (or (= calc-language-option 0)
271 '(" }")) 271 (> calc-language-option 1)
272 (< calc-language-option -1)))
273 (append '(vleft 0 "\\matrix{")
274 (math-compose-tex-matrix (cdr a))
275 '("}"))
276 (append '(horiz "\\matrix{ ")
277 (math-compose-tex-matrix (cdr a))
278 '(" }")))
272 (if (and (eq calc-language 'latex) 279 (if (and (eq calc-language 'latex)
273 (math-matrixp a)) 280 (math-matrixp a))
274 (if (memq calc-language-option '(-2 0 2)) 281 (if (and (integerp calc-language-option)
282 (or (= calc-language-option 0)
283 (> calc-language-option 1)
284 (< calc-language-option -1)))
275 (append '(vleft 0 "\\begin{pmatrix}") 285 (append '(vleft 0 "\\begin{pmatrix}")
276 (math-compose-tex-matrix (cdr a)) 286 (math-compose-tex-matrix (cdr a))
277 '("\\end{pmatrix}")) 287 '("\\end{pmatrix}"))