changeset 59809:5f760ce654b7

(math-read-token): Add support for LaTeX.
author Jay Belanger <jay.p.belanger@gmail.com>
date Mon, 31 Jan 2005 06:21:31 +0000
parents 37a65df00ab2
children 3192518bb184
files lisp/calc/calc-aent.el
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calc-aent.el	Mon Jan 31 02:22:24 2005 +0000
+++ b/lisp/calc/calc-aent.el	Mon Jan 31 06:21:31 2005 +0000
@@ -690,7 +690,7 @@
                           math-exp-pos)
 		      (or (eq math-exp-pos 0)
 			  (and (memq calc-language '(nil flat big unform
-							 tex eqn))
+							 tex latex eqn))
 			       (eq (string-match "[^])}\"a-zA-Z0-9'$]_"
 						 math-exp-str (1- math-exp-pos))
 				   (1- math-exp-pos))))))
@@ -746,7 +746,7 @@
 	       (setq math-exp-token 'string
 		     math-expr-data (math-match-substring math-exp-str 1)
 		     math-exp-pos (match-end 0))))
-	    ((and (= ch ?\\) (eq calc-language 'tex)
+	    ((and (= ch ?\\) (memq calc-language '(tex latex))
 		  (< math-exp-pos (1- (length math-exp-str))))
 	     (or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}" 
                                math-exp-str math-exp-pos)
@@ -800,11 +800,11 @@
 	     (setq math-exp-pos (match-end 0))
 	     (math-read-token))
 	    (t
-	     (if (and (eq ch ?\{) (memq calc-language '(tex eqn)))
+	     (if (and (eq ch ?\{) (memq calc-language '(tex latex eqn)))
 		 (setq ch ?\())
-	     (if (and (eq ch ?\}) (memq calc-language '(tex eqn)))
+	     (if (and (eq ch ?\}) (memq calc-language '(tex latex eqn)))
 		 (setq ch ?\)))
-	     (if (and (eq ch ?\&) (eq calc-language 'tex))
+	     (if (and (eq ch ?\&) (memq calc-language '(tex latex)))
 		 (setq ch ?\,))
 	     (setq math-exp-token 'punc
 		   math-expr-data (char-to-string ch)