Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7592e970
Commit
7592e970
authored
Feb 04, 2005
by
Jay Belanger
Browse files
(math-latex-parse-frac): Don't use arguments.
(math-latex-parse-two-args): New function.
parent
96ff33d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
+20
-9
lisp/calc/calc-lang.el
lisp/calc/calc-lang.el
+20
-9
No files found.
lisp/calc/calc-lang.el
View file @
7592e970
...
...
@@ -469,12 +469,12 @@
(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))
'(( \\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,12 +487,23 @@
(put 'latex 'math-complex-format 'i)
(defun math-latex-parse-frac (f val)
(let (numer denom)
(setq args (math-read-expr-list))
(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
margs
(math-read-factor))
(list (nth 2 f)
(car args) margs
)))
(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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment