changeset 101129:25d50d869d34

(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.
author Jay Belanger <jay.p.belanger@gmail.com>
date Sun, 11 Jan 2009 19:13:15 +0000
parents 311f898c790b
children 4660765d77ad
files lisp/calc/calc-lang.el
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calc-lang.el	Sun Jan 11 17:27:37 2009 +0000
+++ b/lisp/calc/calc-lang.el	Sun Jan 11 19:13:15 2009 +0000
@@ -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