From: Jay Belanger Date: Tue, 28 Feb 2006 14:28:42 +0000 (+0000) Subject: (math-compose-tex-matrix): Add a latex option. X-Git-Tag: emacs-pretest-22.0.90~3850 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=29ecdb2212662dd0c73f9338aea8ea8dd0de2df3;p=emacs.git (math-compose-tex-matrix): Add a latex option. (math-compose-expr): Use latex option when calling math-compose-tex-matrix for latex mode. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3344bca5ba3..656a17a3c96 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-02-28 Jay Belanger + + * calc/calccomp.el: (math-compose-tex-matrix): Add a latex option. + (math-compose-expr): Use latex option when calling + `math-compose-tex-matrix' for latex mode. + 2006-02-28 Nick Roberts * speedbar.el: Re-instate comments about developing for speedbar diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el index 548fe83882d..9b5eab5b133 100644 --- a/lisp/calc/calccomp.el +++ b/lisp/calc/calccomp.el @@ -286,10 +286,10 @@ (> calc-language-option 1) (< calc-language-option -1))) (append '(vleft 0 "\\begin{pmatrix}") - (math-compose-tex-matrix (cdr a)) + (math-compose-tex-matrix (cdr a) t) '("\\end{pmatrix}")) (append '(horiz "\\begin{pmatrix} ") - (math-compose-tex-matrix (cdr a)) + (math-compose-tex-matrix (cdr a) t) '(" \\end{pmatrix}"))) (if (and (eq calc-language 'eqn) (math-matrixp a)) @@ -1015,10 +1015,11 @@ (math-compose-expr (car a) math-comp-vector-prec) (concat " " math-comp-right-bracket))))) -(defun math-compose-tex-matrix (a) +(defun math-compose-tex-matrix (a &optional ltx) (if (cdr a) - (cons (append (math-compose-vector (cdr (car a)) " & " 0) '(" \\\\ ")) - (math-compose-tex-matrix (cdr a))) + (cons (append (math-compose-vector (cdr (car a)) " & " 0) + (if ltx '(" \\\\ ") '(" \\cr "))) + (math-compose-tex-matrix (cdr a) ltx)) (list (math-compose-vector (cdr (car a)) " & " 0)))) (defun math-compose-eqn-matrix (a)