changeset 59829:502b609847e8

(math-function-table, math-oper-table, math-variable-table): Adjust the LaTeX portions.
author Jay Belanger <jay.p.belanger@gmail.com>
date Mon, 31 Jan 2005 21:53:21 +0000
parents 2f3d955df59a
children d46309369c36
files lisp/calc/calc-lang.el
diffstat 1 files changed, 48 insertions(+), 105 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calc-lang.el	Mon Jan 31 21:52:49 2005 +0000
+++ b/lisp/calc/calc-lang.el	Mon Jan 31 21:53:21 2005 +0000
@@ -428,119 +428,62 @@
 (put 'tex 'math-input-filter 'math-tex-input-filter)
 
 (put 'latex 'math-oper-table
-  '( ( "u+"       ident		   -1 1000 )
-     ( "u-"       neg		   -1 1000 )
-     ( "\\hat"    calcFunc-hat     -1  950 )
-     ( "\\check"  calcFunc-check   -1  950 )
-     ( "\\tilde"  calcFunc-tilde   -1  950 )
-     ( "\\acute"  calcFunc-acute   -1  950 )
-     ( "\\grave"  calcFunc-grave   -1  950 )
-     ( "\\dot"    calcFunc-dot     -1  950 )
-     ( "\\ddot"   calcFunc-dotdot  -1  950 )
-     ( "\\breve"  calcFunc-breve   -1  950 )
-     ( "\\bar"    calcFunc-bar     -1  950 )
-     ( "\\vec"    calcFunc-Vec     -1  950 )
-     ( "\\underline" calcFunc-under -1  950 )
-     ( "\\Hat"    calcFunc-Hat     -1  950 )
-     ( "\\Check"  calcFunc-Check   -1  950 )
-     ( "\\Tilde"  calcFunc-Tilde   -1  950 )
-     ( "\\Acute"  calcFunc-Acute   -1  950 )
-     ( "\\Grave"  calcFunc-Grave   -1  950 )
-     ( "\\Dot"    calcFunc-Dot     -1  950 )
-     ( "\\Ddot"   calcFunc-Dotdot  -1  950 )
-     ( "\\Breve"  calcFunc-Breve   -1  950 )
-     ( "\\Bar"    calcFunc-Bar     -1  950 )
-     ( "\\Vec"    calcFunc-VEC     -1  950 )
-     ( "\\dddot"  calcFunc-dddot   -1  950 )
-     ( "\\ddddot" calcFunc-ddddot  -1  950 )
-     ( "u|"       calcFunc-abs	   -1    0 )
-     ( "|"        closing	    0   -1 )
-     ( "\\lfloor" calcFunc-floor   -1    0 )
-     ( "\\rfloor" closing           0   -1 )
-     ( "\\lceil"  calcFunc-ceil    -1    0 )
-     ( "\\rceil"  closing           0   -1 )
-     ( "\\pm"	  sdev		   300 300 )
-     ( "!"        calcFunc-fact	   210  -1 )
-     ( "^"	  ^		   201 200 )
-     ( "_"	  calcFunc-subscr  201 200 )
-     ( "\\times"  *		   191 190 )
-     ( "*"        *		   191 190 )
-     ( "2x"	  *		   191 190 )
-     ( "+"	  +		   180 181 )
-     ( "-"	  -		   180 181 )
-     ( "\\over"	  /		   170 171 )
-     ( "/"	  /		   170 171 )
-     ( "\div"     /                170 171 )
-     ( "\\choose" calcFunc-choose  170 171 )
-     ( "\\mod"	  %		   170 171 )
-     ( "<"	  calcFunc-lt	   160 161 )
-     ( ">"	  calcFunc-gt	   160 161 )
-     ( "\\leq"	  calcFunc-leq	   160 161 )
-     ( "\\le" 	  calcFunc-leq	   160 161 )
-     ( "\\leqq"	  calcFunc-leq	   160 161 )
-     ( "\\leqsland" calcFunc-leq   160 161 )
-     ( "\\geq"	  calcFunc-geq	   160 161 )
-     ( "\\ge"	  calcFunc-geq	   160 161 )
-     ( "\\geqq"	  calcFunc-geq	   160 161 )
-     ( "\\geqslant" calcFunc-geq   160 161 )
-     ( "="	  calcFunc-eq	   160 161 )
-     ( "\\neq"	  calcFunc-neq	   160 161 )
-     ( "\\ne"	  calcFunc-neq	   160 161 )
-     ( "\\lnot"   calcFunc-lnot     -1 121 )
-     ( "\\land"	  calcFunc-land    110 111 )
-     ( "\\lor"	  calcFunc-lor     100 101 )
-     ( "?"	  (math-read-if)    91  90 )
-     ( "!!!"	  calcFunc-pnot	    -1  85 )
-     ( "&&&"	  calcFunc-pand	    80  81 )
-     ( "|||"	  calcFunc-por	    75  76 )
-     ( "\\gets"	  calcFunc-assign   51  50 )
-     ( ":="	  calcFunc-assign   51  50 )
-     ( "::"       calcFunc-condition 45 46 )
-     ( "\\to"	  calcFunc-evalto   40  41 )
-     ( "\\to"	  calcFunc-evalto   40  -1 )
-     ( "=>" 	  calcFunc-evalto   40  41 )
-     ( "=>" 	  calcFunc-evalto   40  -1 )))
+     (append (get 'tex 'math-oper-table)
+             '(( "\\Hat"    calcFunc-Hat     -1  950 )
+               ( "\\Check"  calcFunc-Check   -1  950 )
+               ( "\\Tilde"  calcFunc-Tilde   -1  950 )
+               ( "\\Acute"  calcFunc-Acute   -1  950 )
+               ( "\\Grave"  calcFunc-Grave   -1  950 )
+               ( "\\Dot"    calcFunc-Dot     -1  950 )
+               ( "\\Ddot"   calcFunc-Dotdot  -1  950 )
+               ( "\\Breve"  calcFunc-Breve   -1  950 )
+               ( "\\Bar"    calcFunc-Bar     -1  950 )
+               ( "\\Vec"    calcFunc-VEC     -1  950 )
+               ( "\\dddot"  calcFunc-dddot   -1  950 )
+               ( "\\ddddot" calcFunc-ddddot  -1  950 )
+               ( "\div"     /                170 171 )
+               ( "\\le"     calcFunc-leq     160 161 )
+               ( "\\leqq"   calcFunc-leq     160 161 )
+               ( "\\leqsland" calcFunc-leq   160 161 )
+               ( "\\ge"	    calcFunc-geq     160 161 )
+               ( "\\geqq"   calcFunc-geq     160 161 )
+               ( "\\geqslant" calcFunc-geq   160 161 )
+               ( "="	    calcFunc-eq	     160 161 )
+               ( "\\neq"    calcFunc-neq     160 161 )
+               ( "\\ne"	    calcFunc-neq     160 161 )
+               ( "\\lnot"   calcFunc-lnot     -1 121 )
+               ( "\\land"   calcFunc-land    110 111 )
+               ( "\\lor"    calcFunc-lor     100 101 )
+               ( "?"	    (math-read-if)    91  90 )
+               ( "!!!"	    calcFunc-pnot     -1  85 )
+               ( "&&&"	    calcFunc-pand     80  81 )
+               ( "|||"	    calcFunc-por      75  76 )
+               ( "\\gets"   calcFunc-assign   51  50 )
+               ( ":="	    calcFunc-assign   51  50 )
+               ( "::"       calcFunc-condition 45 46 )
+               ( "\\to"	    calcFunc-evalto   40  41 )
+               ( "\\to"	    calcFunc-evalto   40  -1 )
+               ( "=>" 	    calcFunc-evalto   40  41 )
+               ( "=>" 	    calcFunc-evalto   40  -1 ))))
 
 (put 'latex 'math-function-table
-  '( ( \\arccos	   . calcFunc-arccos )
-     ( \\arcsin	   . calcFunc-arcsin )
-     ( \\arctan	   . calcFunc-arctan )
-     ( \\arg	   . calcFunc-arg )
-     ( \\cos	   . calcFunc-cos )
-     ( \\cosh	   . calcFunc-cosh )
-     ( \\det	   . calcFunc-det )
-     ( \\exp	   . calcFunc-exp )
-     ( \\gcd	   . calcFunc-gcd )
-     ( \\ln	   . calcFunc-ln )
-     ( \\log	   . calcFunc-log10 )
-     ( \\max	   . calcFunc-max )
-     ( \\min	   . calcFunc-min )
-     ( \\tan	   . calcFunc-tan )
-     ( \\sin	   . calcFunc-sin )
-     ( \\sinh	   . calcFunc-sinh )
-     ( \\sqrt	   . calcFunc-sqrt )
-     ( \\tanh	   . calcFunc-tanh )
-     ( \\frac      . (math-latex-parse-frac /))
-     ( \\tfrac      . (math-latex-parse-frac /))
-     ( \\dfrac      . (math-latex-parse-frac /))
-     ( \\binom     . (math-latex-parse-frac calcFunc-choose))
-     ( \\tbinom     . (math-latex-parse-frac calcFunc-choose))
-     ( \\dbinom     . (math-latex-parse-frac calcFunc-choose))
-     ( \\phi	   . calcFunc-totient )
-     ( \\mu	   . calcFunc-moebius )))
+     (append
+      (get 'tex 'math-function-table)
+      '(( \\frac      . (math-latex-parse-frac /))
+        ( \\tfrac     . (math-latex-parse-frac /))
+        ( \\dfrac     . (math-latex-parse-frac /))
+        ( \\binom     . (math-latex-parse-frac calcFunc-choose))
+        ( \\tbinom    . (math-latex-parse-frac calcFunc-choose))
+        ( \\dbinom    . (math-latex-parse-frac calcFunc-choose))
+        ( \\phi	      . calcFunc-totient )
+        ( \\mu	      . calcFunc-moebius ))))
 
 (put 'latex 'math-special-function-table
      '((/               . (math-latex-print-frac "\\frac"))
        (calcFunc-choose . (math-latex-print-frac "\\binom"))))
 
 (put 'latex 'math-variable-table
-  '( ( \\pi	   . var-pi )
-     ( \\infty	   . var-inf )
-     ( \\infty	   . var-uinf )
-     ( \\phi       . var-phi )
-     ( \\gamma     . var-gamma )
-     ( \\sum       . (math-parse-tex-sum calcFunc-sum) )
-     ( \\prod      . (math-parse-tex-sum calcFunc-prod) )))
+     (get 'tex 'math-variable-table))
 
 (put 'latex 'math-complex-format 'i)