落穂拾い

Gleanings in my life

YaTeXの設定

2008年07月30日 20時12分55秒 | Linux
YaTeXで文章を書くときに、flyspellを自動オンにするように変更した。
今迄はせっせと毎回マウスでモードラインをクリックしてflyspellモードをオンにしていた。

そこで、現在の~/.emacs.el内のYaTeX関連部分をメモしておく。
;;; YaTeX-mode ------------------------------
(setq load-path (cons "/usr/local/share/emacs/site-lisp/yatex" load-path))
(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
(setq auto-mode-alist
      (cons (cons "\\.tex$" 'yatex-mode)
 	    auto-mode-alist))

(setq tex-command "platex")
(setq makeindex-command "mendex")
(setq dvi2-command "pxdvi -geo +0+0 -s 7")

(setq YaTeX-kanji-code 3)    ; EUC-code
(setq YaTeX-need-nonstop nil);
(setq YaTeX-use-hilit19 nil)
(add-hook 'yatex-mode-hook
          (lambda ()
	    (outline-minor-mode t)
	    (flyspell-mode t)
            (progn
              (modify-syntax-entry ?% "<" (syntax-table))
(modify-syntax-entry 10 ">" (syntax-table)) (make-variable-buffer-local 'outline-level) (setq outline-level 'latex-outline-level) (make-variable-buffer-local 'outline-regexp) (setq outline-regexp (concat "[ \\t]*\\\\\\(documentstyle\\|documentclass\\|chapter\\|" "section\\|subsection\\|subsubsection\\|paragraph\\)" "\\*?[ \\t]*[[{]") )) )) (defun latex-outline-level () (save-excursion (looking-at outline-regexp) (let ((title (buffer-substring (match-beginning 1) (match-end 1)))) (cond ((equal (substring title 0 4) "docu") 20) ((equal (substring title 0 4) "para") 15) ((equal (substring title 0 4) "chap") 0) ((equal (substring title 0 4) "appe") 0) (t (length title)))))) ; kdvi : forward search (add-to-list 'load-path (expand-file-name "/usr/kde/3.5/share/doc/HTML/en/kdvi/")) (require 'kdvi-search) (add-hook 'yatex-mode-hook (lambda () (local-set-key "\C-c\C-j" 'kdvi-jump-to-line)))

コメントを投稿