~ubuntu-branches/ubuntu/hardy/texmacs/hardy

« back to all changes in this revision

Viewing changes to plugins/macaulay2/progs/m2-input.scm

  • Committer: Bazaar Package Importer
  • Author(s): Ralf Treinen
  • Date: 2004-04-19 20:34:00 UTC
  • Revision ID: james.westby@ubuntu.com-20040419203400-g4e34ih0315wcn8v
Tags: upstream-1.0.3-R2
ImportĀ upstreamĀ versionĀ 1.0.3-R2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
3
;;
 
4
;; MODULE      : m2-input.scm
 
5
;; DESCRIPTION : Macaulay 2 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 (m2-input)
 
16
  (:use (texmacs plugin plugin-convert)))
 
17
 
 
18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
19
;; Specific conversion routines
 
20
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
21
 
 
22
(define (macaulay2-input-var-row r)
 
23
  (if (not (null? r))
 
24
      (begin
 
25
        (display ", ")
 
26
        (plugin-input (car r))
 
27
        (macaulay2-input-var-row (cdr r)))))
 
28
 
 
29
(define (macaulay2-input-row r)
 
30
  (display "{")
 
31
  (plugin-input (car r))
 
32
  (macaulay2-input-var-row (cdr r))
 
33
  (display "}"))
 
34
 
 
35
(define (macaulay2-input-var-rows t)
 
36
  (if (not (null? t))
 
37
      (begin
 
38
        (display ", ")
 
39
        (macaulay2-input-row (car t))
 
40
        (macaulay2-input-var-rows (cdr t)))))
 
41
 
 
42
(define (macaulay2-input-rows t)
 
43
  (display "matrix({")
 
44
  (macaulay2-input-row (car t))
 
45
  (macaulay2-input-var-rows (cdr t))
 
46
  (display "})"))
 
47
 
 
48
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
49
;; Initialization
 
50
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
51
 
 
52
(plugin-input-converters macaulay2
 
53
  (rows macaulay2-input-rows))