yatex

view yatex19.el @ 68:0eb6997bee16

More adjustment for Emacs20 and XEmacs [prefix] g for <applet> <!--#include> <!--#exec>
author yuuji
date Mon, 26 Oct 1998 12:05:32 +0000
parents 36a48185b95a
children 807c1e7e68b7
line source
1 ;;; -*- Emacs-Lisp -*-
2 ;;; YaTeX facilities for Emacs 19
3 ;;; (c )1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
4 ;;; Last modified Thu Jan 29 10:55:12 1998 on crx
5 ;;; $Id$
7 ;;; とりあえず hilit19 を使っている時に色が付くようにして
8 ;;; メニューバーでごにょごにょできるようにしただけ。
9 ;;; いったい誰がメニューバー使ってLaTeXソース書くんだろうか?
10 ;;; まあいいや練習練習。後ろの方にちょっとコメントあり。
11 ;;; 真中辺にあるけど、hilit19.el 対応の方は結構本気。
12 ;;; とかいってるうちに hilit19 って obsolete になってしまった…
14 ;(require 'yatex)
16 (defvar YaTeX-mode-menu-map (make-sparse-keymap "YaTeX"))
17 (defvar YaTeX-mode-menu-map-process (make-sparse-keymap "Process"))
18 (define-key YaTeX-mode-map [menu-bar yatex]
19 (cons "YaTeX" YaTeX-mode-menu-map))
20 (YaTeX-define-menu
21 'YaTeX-mode-menu-map-process
22 (nreverse
23 '((buffer "LaTeX" . (lambda () (interactive) (YaTeX-typeset-menu nil ?j)))
24 (kill "Kill LaTeX" . (lambda () (interactive) (YaTeX-typeset-menu nil ?k)))
25 (bibtex "BibTeX" . (lambda () (interactive) (YaTeX-typeset-menu nil ?b)))
26 (mindex "makeindex" . (lambda () (interactive) (YaTeX-typeset-menu nil ?i)))
27 (preview "Preview" . (lambda () (interactive) (YaTeX-typeset-menu nil ?p)))
28 (lpr "lpr" . (lambda () (interactive) (YaTeX-typeset-menu nil ?l)))
29 (lpq "lpq" . (lambda () (interactive) (YaTeX-typeset-menu nil ?q))))))
30 (defvar YaTeX-mode-menu-map-modes (make-sparse-keymap "Modes"))
31 (YaTeX-define-menu
32 'YaTeX-mode-menu-map-modes
33 (delq nil
34 (nreverse
35 (list
36 (if YaTeX-auto-math-mode nil
37 (cons 'math (cons "Toggle math-mode"
38 '(lambda () (interactive)
39 (YaTeX-switch-mode-menu nil ?t)))))
40 (cons 'mod (cons "Toggle Modify Mode"
41 '(lambda () (interactive)
42 (YaTeX-switch-mode-menu nil ?m))))))))
43 (defvar YaTeX-mode-menu-map-percent (make-sparse-keymap "percent"))
44 (YaTeX-define-menu
45 'YaTeX-mode-menu-map-percent
46 (nreverse
47 '((! "Change LaTeX typesetter(%#!)"
48 . (lambda () (interactive) (YaTeX-%-menu nil nil ?!)))
49 (begend "Set %#BEGIN-%#END on region"
50 . (lambda () (interactive) (YaTeX-%-menu nil nil ?b)))
51 (lpr "Change LPR format"
52 . (lambda () (interactive) (YaTeX-%-menu nil nil ?l))))))
54 (defvar YaTeX-mode-menu-map-jump (make-sparse-keymap "jump"))
55 (YaTeX-define-menu
56 'YaTeX-mode-menu-map-jump
57 (nreverse
58 '((corres "Goto corersponding position" . YaTeX-goto-corresponding-*)
59 (main "Visit main source"
60 . (lambda () (interactive) (YaTeX-visit-main)))
61 (main-other "Visit main source other window"
62 . YaTeX-visit-main-other-window))))
64 (defvar YaTeX-mode-menu-map-comment (make-sparse-keymap "comment"))
65 (YaTeX-define-menu
66 'YaTeX-mode-menu-map-comment
67 (nreverse
68 '((comment "Comment region or environment" . YaTeX-comment-region)
69 (uncomment "Unomment region or environment" . YaTeX-uncomment-region)
70 (commentp "Comment paragraph" . YaTeX-comment-paragraph)
71 (uncommentp "Uncomment paragraph" . YaTeX-uncomment-paragraph))))
73 (YaTeX-define-menu
74 'YaTeX-mode-menu-map
75 (nreverse
76 (list
77 ;; Change/Kill/Fill -------------------------------------------------------
78 (cons (list 'chg "Change") (cons "Change macros" 'YaTeX-change-*))
79 (cons (list 'kill "Kill") (cons "Kill macros" 'YaTeX-kill-*))
80 (cons (list 'fill "Fill") (cons "Fill \\item" 'YaTeX-fill-item))
81 (cons (list 'nl "Newline") (cons "Newline" 'YaTeX-intelligent-newline))
82 ;; ========================================================================
83 (cons (list 'sep1 "---") (cons "---" nil))
84 ;; Comment/Uncomment ------------------------------------------------------
85 (cons (list 'comment "comment") (cons "Comment region or environment"
86 'YaTeX-comment-region))
87 (cons (list 'uncomment "uncomment") (cons "Uncomment region or environment"
88 'YaTeX-uncomment-region))
89 (cons (list 'commentp "commentp") (cons "Comment paragraph"
90 'YaTeX-comment-paragraph))
91 (cons (list 'uncommentp "uncommentp") (cons "Uncomment paragraph"
92 'YaTeX-uncomment-paragraph))
93 ;; ========================================================================
94 (cons (list 'sep2 "---") (cons "---" nil))
95 ;; Jump cursor ------------------------------------------------------------
96 (cons (list 'jump "jump") (cons "Jump Cursor" YaTeX-mode-menu-map-jump))
97 ;; Document hierarchy ---------------------------------------------------
98 (cons (list 'hier "hier") (cons "Display Document hierarchy"
99 'YaTeX-display-hierarchy))
100 ;; What position ----------------------------------------------------------
101 (cons (list 'col "column") (cons "What column in tabular"
102 'YaTeX-what-column))
103 ;; % menu -----------------------------------------------------------------
104 (cons (list 'percent "percent") (cons "Edit %# notation"
105 YaTeX-mode-menu-map-percent))
106 ;; Switch modes -----------------------------------------------------------
107 (cons (list 'mode "mode") (cons "Switching YaTeX's modes"
108 YaTeX-mode-menu-map-modes))
109 ;; ========================================================================
110 (cons (list 'sep "---") (cons "---" nil))
111 ;; Help for LaTeX ---------------------------------------------------------
112 (cons (list 'ap "apr") (cons "Apropos on LaTeX commands" 'YaTeX-apropos))
113 (cons (list 'help "help") (cons "Help on LaTeX commands" 'YaTeX-help))
114 ;; Menu for Typeset relating processes ------------------------------------
115 (cons (list 'process "Process menu")
116 (cons "Process" YaTeX-mode-menu-map-process)))
117 ))
119 ;; Make section-type commands menu -------------------------------------------
120 (defvar YaTeX-mode-menu-map-sectionr
121 (make-sparse-keymap "Enclose region with section-type macro"))
122 (defvar YaTeX-mode-menu-map-section (make-sparse-keymap "Section-type macro"))
123 (let ((sorted-section
124 (sort
125 (delq nil
126 (mapcar (function (lambda (s)
127 (if (> (length (car s)) 5)
128 (car s))))
129 (append section-table user-section-table)))
130 'string<)))
131 (YaTeX-define-menu
132 'YaTeX-mode-menu-map-section
133 (mapcar
134 (function (lambda (secname)
135 (cons (intern secname)
136 (cons secname
137 (list 'lambda ()
138 (list 'interactive)
139 (list 'YaTeX-make-section
140 nil nil nil
141 secname))))))
142 sorted-section))
143 (YaTeX-define-menu
144 'YaTeX-mode-menu-map-sectionr
145 (mapcar
146 (function (lambda (secname)
147 (cons (intern secname)
148 (cons secname
149 (list 'lambda ()
150 (list 'interactive)
151 (list 'YaTeX-make-section
152 nil
153 (list 'region-beginning)
154 (list 'region-end)
155 secname))))))
156 sorted-section)))
158 (YaTeX-define-menu
159 'YaTeX-mode-menu-map
160 (nreverse
161 (list
162 (cons '(sectionr "Section-type (long name)")
163 (cons "Section type" YaTeX-mode-menu-map-section))
164 (cons '(section "Section-type region (long name)")
165 (cons "Section type region (long name)"
166 YaTeX-mode-menu-map-sectionr)))))
168 ;; Make large-type commands menu ---------------------------------------------
169 (defvar YaTeX-mode-menu-map-envr (make-sparse-keymap "Environment region"))
170 (defvar YaTeX-mode-menu-map-env (make-sparse-keymap "Environment"))
172 (let ((sorted-env
173 (sort
174 (mapcar (function (lambda (s) (car s)))
175 (append env-table user-env-table))
176 'string<)))
177 (YaTeX-define-menu
178 'YaTeX-mode-menu-map-env
179 (mapcar
180 (function (lambda (envname)
181 (cons (intern envname)
182 (cons envname
183 (list 'lambda ()
184 (list 'interactive)
185 (list 'YaTeX-insert-begin-end
186 envname nil))))))
187 sorted-env))
188 (YaTeX-define-menu
189 'YaTeX-mode-menu-map-envr
190 (mapcar
191 (function (lambda (envname)
192 (cons (intern envname)
193 (cons envname
194 (list 'lambda ()
195 (list 'interactive)
196 (list 'YaTeX-insert-begin-end
197 envname t))))))
198 sorted-env)))
199 (YaTeX-define-menu
200 'YaTeX-mode-menu-map
201 (nreverse
202 (list
203 (cons '(envr "Environment")
204 (cons "Environment" YaTeX-mode-menu-map-env))
205 (cons '(env "Environment region")
206 (cons "Environment region"
207 YaTeX-mode-menu-map-envr)))))
209 (and (featurep 'xemacs)
210 (add-hook 'yatex-mode-hook
211 '(lambda ()
212 (or (assoc "YaTeX" current-menubar)
213 (progn
214 (set-buffer-menubar (copy-sequence current-menubar))
215 (add-submenu nil YaTeX-mode-menu-map))))))
217 ;; Other key bindings for window-system
218 ;(YaTeX-define-key [?\C- ] 'YaTeX-do-completion)
219 (define-key YaTeX-mode-map [?\M-\C- ] 'YaTeX-mark-environment)
221 ;; Highlightening
222 ;; メニューに比べてこっちは結構本気でやってます。
223 ;; だって文書構造がとっても分かり易いんだもん。
224 ;; みんなも hilit19.el を使おう!
225 ;;
226 ;; さて、まずは対応する {} をピカピカ範囲とするような関数を作る。
227 ;; これは hilit-LaTeX.el を参考にした。でも、ちゃんと section 型コマンドの
228 ;; 引数を数えて正しい位置までピカピカさせるよ〜ん!
230 (defun YaTeX-19-region-section-type (pattern)
231 "Return list of starting and end point of section-type commands of PATTERN."
232 (if (re-search-forward pattern nil t)
233 (let ((m0 (match-beginning 0)) cmd (argc 1))
234 (setq cmd (substring (YaTeX-match-string 0) 1)
235 argc (or (car (cdr (YaTeX-lookup-table cmd 'section))) argc))
236 (cons m0
237 (progn ;(skip-chars-backward "^{") (forward-char -2)
238 (while (> argc 0)
239 (skip-chars-forward "^{")
240 (forward-list 1)
241 (setq argc (1- argc)))
242 (point))))))
244 (defun YaTeX-19-region-large-type (pattern)
245 "Return list of large-type contents.
246 Assumes PATTERN begins with `{'."
247 (if (re-search-forward pattern nil t)
248 (let ((m0 (match-beginning 0)))
249 (goto-char m0)
250 (skip-chars-forward "^ \t\n")
251 (skip-chars-forward " \t\n")
252 (cons (point)
253 (progn (goto-char m0) (forward-list 1)
254 (1- (point)))))))
256 ;; 些細なことだが % の前の文字もピカリとさせてしまうようで… >hilit19
257 ;; ↓この関数は下の hilit-set-mode-patterns の "[^\\]\\(%\\).*$" に
258 ;; 依存している
259 (defun YaTeX-19-region-comment (pattern)
260 "Return list of comment start and end point."
261 (if (re-search-forward pattern nil t)
262 (cons (match-beginning 2) (match-end 0))))
264 ;;(make-face 'tt)
265 ;;(set-face-font 'tt "-schumacher-clean-medium-r-normal--*-*-*-*-*-*-*-*")
266 ;;(hilit-translate 'tt "white")
268 (defvar YaTeX-hilit-patterns-alist
269 '(
270 ;; comments
271 (YaTeX-19-region-comment "\\([^\\]\\|^\\)\\(%\\).*$" comment)
273 (YaTeX-19-region-section-type "\\\\footnote\\(mark\\|text\\)?\\>" keyword)
274 ("\\\\[a-z]+box" 0 keyword)
275 (YaTeX-19-region-section-type "\\\\\\(v\\|h\\)space\\>" keyword)
277 ;; (re-)define new commands/environments/counters
278 (YaTeX-19-region-section-type
279 "\\\\\\(re\\)?new\\(environment\\|command\\|theorem\\|length\\|counter\\)\\>"
280 defun)
281 (YaTeX-19-region-section-type
282 "\\\\textbf\\>" bold)
284 ;; various declarations/definitions
285 (YaTeX-19-region-section-type
286 "\\\\\\(set\\|setto\\|addto\\)\\(length\\|width\\|counter\\)\\>"
287 define)
288 (YaTeX-19-region-section-type
289 "\\\\\\(title\\|author\\|date\\|thanks\\)\\>" define)
291 ("\\\\document\\(style\\|class\\)\\(\\[.*\\]\\)?{" "}" decl)
292 ("\\\\\\(begin\\|end\\|nofiles\\|includeonly\\){" "}" decl)
293 ("\\\\\\(raggedright\\|makeindex\\|makeglossary\\|maketitle\\)\\b" 0 decl)
294 ("\\\\\\(pagestyle\\|thispagestyle\\|pagenumbering\\){" "}" decl)
295 ("\\\\\\(normalsize\\|small\\|footnotesize\\|scriptsize\\|tiny\\|large\\|Large\\|LARGE\\|huge\\|Huge\\)\\b" 0 decl)
296 ("\\\\\\(appendix\\|tableofcontents\\|listoffigures\\|listoftables\\)\\b"
297 0 decl)
298 ("\\\\\\(bf\\|em\\|it\\|rm\\|sf\\|sl\\|ss\\|tt\\)\\b" 0 decl)
300 ;; label-like things
301 ;;this should be customized by YaTeX-item-regexp
302 ("\\\\\\(sub\\)*item\\b\\(\\[[^]]*\\]\\)?" 0 label)
303 (YaTeX-19-region-section-type
304 "\\\\caption\\(\\[[^]]*\\]\\)?\\>" label)
306 ;; things that do some sort of cross-reference
307 (YaTeX-19-region-section-type
308 "\\\\\\(\\(no\\)?cite\\|\\(page\\)?ref\\|label\\|index\\|glossary\\)\\>"
309 crossref)
311 ;; things that bring in external files
312 ("\\\\\\(include\\|input\\|bibliography\\){" "}" include)
314 ;; formulas
315 ("[^\\]\\\\(" "\\\\)" formula) ; \( \)
316 ("[^\\]\\\\\\[" "\\\\\\]" formula) ; \[ \]
317 ("\\\\begin{\\(eqn\\|equation\\|x?x?align\\|split\\|multline\\|gather\\)"
318 "\\\\end{\\(eqn\\|equation\\|x?x?align\\|split\\|multline\\|gather\\).*}"
319 formula)
320 ("[^\\$]\\($\\($[^$]*\\$\\|[^$]*\\)\\$\\)" 1 formula); '$...$' or '$$...$$'
322 ;; "wysiwyg" emphasis -- these don't work on nested expressions
323 (YaTeX-19-region-large-type "{\\\\\\(em\\|it\\|sl\\)" italic)
324 (YaTeX-19-region-large-type "{\\\\bf" bold)
325 ;;;(YaTeX-19-region-large-type "{\\\\tt" tt)
326 ;;;("\\\\begin{verbatim" "\\\\end{verbatim" tt)
328 ("``" "''" string))
329 "*Hiliting pattern alist for LaTeX text.")
331 ;;(defvar YaTeX-hilit-pattern-adjustment-default nil)
332 ;; ↑いらなくなった。
333 (defvar YaTeX-hilit-pattern-adjustment-private nil
334 "*Adjustment hilit-pattern-alist for default yatex-mode's pattern.")
335 (defvar YaTeX-hilit-sectioning-face
336 '(yellow/dodgerblue yellow/slateblue)
337 "*Hilightening face for sectioning unit. '(FaceForLight FaceForDark)")
338 (defvar YaTeX-hilit-sectioning-attenuation-rate
339 '(15 40)
340 "*Maximum attenuation rate of sectioning face. '(ForeRate BackRate)
341 Each rate specifies how much portion of RGB value should be attenuated
342 towards to lowest sectioning unit. Numbers should be written in percentage.")
343 (defvar YaTeX-sectioning-patterns-alist nil
344 "Hilightening patterns for sectioning units.")
345 (defvar YaTeX-hilit-singlecmd-face
346 '(slateblue2 aquamarine)
347 "*Hilightening face for maketitle type. '(FaceForLight FaceForDark)")
349 ;;; セクションコマンドを、構造レベルの高さに応じて色の濃度を変える
350 ;;; 背景が黒でないと何が嬉しいのか分からないに違いない.
351 ;;; もしかして白地の時は構造レベルに応じて色を明るくしたほうが良いのか?
352 ;(if (fboundp 'win32-color-values)
353 ; (fset 'x-color-values 'win32-color-values))
355 (cond
356 ((and (featurep 'hilit19) (fboundp 'x-color-values))
357 (let*((sectface
358 (car (if (eq hilit-background-mode 'dark)
359 (cdr YaTeX-hilit-sectioning-face)
360 YaTeX-hilit-sectioning-face)))
361 (sectcol (symbol-name sectface))
362 sect-pat-alist)
363 (if (string-match "/" sectcol)
364 (let ((fmin (nth 0 YaTeX-hilit-sectioning-attenuation-rate))
365 (bmin (nth 1 YaTeX-hilit-sectioning-attenuation-rate))
366 colorvalue fR fG fB bR bG bB pat fg bg level from face list lm)
367 (require 'yatexsec)
368 (setq fg (substring sectcol 0 (string-match "/" sectcol))
369 bg (substring sectcol (1+ (string-match "/" sectcol)))
370 colorvalue (x-color-values fg)
371 fR (/ (nth 0 colorvalue) 256)
372 fG (/ (nth 1 colorvalue) 256)
373 fB (/ (nth 2 colorvalue) 256)
374 colorvalue (x-color-values bg)
375 bR (/ (nth 0 colorvalue) 256)
376 bG (/ (nth 1 colorvalue) 256)
377 bB (/ (nth 2 colorvalue) 256)
378 lm YaTeX-sectioning-max-level
379 list YaTeX-sectioning-level)
380 (while list
381 (setq pat (concat YaTeX-ec-regexp (car (car list))
382 ;"\\*?\\(\\[[^]]*\\]\\)?\\>"
383 "\\>"
384 )
385 level (cdr (car list))
386 fg (format "hex-%02x%02x%02x"
387 (- fR (/ (* level fR fmin) lm 100))
388 (- fG (/ (* level fG fmin) lm 100))
389 (- fB (/ (* level fB fmin) lm 100)))
390 bg (format "hex-%02x%02x%02x"
391 (- bR (/ (* level bR bmin) lm 100))
392 (- bG (/ (* level bG bmin) lm 100))
393 (- bB (/ (* level bB bmin) lm 100)))
394 from (intern (format "sectioning-%d" level))
395 face (intern (concat fg "/" bg)))
396 (hilit-translate from face)
397 (setq sect-pat-alist
398 (cons;;(list pat "}" face)
399 (list 'YaTeX-19-region-section-type pat face)
400 sect-pat-alist))
401 (setq list (cdr list)))
402 (setq YaTeX-sectioning-patterns-alist sect-pat-alist))))))
404 ;; ローカルなマクロを読み込んだ後 redraw すると
405 ;; ローカルマクロを keyword として光らせる(keywordじゃまずいかな…)。
406 (defun YaTeX-19-collect-macros ()
407 (cond
408 ((and (featurep 'hilit19) (fboundp 'hilit-translate))
409 (let ((get-face
410 (function
411 (lambda (table)
412 (cond
413 ((eq hilit-background-mode 'light) (car table))
414 ((eq hilit-background-mode 'dark) (car (cdr table)))
415 (t nil)))))
416 sect single)
417 (hilit-translate
418 ;;sectioning (funcall get-face YaTeX-hilit-sectioning-face)
419 macro (funcall get-face YaTeX-hilit-singlecmd-face))
420 (if (setq sect (append user-section-table tmp-section-table))
421 (setq sect (concat "\\\\\\("
422 (mapconcat
423 (function
424 (lambda (s) (regexp-quote (car s))))
425 sect
426 "\\|")
427 "\\)\\>")))
428 (if (setq single (append user-singlecmd-table tmp-singlecmd-table))
429 (setq single (concat "\\\\\\("
430 (mapconcat
431 (function (lambda (s) (regexp-quote (car s))))
432 single
433 "\\|")
434 "\\)\\b")))
435 (setq hilit-patterns-alist ;Remove at first.
436 (delq (assq 'yatex-mode hilit-patterns-alist) hilit-patterns-alist)
437 hilit-patterns-alist
438 (cons
439 (cons 'yatex-mode
440 (append
441 (list nil)
442 YaTeX-sectioning-patterns-alist
443 YaTeX-hilit-pattern-adjustment-private
444 ;;YaTeX-hilit-pattern-adjustment-default
445 YaTeX-hilit-patterns-alist
446 (delq nil
447 (list
448 (if sect (list
449 'YaTeX-19-region-section-type
450 sect
451 'keyword))
452 (if single (list single 0 'macro))))))
453 hilit-patterns-alist))))))
454 ;;(YaTeX-19-collect-macros) ;causes an error
455 (defun YaTeX-hilit-recenter (arg)
456 "Collect current local macro and hilit-recenter."
457 (interactive "P")
458 (YaTeX-19-collect-macros)
459 (hilit-recenter arg))
460 (if (fboundp 'hilit-recenter) ;Replace hilit-recenter with
461 (mapcar (function (lambda (key) ;YaTeX-hilit-recenter in yatex-mode
462 (define-key YaTeX-mode-map key 'YaTeX-hilit-recenter)))
463 (where-is-internal 'hilit-recenter)))
465 (defun YaTeX-switch-to-new-window ()
466 (let ((c 0) (i 1) (free (make-string win:max-configs ? )))
467 (while (< i win:max-configs)
468 (or (aref win:configs i) (aset free i (+ i win:base-key)))
469 (setq i (1+ i)))
470 (while (not (string-match (char-to-string c) free))
471 (message "Which window to create? [%s]: " free)
472 (setq c (read-char)))
473 (message "Creating window [%c]" c)
474 (set-buffer (get-buffer-create "*scratch*"))
475 (win:switch-window (- c win:base-key))))
477 (defun YaTeX-visit-main-other-frame ()
478 "Visit main file in other frame.
479 WARNING, This code is not perfect."
480 (interactive)
481 (if (YaTeX-main-file-p) (message "I think this is main LaTeX source.")
482 (let (parent)
483 (save-excursion (YaTeX-visit-main t) (setq parent (current-buffer)))
484 (cond
485 ((get-buffer-window parent t)
486 (goto-buffer-window parent))
487 ((and (featurep 'windows) win:use-frame)
488 (YaTeX-switch-to-new-window)
489 (switch-to-buffer parent))
490 (t (switch-to-buffer-other-frame (buffer-name parent)))))))
492 (defun YaTeX-goto-corresponding-*-other-frame (arg)
493 "Go to corresponding object in other frame."
494 (interactive "P")
495 (let (b p)
496 (save-window-excursion
497 (save-excursion
498 (YaTeX-goto-corresponding-* arg)
499 (setq b (current-buffer) p (point))))
500 (cond
501 ((get-buffer-window b t)
502 (goto-buffer-window b)
503 (goto-char p))
504 ((and (featurep 'windows) win:use-frame)
505 (YaTeX-switch-to-new-window)
506 (switch-to-buffer b)
507 (goto-char p))
508 (t (switch-to-buffer-other-frame (buffer-name b))
509 (goto-char p))))
510 )
512 ;;; reverseVideo にして hilit-background-mode を 'dark
513 ;;; にしている人は数式などが暗くなりすぎて見づらいかもしれない。
514 ;;; 次のコードを hilit19 をロードしている場所の直後に置くとちょっ
515 ;;; とはまし。
516 ;;; (if (eq hilit-background-mode 'dark)
517 ;;; (hilit-translate
518 ;;; string 'mediumspringgreen
519 ;;; formula 'khaki
520 ;;; label 'yellow-underlined))
521 (and YaTeX-emacs-19
522 (not (featurep 'xemacs))
523 (boundp 'byte-compile-current-file)
524 (if (and (boundp 'window-system) window-system)
525 (require 'hilit19)
526 (error "Byte compile this file on window system! Not `-nw'!")))
528 (provide 'yatex19)