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

1.6     ! ohara       1: ; $OpenXM: OpenXM/src/kxx/init-openxm.scm,v 1.5 2004/03/11 18:25:57 ohara Exp $
1.3       ohara       2:
1.5       ohara       3: (define (openxm-plugin-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.5       ohara       8: (define (openxm-plugin-eval-paste t)
                      9:   (insert-tree (object->tree (openxm-plugin-eval t))))
                     10:
                     11: (define (openxm-path t)
                     12:   (if (string? t)
                     13:     (let* ((openxm-home (or (getenv "OpenXM_HOME") "/usr/local/OpenXM"))
                     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)))
                     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;")))
                     38:         (-> "Output format"
1.5       ohara      39:           ("LaTeX"     (openxm-plugin-eval "!latex;"))
                     40:           ("verbatim"  (openxm-plugin-eval "!verbatim;")))
1.3       ohara      41:         ---
                     42:         (-> "Manuals"
1.5       ohara      43:           ("Risa/Asir manual"
                     44:            (w3m-search "doc/asir2000/html-jp/man_toc.html"))
                     45:           ("Asir-contrib manual"
                     46:            (w3m-search "doc/asir-contrib/html-ja/cman-ja_toc.html")))
1.3       ohara      47:         (-> "Web"
                     48:           ("The OpenXM Project"  (w3m "http://www.math.kobe-u.ac.jp/OpenXM/")))
                     49:         )))
1.1       ohara      50: )
                     51:
                     52: (plugin-configure openxm
1.6     ! ohara      53:   (:require (url-exists-in-path? "openxm"))
1.1       ohara      54:   (:initialize (openxm-initialize))
1.4       ohara      55:   (:launch "exec openxm ox_texmacs")
1.5       ohara      56:   (:session "OpenXM[asir,sm1]"))

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