Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

open-axiom repository from github

24005 views
1
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
;;
4
;; MODULE : openopenaxiom-input.scm
5
;; DESCRIPTION : OpenAxiom input converters
6
;; COPYRIGHT : (C) 1999 Joris van der Hoeven
7
;;
8
;; This software falls under the GNU general public license and comes WITHOUT
9
;; ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for details.
10
;; If you don't have this file, write to the Free Software Foundation, Inc.,
11
;; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
12
;;
13
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14
15
(texmacs-module (openaxiom-input)
16
(:use (texmacs plugin plugin-convert)))
17
18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
19
;; Specific conversion routines
20
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
21
22
(define (openaxiom-input-var-row r)
23
(if (not (null? r))
24
(begin
25
(display ", ")
26
(plugin-input (car r))
27
(openaxiom-input-var-row (cdr r)))))
28
29
(define (openaxiom-input-row r)
30
(display "[")
31
(plugin-input (car r))
32
(openaxiom-input-var-row (cdr r))
33
(display "]"))
34
35
(define (openaxiom-input-var-rows t)
36
(if (not (null? t))
37
(begin
38
(display ", ")
39
(openaxiom-input-row (car t))
40
(openaxiom-input-var-rows (cdr t)))))
41
42
(define (openaxiom-input-rows t)
43
(display "matrix([")
44
(openaxiom-input-row (car t))
45
(openaxiom-input-var-rows (cdr t))
46
(display "])"))
47
48
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
49
;; Initialization
50
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
51
52
(plugin-input-converters openaxiom
53
(rows openaxiom-input-rows))
54
55