1 2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3;; 4;; MODULE : math-markup.scm 5;; DESCRIPTION : extra mathematical markup 6;; COPYRIGHT : (C) 2010 Joris van der Hoeven 7;; 8;; This software falls under the GNU general public license version 3 or later. 9;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE 10;; in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>. 11;; 12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 13 14(texmacs-module (math math-markup)) 15 16(tm-define (math-check t) 17 (:secure #t) 18 (if (packrat-correct? "std-math" "Main" t) t 19 `(math-error ,t))) 20 21(tm-define (math-check-table t) 22 (:secure #t) 23 ;;(display* "t= " t "\n") 24 (cond ((tree-is? t 'tformat) 25 (with l (tree-children t) 26 `(tformat ,@(cDr l) ,(math-check-table (cAr l))))) 27 ((tree-in? t '(document table row cell)) 28 `(,(tree-label t) ,@(map math-check-table (tree-children t)))) 29 ((== t (tree "")) t) 30 ((packrat-correct? "std-math" "Cell" t) t) 31 (else `(math-error ,t)))) 32