;;;;;;;;;;;;; -*- Mode: Emacs-Lisp -*- ;;;;;;;;;;;;;;
;;; .emacs file for emacs-yatex-miktex on Windows XP
;;; Compliler :
;;; Created On : 30 Dec 2003
;;; Last Modifed By :
;;; Last Modified On : 23/02/2004
;;; Updated Count : many times
;;; Status : Ok,
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Put this file in your HOME directory.
;;------------------------------------------------------------
;;
(setq inhibit-startup-message nil) ;; skip the opening message.
(setq initial-scratch-message nil) ;; without scratchmessage.
;--Replace yes/no+enter prompts with y/n prompts
(fset 'yes-or-no-p 'y-or-n-p)
;;--------------------------------------------------------------------
;; +++ font-lock +++ ;;
;;; comment in general:
;;; Difinitions for font-lock and syntax high-lighting colours should
;;; be placed at the begining of .emacs file. If these are placed
;;; at the end of the file, syntax-highliting does not work.
;;; I have not find out the cause.
;; Speeding up loading files which use font-lock mode ;;;;;
;;; If using emacs 21 the following will speed up loading files
;;; which used font-lock mode.
;;; The following line added by 01/01/2004.
;;; originally from: http://homepage1.nifty.com/blankspace/emacs/color.html
(setq font-lock-support-mode 'jit-lock-mode)
;;; The highlighting colours will be used in all modes with the following.
(global-font-lock-mode t)
;;; font-lock for specific mode ;;;
;;; The following line is disabled since I set font-lock for all modes.
;(add-hook 'latex-mode-hook 'turn-on-font-lock)
;(add-hook 'Emacs-lisp 'turn-on-font-lock)
;; +++ End of font-lock matters+++ ;;
;;-------------------------------------------------------------------
;; +++ font-lock +++ ;;
;;; quote--- source: http://www-2.cs.cmu.edu/cgi-bin/info2www?(emacs)Font%2520Lock
;;; Font Lock highlighting patterns already exist for many modes, but you
;;; may want to fontify additional patterns. You can use the function
;;;`font-lock-add-keywords', to add your own highlighting patterns for a
;;; particular mode. For example, to highlight `FIXME:' words in C
;;; comments, use this:
;;;
;;; (font-lock-add-keywords
;;; 'latex-mode
;;; '(("\\<\\(FIXME\\):" 1 font-lock-warning-face t)))
;;;
;;; To remove keywords from the font-lock highlighting patterns, use the
;;; function `font-lock-remove-keywords'. --- end of quote.
(setq load-path (cons (expand-file-name "c:/usr/local/emacs/site-lisp/yatex") load-path))
;;; previously ---> c:/program files/emacs/site-lisp/yatex
;;; note that if there are any spaces in the path YaTeX does not reach the destination.
(load "yatex")
;;; type-setter ;;;
;;; YaTeX will find an exe file of latex to typeset.
(setq tex-command "c:/localtexmf/miktex/bin/latex.exe")
;;; previously ---> c:/texmf/miktex/bin/latex.exe
;;; Note that if there are any spaces in the path YaTeX does not reach the destination.
;;; 漢字コード ;;;
;;; 1=Shift JIS >== Windows なら
;;; 2=JIS
;;; 3=EUC
(setq YaTeX-kanji-code 1)
;;; LaTeX2e を使う ;;;
(setq YaTeX-use-LaTeX2e t)
;;; 色付け ;;;
;;(setq Yatex-use-font-lock t)
;;; originally (setq Yatex-use-font-lock t).
;;; modified by Tatsuya to work on sytax-highlighting for Latex-mode 09/01/2004.
;;; YaTeX help ;;;
;;; The following line added by Tatsuya Yanagida on 09/01/2004.
;;; This line is necessary to make yatex find its help file.
(setq YaTeX-help-file
(expand-file-name "YATEXHLP.jp" data-directory))
;; End of ;; +++ yatex +++ ;;
;; Yahtml
;; Yahtml will be autolatically loaded when opening *.html file.
(setq auto-mode-alist
(cons (cons "\\.html$" 'yahtml-mode) auto-mode-alist))
(autoload 'yahtml-mode "yahtml" "Yet Another html-mode" t)
;;(setq yahtml-kanji-code 3)
;;------------------------------------------------------------------
;; The following is another source for how to make my own
;; font-lock-keywords. The formulae works very nicely.
;;source: http://chaosweb.complex.eng.hokudai.ac.jp/~hagi/contents/memo-meadow-tex.html#yatex-fontlock
;; YaTeX の font-lock keywords の追加.\foo 型キーワード(数式環境中のものか
;; YaTeX が触らないもの)と,括弧関係と改行(\\).
;; Add font-lock keyword
(setq my-YaTeX-font-lock-keywords
'(("\\(\\\\\\(left\\|right\\)\\([][().|]\\|\\\\[{}]\\)\\)"
(0 font-lock-warning-face))
("\\(|\\|&\\|\\\\[{}]\\|\\\\\\\\\\)" (0 font-lock-warning-face))
("\\\\[a-zA-Z]*" (0 font-lock-builtin-face))
))
(add-hook 'yatex-mode-hook
'(lambda ()
(setq
YaTeX-font-lock-keywords
(append YaTeX-font-lock-keywords my-YaTeX-font-lock-keywords))))
;; ------------------------------------------------------------------
;; +++ display +++ ;;
;;; The following lines added by 02/01/04.
;;; Need to work out how to fix problem in alignment of dates
;;; in Calendar mode when not using courier fonts.
(setq default-frame-alist
'((top . 2) (left . 80) ; courier new 16pt, left 20
(width . 89) ; other fonts: Arial, 92; 14pt,100; @dotumche 16pt 94; courier new 14pt, 95; courier new 16pt, 80
(height . 39); Arial 24; when 14pt,43; courier new 14pt, 41; courier new 16pt,39
(cursor-color . "yellow")
(cursor-type . box)
(scroll-bar-width . 12)
(mouse-color . "yellow")
(foreground-color . "grey85") ;; other candidate: wheat, white2
(background-color . "darkslategrey") ;; other candidates: gray70, dark slate gray,
))
;;--------------------------------------------------------------------
;; +++ Japanese fonts settings +++ ;;
;;; The following lines added by 05/01/04:
;;; originally from: http://www.egroups.co.jp/message/emacs21-users-ja/262
;;; font size modified by .
;;; This part is important to make Japanese fonts displayed properly.
(setq list-faces-sample-text "abcdefg CDEFG あいうえお 日本語")
(setq scalable-fonts-allowed t)
(let ((jfont "-*-MS ゴシック-*-*-*-*-16-*-*-*-*-*-*-jisx0208-sjis") ;; 16- was added. previously no font size and slash after 16. 16pt works, but other size make Japanese fontsrotate 90 degrees.
(specs '(latin-jisx0201 katakana-jisx0201 japanese-jisx0208)))
(create-fontset-from-fontset-spec
(concat "-*-courier new-*-*-*-*-16-*-*-*-*-*-fontset-std," ;; (*) ;; the size was originally 14pt. Ok with calendar alignment: @dotumche, @gulimche, @gungsuhche
(mapconcat (lambda (x) (format "%s:%s" x jfont)) specs ",")))
(while specs
(set-fontset-font "fontset-std" (make-char (car specs))
'("MS ゴシック" . "jisx0208-sjis"))
(setq specs (cdr specs))))
(setq default-frame-alist
(cons '(font . "fontset-std") default-frame-alist))
;; End of +++ Make Japanese fonts display possible +++ ;;
;;------------------------------------------------------------
;; +++ time +++ ;;
(display-time)
(setq display-time-day-and-date t
display-time-24hr-format t
display-time-inverval 1
display-time-string-forms
'(day "/" month " "24-hours ":" minutes))
;; Reftex activation (Reftex is included with Emacs 21.1)
;;; This part is copied from Auc TeX .emacs files.
(autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t)
(autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil)
(autoload 'reftex-citation "reftex-cite" "Make citation" nil)
(autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
;; ----------------------------------------------------------------------
;; Info for Ispell
(add-to-list 'Info-default-directory-list "c:/usr/local/info/")
(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
)
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(YaTeX-font-lock-declaration-face ((((class color) (background dark)) (:foreground "steel blue")))))