[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.7

1.7     ! ohara       1: ; $OpenXM: OpenXM/src/kxx/init-openxm.scm,v 1.6 2004/03/12 02:22:27 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:
                     19: (define (w3m t)
                     20:   (if (string? t)
1.3       ohara      21:     (system (string-append "rxvt -g 100x50 -e w3m " t "&"))))
1.2       ohara      22:
1.5       ohara      23: (define (w3m-search t)
                     24:   (w3m (openxm-path t)))
1.1       ohara      25:
                     26: (define (openxm-initialize)
                     27:   (menu-extend texmacs-session-help-icons
1.5       ohara      28:     (if (in-openxm?)
1.1       ohara      29:     |
                     30:     ((balloon (icon "tm_help.xpm") "Risa/Asir manual")
1.5       ohara      31:      (w3m-search "doc/asir2000/html-jp/man_toc.html"))))
1.1       ohara      32:   (menu-extend texmacs-extra-menu
                     33:     (if (in-openxm?)
                     34:       (=> "OpenXM"
1.3       ohara      35:         (-> "Select engines"
                     36:           ("Risa/Asir" (insert-string "!asir;"))
                     37:           ("Kan/sm1"   (insert-string "!sm1;")))
1.7     ! ohara      38:         (-> "Select display style"
        !            39:           ("LaTeX"     (openxm-eval "!latex;"))
        !            40:           ("verbatim"  (openxm-eval "!verbatim;")))
        !            41:         (-> "Load Modules (Asir)"
        !            42:           ("dsolv"     (openxm-eval "load(\"dsolv\");"))
        !            43:           ("ccurve"    (openxm-eval "load(\"ccurve.rr\");"))
        !            44:           ("yang"      (openxm-eval "load(\"yang.rr\");"))
        !            45:           )
        !            46:         (-> "Display Configuration (Asir)"
        !            47:           ("Load default"   (openxm-eval "noro_print_env(0);"))
        !            48:           ("Weyl algebra"   (openxm-eval "noro_print_env(\"weyl\");"))
        !            49:           ("Euler OPs"      (openxm-eval "noro_print_env(\"yang\");"))
        !            50:           )
1.3       ohara      51:         ---
                     52:         (-> "Manuals"
1.5       ohara      53:           ("Risa/Asir manual"
                     54:            (w3m-search "doc/asir2000/html-jp/man_toc.html"))
                     55:           ("Asir-contrib manual"
                     56:            (w3m-search "doc/asir-contrib/html-ja/cman-ja_toc.html")))
1.3       ohara      57:         (-> "Web"
                     58:           ("The OpenXM Project"  (w3m "http://www.math.kobe-u.ac.jp/OpenXM/")))
                     59:         )))
1.1       ohara      60: )
                     61:
                     62: (plugin-configure openxm
1.6       ohara      63:   (:require (url-exists-in-path? "openxm"))
1.1       ohara      64:   (:initialize (openxm-initialize))
1.4       ohara      65:   (:launch "exec openxm ox_texmacs")
1.5       ohara      66:   (:session "OpenXM[asir,sm1]"))

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