summaryrefslogtreecommitdiff
path: root/lisp/calc
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2009-01-11 19:14:59 +0000
committerJay Belanger <jay.p.belanger@gmail.com>2009-01-11 19:14:59 +0000
commit91ca6606a6cfa3cd5b126cf32375ea9bbf765359 (patch)
tree971dc86cb84cf43a40bc2e1eb7adc2369f7ab45f /lisp/calc
parent0d3b1f4e84c70c73e7af29db128039948ab46cf3 (diff)
downloademacs-91ca6606a6cfa3cd5b126cf32375ea9bbf765359.tar.gz
(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.
Diffstat (limited to 'lisp/calc')
-rw-r--r--lisp/calc/calc-lang.el12
1 files changed, 7 insertions, 5 deletions
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