2 ;; Additional mactex utilities.
3 ;; All functions are based on code by Richard J. Fateman, copyright 1987.
4 ;; Fateman's code was ported to Common Lisp by William Schelter.
6 ;; If you want LaTeX style quotients, first load mactex and second
7 ;; define tex-mquotient as follows
9 (defun tex-mquotient (x l r
)
10 (if (or (null (cddr x
)) (cdddr x
)) (wna-err (caar x
)))
11 (setq l
(tex (cadr x
) (append l
'("\\frac{")) nil
'mparen
'mparen
)
12 r
(tex (caddr x
) (list "}{") (append '("}") r
) 'mparen
'mparen
))
15 ;; (defprop mtimes ("\\,") texsym)
17 ;; The following tells TeX to use whatever it thinks best.
18 ;; (defprop mtimes (" ") texsym)
20 ;; To use amsmath style matrices, define tex-matrix as
21 ;; (to TeX the code, you'll need to \usepackage{amsmath})
23 (defun tex-matrix (x l r
) ;; matrix looks like ((mmatrix)((mlist) a b) ...)
24 (append l
`("\\begin{pmatrix}")
26 (tex-list (cdr y
) nil
(list " \\\\ ") " & "))
28 '("\\end{pmatrix}") r
))