# HG changeset patch # User Jay Belanger # Date 1231701195 0 # Node ID 25d50d869d3409a91e7556c13fda26dd5fd18c80 # Parent 311f898c790b67634ec84f436f7270b1b213adaf (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 -r 311f898c790b -r 25d50d869d34 lisp/calc/calc-lang.el --- 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