﻿;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; YaTeX
;;   [La]TeX 入力モード
;;   M-x yatex とするか、.tex で終わるファイルを読み込むと起動します
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(setq load-path
      (append '("/usr/share/emacs/site-lisp/yatex") load-path))
(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
(autoload 'yahtml-mode "yahtml" "Yet Another HTML mode" t)

;; *.tex *.html の拡張子を持つファイルを開いた場合，
;; それぞれ yatex-mode, yahtml-mode にする．
(setq auto-mode-alist
      (cons (cons "\\.tex$" 'yatex-mode)
	    auto-mode-alist))
(setq auto-mode-alist
      (cons (cons "\\.html$" 'yahtml-mode)
	    auto-mode-alist))

;; 漢字コード
(setq YaTeX-kanji-code 4)	; UTF-8にする
(setq yahtml-kanji-code 4)	; UTF-8にする
(setq yahtml-www-browser "firefox")

;; 起動コマンド
;(setq tex-command "platex")
;(setq dviprint-from-format "-p %b")
;(setq dviprint-to-format "-l %e")
;(setq dviprint-command-format "dvi2ps %f %t %s | lpr")
;(setq YaTeX-dvipdf-command "dvipdfmx")
(setq dvi2-command "evince") ; プレビューア
