From: Jay Belanger Date: Sun, 11 Jan 2009 19:14:59 +0000 (+0000) Subject: (math-compose-tex-sqrt): New function (previously commented out). X-Git-Tag: emacs-pretest-23.0.90~504 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=91ca6606a6cfa3cd5b126cf32375ea9bbf765359;p=emacs.git (math-compose-tex-sqrt): New function (previously commented out). (math-special-function-table): Use `math-compose-tex-sqrt' to compose sqrts in TeX and LaTeX mode. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index edcea7dc113..c337e97aaa6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2009-01-11 Jay Belanger + + * calc/calc-lang.el (math-compose-tex-sqrt): New function. + (math-special-function-table): Use `math-compose-tex-sqrt' to + compose sqrts in TeX and LaTeX mode. + 2009-01-11 Chong Yidong * faces.el (describe-face): Ignore anonymous faces. diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el index 59a11c42b7f..1bf5ff6c484 100644 --- a/lisp/calc/calc-lang.el +++ b/lisp/calc/calc-lang.el @@ -494,6 +494,7 @@ (put 'tex 'math-special-function-table '((calcFunc-sum . (math-compose-tex-sum "\\sum")) (calcFunc-prod . (math-compose-tex-sum "\\prod")) + (calcFunc-sqrt . math-compose-tex-sqrt) (intv . math-compose-tex-intv))) (put 'tex 'math-variable-table @@ -673,11 +674,11 @@ (substring str (1- (match-end 0)))))) str) -;(defun math-tex-print-sqrt (a) -; (list 'horiz -; "\\sqrt{" -; (math-compose-expr (nth 1 a) 0) -; "}")) +(defun math-compose-tex-sqrt (a) + (list 'horiz + "\\sqrt{" + (math-compose-expr (nth 1 a) 0) + "}")) (defun math-compose-tex-intv (a) (list 'horiz @@ -782,6 +783,7 @@ (calcFunc-choose . (math-compose-latex-frac "\\binom")) (calcFunc-sum . (math-compose-tex-sum "\\sum")) (calcFunc-prod . (math-compose-tex-sum "\\prod")) + (calcFunc-sqrt . math-compose-tex-sqrt) (intv . math-compose-tex-intv))) (put 'latex 'math-variable-table