+2009-01-11 Jay Belanger <jay.p.belanger@gmail.com>
+
+ * 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 <cyd@stupidchicken.com>
* faces.el (describe-face): Ignore anonymous faces.
(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
(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
(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