[BACK]Return to init-openxm.scm CVS log [TXT][DIR] Up to [local] / OpenXM / src / kxx

Annotation of OpenXM/src/kxx/init-openxm.scm, Revision 1.11

1.11    ! ohara       1: ; $OpenXM: OpenXM/src/kxx/init-openxm.scm,v 1.10 2004/03/17 13:28:38 ohara Exp $
1.3       ohara       2:
1.7       ohara       3: (define (openxm-eval t)
1.3       ohara       4:   (import-from (texmacs plugin plugin-cmd))
                      5:   (import-from (texmacs plugin plugin-convert))
                      6:   (plugin-eval "openxm" "default" (object->tree t)))
                      7:
1.7       ohara       8: (define (openxm-eval-paste t)
                      9:   (insert-tree (object->tree (openxm-eval t))))
1.5       ohara      10:
                     11: (define (openxm-path t)
                     12:   (if (string? t)
                     13:     (let* ((openxm-home (or (getenv "OpenXM_HOME") "/usr/local/OpenXM"))
1.7       ohara      14:            (local-path (string-append openxm-home "/" t))
                     15:            (web-prefix "http://www.math.kobe-u.ac.jp/OpenXM/Current/")
                     16:            (web-path   (string-append web-prefix t)))
1.5       ohara      17:       (if (url-exists? local-path) local-path web-path))))
1.2       ohara      18:
1.8       ohara      19: (define w3m-cmd
                     20:   (cond
                     21:    ((url-exists-in-path? "w3m")
1.9       ohara      22:     (cond ((url-exists-in-path? "rxvt")  "rxvt  -g 100x50 -e w3m")
1.11    ! ohara      23:           ((url-exists-in-path? "kterm") "kterm -g 100x50 -e w3m")
1.9       ohara      24:           ((url-exists-in-path? "xterm") "xterm -g 100x50 -e w3m")
                     25:           (else #f)))
1.8       ohara      26:    ((url-exists-in-path? "mozilla" ) "mozilla" )
                     27:    ((url-exists-in-path? "netscape") "netscape")
                     28:    ((url-exists-in-path? "iexplore") "iexplore")
                     29:    (else #f)))
                     30:
1.2       ohara      31: (define (w3m t)
1.8       ohara      32:   (if (and (string? t) w3m-cmd)
                     33:     (system (string-append w3m-cmd " " t " &"))))
1.2       ohara      34:
1.5       ohara      35: (define (w3m-search t)
                     36:   (w3m (openxm-path t)))
1.1       ohara      37:
                     38: (define (openxm-initialize)
                     39:   (menu-extend texmacs-session-help-icons
1.5       ohara      40:     (if (in-openxm?)
1.1       ohara      41:     |
                     42:     ((balloon (icon "tm_help.xpm") "Risa/Asir manual")
1.5       ohara      43:      (w3m-search "doc/asir2000/html-jp/man_toc.html"))))
1.1       ohara      44:   (menu-extend texmacs-extra-menu
                     45:     (if (in-openxm?)
                     46:       (=> "OpenXM"
1.3       ohara      47:         (-> "Select engines"
                     48:           ("Risa/Asir" (insert-string "!asir;"))
                     49:           ("Kan/sm1"   (insert-string "!sm1;")))
1.7       ohara      50:         (-> "Select display style"
                     51:           ("LaTeX"     (openxm-eval "!latex;"))
                     52:           ("verbatim"  (openxm-eval "!verbatim;")))
                     53:         (-> "Load Modules (Asir)"
1.11    ! ohara      54:           ("ccurve"    (openxm-eval "load(\"ccurve.rr\");"))
1.7       ohara      55:           ("dsolv"     (openxm-eval "load(\"dsolv\");"))
1.11    ! ohara      56:           ("ratint"    (openxm-eval "load(\"ratint\");"))
        !            57:           ("solv"      (openxm-eval "load(\"solv\");"))
        !            58:           ("sp"        (openxm-eval "load(\"sp\");"))
        !            59:           ("sturm"     (openxm-eval "load(\"sturm\");"))
        !            60:           ("sym"       (openxm-eval "load(\"sym\");"))
        !            61:           ("weight"    (openxm-eval "load(\"weight\");"))
1.7       ohara      62:           ("yang"      (openxm-eval "load(\"yang.rr\");"))
                     63:           )
                     64:         (-> "Display Configuration (Asir)"
                     65:           ("Load default"   (openxm-eval "noro_print_env(0);"))
                     66:           ("Weyl algebra"   (openxm-eval "noro_print_env(\"weyl\");"))
                     67:           ("Euler OPs"      (openxm-eval "noro_print_env(\"yang\");"))
                     68:           )
1.3       ohara      69:         ---
                     70:         (-> "Manuals"
1.5       ohara      71:           ("Risa/Asir manual"
                     72:            (w3m-search "doc/asir2000/html-jp/man_toc.html"))
                     73:           ("Asir-contrib manual"
                     74:            (w3m-search "doc/asir-contrib/html-ja/cman-ja_toc.html")))
1.3       ohara      75:         (-> "Web"
1.10      ohara      76:           ("The OpenXM Project"  (w3m "http://www.math.kobe-u.ac.jp/OpenXM/"))
                     77:           ("Risa/Asir web page"  (w3m "http://www.math.kobe-u.ac.jp/Asir/index-ja.html")))
1.3       ohara      78:         )))
1.1       ohara      79: )
                     80:
                     81: (plugin-configure openxm
1.6       ohara      82:   (:require (url-exists-in-path? "openxm"))
1.1       ohara      83:   (:initialize (openxm-initialize))
1.4       ohara      84:   (:launch "exec openxm ox_texmacs")
1.5       ohara      85:   (:session "OpenXM[asir,sm1]"))

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>