emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calc/calc-lang.el


From: Jay Belanger
Subject: [Emacs-diffs] Changes to emacs/lisp/calc/calc-lang.el
Date: Fri, 04 Feb 2005 01:20:52 -0500

Index: emacs/lisp/calc/calc-lang.el
diff -c emacs/lisp/calc/calc-lang.el:1.14 emacs/lisp/calc/calc-lang.el:1.15
*** emacs/lisp/calc/calc-lang.el:1.14   Mon Jan 31 21:53:21 2005
--- emacs/lisp/calc/calc-lang.el        Fri Feb  4 06:20:52 2005
***************
*** 469,480 ****
  (put 'latex 'math-function-table
       (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 ))))
  
--- 469,480 ----
  (put 'latex 'math-function-table
       (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-two-args calcFunc-choose))
!         ( \\tbinom    . (math-latex-parse-two-args calcFunc-choose))
!         ( \\dbinom    . (math-latex-parse-two-args calcFunc-choose))
          ( \\phi             . calcFunc-totient )
          ( \\mu              . calcFunc-moebius ))))
  
***************
*** 487,498 ****
  
  (put 'latex 'math-complex-format 'i)
  
  (defun math-latex-parse-frac (f val)
    (let (numer denom)
!     (setq args (math-read-expr-list))
      (math-read-token)
!     (setq margs (math-read-factor))
!     (list (nth 2 f) (car args) margs)))
  
  (defun math-latex-print-frac (a fn)
    (list 'horiz (nth 1 fn) "{" (math-compose-expr (nth 1 a) -1)
--- 487,509 ----
  
  (put 'latex 'math-complex-format 'i)
  
+ 
  (defun math-latex-parse-frac (f val)
    (let (numer denom)
!     (setq numer (car (math-read-expr-list)))
!     (math-read-token)
!     (setq denom (math-read-factor))
!     (if (and (Math-num-integerp numer)
!              (Math-num-integerp denom))
!         (list 'frac numer denom)
!       (list '/ numer denom))))
! 
! (defun math-latex-parse-two-args (f val)
!   (let (first second)
!     (setq first (car (math-read-expr-list)))
      (math-read-token)
!     (setq second (math-read-factor))
!     (list (nth 2 f) first second)))
  
  (defun math-latex-print-frac (a fn)
    (list 'horiz (nth 1 fn) "{" (math-compose-expr (nth 1 a) -1)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]