indented BibTeX styles
[texmacs.git] / src / TeXmacs / progs / init-texmacs.scm
blob582f511072c3652c6617d188bced57851a3e548a
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;
4 ;; MODULE      : init-texmacs.scm
5 ;; DESCRIPTION : This is the standard TeXmacs initialization file
6 ;; COPYRIGHT   : (C) 1999  Joris van der Hoeven
7 ;;
8 ;; This software falls under the GNU general public license version 3 or later.
9 ;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
10 ;; in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14 (define boot-start (texmacs-time))
16 ;; TODO: scheme file caching using (set! primitive-load ...) and
17 ;; (set! %search-load-path)
19 ;; (debug-enable 'backtrace 'debug)
20 ;; (define load-indent 0)
21 ;; (define old-primitive-load primitive-load)
22 ;; (define (new-primitive-load . x)
23 ;;   (for-each display (make-list load-indent "  "))
24 ;;   (display "Load ") (apply display x) (display "\n")
25 ;;   (set! load-indent (+ load-indent 1))
26 ;;   (apply old-primitive-load x)
27 ;;   (set! load-indent (- load-indent 1))
28 ;;   (for-each display (make-list load-indent "  "))
29 ;;   (display "Done\n"))
30 ;; (set! primitive-load new-primitive-load)
32 ;(display "Booting TeXmacs kernel functionality\n")
33 (if (os-mingw?)
34     (load "kernel/boot/boot.scm")
35     (load (url-concretize "$TEXMACS_PATH/progs/kernel/boot/boot.scm")))
36 (inherit-modules (kernel boot compat) (kernel boot abbrevs)
37                  (kernel boot debug) (kernel boot srfi)
38                  (kernel boot ahash-table) (kernel boot prologue))
39 (inherit-modules (kernel library base) (kernel library list)
40                  (kernel library tree) (kernel library content))
41 (inherit-modules (kernel regexp regexp-match) (kernel regexp regexp-select))
42 (inherit-modules (kernel drd drd-rules) (kernel drd drd-query)
43                  (kernel drd drd-data))
44 (inherit-modules (kernel texmacs tm-overload) (kernel texmacs tm-define)
45                  (kernel texmacs tm-preferences) (kernel texmacs tm-modes)
46                  (kernel texmacs tm-plugins) (kernel texmacs tm-secure)
47                  (kernel texmacs tm-convert) (kernel texmacs tm-dialogue)
48                  (kernel texmacs tm-file-system))
49 (inherit-modules (kernel gui menu-define) (kernel gui menu-widget)
50                  (kernel gui kbd-define) (kernel gui gui-widget)
51                  (kernel gui gui-factory) (kernel gui gui-form))
52 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
54 ;(display "Booting utilities\n")
55 (lazy-define (utils cas cas-out) cas->stree)
56 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
58 ;; BibTeX style modules
59 (use-modules (bibtex bib-utils))
60 (use-modules (bibtex plain))
61 (use-modules (bibtex alpha))
62 (use-modules (bibtex abbrv))
63 (use-modules (bibtex acm))
64 (use-modules (bibtex ieeetr))
65 (use-modules (bibtex siam))
66 (use-modules (bibtex elsart-num))
68 ;(display "Booting main TeXmacs functionality\n")
69 (use-modules (texmacs texmacs tm-server) (texmacs texmacs tm-view)
70              (texmacs texmacs tm-files) (texmacs texmacs tm-print))
71 (use-modules (texmacs keyboard config-kbd))
72 (lazy-keyboard (texmacs keyboard wildcards-kbd) always?)
73 (if (like-emacs?) (lazy-keyboard (texmacs keyboard emacs-kbd) always?))
74 (if (like-windows?) (lazy-keyboard (texmacs keyboard windows-kbd) always?))
75 (lazy-keyboard (texmacs keyboard latex-kbd) always?)
76 (lazy-keyboard (texmacs keyboard texmacs-kbd) always?)
77 (lazy-menu (texmacs menus file-menu) file-menu go-menu
78            new-file-menu load-menu save-menu print-menu close-menu)
79 (lazy-menu (texmacs menus edit-menu) edit-menu)
80 (lazy-menu (texmacs menus view-menu) view-menu)
81 (lazy-menu (texmacs menus tools-menu) tools-menu)
82 (lazy-menu (texmacs menus preferences-menu) preferences-menu page-setup-menu)
83 (use-modules (texmacs menus main-menu))
84 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
86 ;(display "Booting generic mode\n")
87 (lazy-keyboard (generic generic-kbd) always?)
88 (lazy-menu (generic format-menu) format-menu font-size-menu color-menu)
89 (lazy-menu (generic document-menu) document-menu
90            project-menu document-style-menu global-language-menu)
91 (lazy-menu (generic document-part) document-part-menu project-manage-menu)
92 (lazy-menu (generic insert-menu) insert-menu
93            insert-link-menu insert-image-menu insert-animation-menu
94            insert-page-insertion-menu position-float-menu)
95 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
97 ;(display "Booting text mode\n")
98 (lazy-keyboard (text text-kbd) in-text?)
99 (lazy-keyboard (text format-text-kbd) in-text?)
100 (lazy-keyboard (text std-text-kbd) in-std-text?)
101 (lazy-menu (text format-text-menu) text-format-menu text-format-icons)
102 (lazy-menu (text text-menu) text-menu text-icons)
103 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
105 ;(display "Booting math mode\n")
106 (lazy-keyboard (math math-kbd) in-math?)
107 (lazy-menu (math format-math-menu) math-format-menu math-format-icons)
108 (lazy-menu (math math-menu) math-menu math-icons insert-math-menu)
109 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
111 ;(display "Booting programming modes\n")
112 (lazy-keyboard (prog scheme-edit) in-prog-scheme?)
113 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
115 ;(display "Booting source mode\n")
116 (lazy-keyboard (source source-kbd) always?)
117 (lazy-menu (source source-menu) source-menu source-icons
118            source-transformational-menu source-executable-menu)
119 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
121 ;(display "Booting table mode\n")
122 (lazy-keyboard (table table-kbd) in-table?)
123 (lazy-menu (table table-menu) table-menu table-icons insert-table-menu
124            horizontal-table-cell-menu vertical-table-cell-menu)
125 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
127 ;(display "Booting graphics mode\n")
128 (lazy-menu (graphics graphics-menu) graphics-menu graphics-icons)
129 (lazy-define (graphics graphics-edit)
130              graphics-reset-context graphics-undo-enabled
131              graphics-insert-point graphics-remove-point
132              graphics-last-point graphics-start-drag
133              graphics-dragging graphics-end-drag)
134 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
136 ;(display "Booting dynamic features\n")
137 (lazy-keyboard (dynamic fold-kbd) always?)
138 (lazy-keyboard (dynamic scripts-kbd) always?)
139 (lazy-menu (dynamic format-prog-menu) prog-format-menu prog-format-icons)
140 (lazy-menu (dynamic fold-menu) insert-fold-menu)
141 (lazy-define (dynamic session-edit) scheme-eval)
142 (lazy-menu (dynamic session-menu) insert-session-menu
143            session-menu session-icons session-help-icons help-icons)
144 (lazy-menu (dynamic scripts-menu) scripts-eval-menu
145            plugin-eval-menu plugin-eval-toggle-menu plugin-plot-menu)
146 (lazy-define (dynamic form-edit) form-ref form-set! form-toggle)
147 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
149 ;(display "Booting documentation\n")
150 (lazy-keyboard (doc tmdoc-kbd) in-tmdoc?)
151 (lazy-menu (doc help-menu) help-menu)
152 (lazy-define (doc tmdoc) tmdoc-expand-help tmdoc-expand-help-manual
153              tmdoc-expand-this tmdoc-include)
154 (lazy-define (doc docgrep) docgrep-in-doc docgrep-in-src docgrep-in-texts)
155 (lazy-define (doc tmweb) tmweb-convert-dir tmweb-interactive-build)
156 (define-secure-symbols tmdoc-include)
157 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
159 ;(display "Booting converters\n")
160 (lazy-format (convert rewrite init-rewrite) texmacs scheme verbatim)
161 (lazy-format (convert tmml init-tmml) tmml)
162 (lazy-format (convert latex init-latex) latex)
163 (lazy-format (convert html init-html) html)
164 (lazy-format (convert bibtex init-bibtex) bibtex)
165 (lazy-format (convert images init-images)
166              postscript pdf xfig xmgrace svg xpm jpeg ppm gif png pnm)
167 (lazy-define (convert rewrite init-rewrite) texmacs->verbatim)
168 (lazy-define (convert html tmhtml-expand) tmhtml-env-patch)
169 (lazy-define (convert latex latex-drd) latex-arity latex-type)
170 (lazy-define (convert latex textm) textm-finalize)
171 (lazy-define (convert latex tmtex) tmtex-env-patch)
172 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
174 ;(display "Booting BibTeX styles\n")
175 (use-modules (bibtex bib-utils))
176 (use-modules (bibtex plain))
177 (use-modules (bibtex alpha))
178 ;;(use-modules (bibtex abbrv))
179 ;;(use-modules (bibtex acm))
180 (use-modules (bibtex ieeetr))
181 (use-modules (bibtex siam))
182 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
184 ;(display "Booting remote facilities\n")
185 (lazy-define (remote tmfs-remote) remote-load remote-save
186              remote-name remote-permission? remote-project-load-by-name)
187 (lazy-menu (remote remote-menu) remote-menu)
188 (lazy-menu (remote chat-menu) chat-menu)
189 (lazy-menu (remote tmfs-menu) remote-file-menu)
190 (tmfs-handler #t 'load remote-load)
191 (tmfs-handler #t 'save remote-save)
192 (tmfs-handler #t 'name remote-name)
193 (tmfs-handler #t 'permission? remote-permission?)
194 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
196 ;(display "Booting linking facilities\n")
197 (lazy-menu (link link-menu) link-menu)
198 (lazy-keyboard (link link-kbd) with-linking-tool?)
199 (lazy-define (link link-edit) create-unique-id)
200 (lazy-define (link link-navigate) link-active-upwards link-active-ids
201              link-follow-ids)
202 (lazy-define (link link-extern) get-constellation
203              get-link-locations register-link-locations)
204 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
206 ;(display "Booting versioning facilities\n")
207 (lazy-menu (version version-menu) version-menu)
208 (lazy-keyboard (version version-kbd) with-versioning-tool?)
209 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
211 ;(display "Booting plugins\n")
212 (for-each lazy-plugin-initialize (plugin-list))
213 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
215 ;(display "Booting fonts\n")
216 (use-modules (fonts fonts-ec) (fonts fonts-adobe) (fonts fonts-x)
217              (fonts fonts-math) (fonts fonts-foreign) (fonts fonts-misc)
218              (fonts fonts-composite))
219 (if (> (get-font-type) 0) (use-modules (fonts fonts-truetype)))
220 ;(display* "time: " (- (texmacs-time) boot-start) "\n")
222 ;(display "------------------------------------------------------\n")
223 (delayed (:idle 10000) (delayed-auto-save))
224 (texmacs-banner)
225 ;(display "Initialization done\n")