(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.
This commit is contained in:
Jay Belanger 2009-01-11 19:14:59 +00:00
parent 0d3b1f4e84
commit 91ca6606a6
2 changed files with 13 additions and 5 deletions

View file

@ -1,3 +1,9 @@
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.

View file

@ -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