MacTexインストールして,PictPrinterとその表示に必要なFontをインストール.Yatexの設定をしたら終わり.のはず.よく覚えていない.そのうち思い出したら書く・・・はず.
追記:2011-12-12
MacTex2011+emacs(cocoa)+Yatex+PictPrinterという作戦.
- まずはMacTex2011をインストール.
- emacsはhomebrewからインストール.
- PictPrinterを小磯先生のHPからダウンロード.
- http://www.math.sci.osaka-u.ac.jp/~koiso/
- PostScript Type 1 フォントのインストール
- Computer Modern フォント:http://www.ring.gr.jp/pub/text/CTAN/systems/mac/textures/fonts/Computer_Modern_PostScript/cmps-macintosh.hqx
- ↑の展開したディレクトリにあるすべてのファイルを/Library/Fonts/にコピー.ディレクトリの中身は取り出してコピー.
- AMSfont:http://www.ring.gr.jp/pub/text/CTAN/systems/mac/textures/fonts/AMS.PS.fonts.sea.hqx
- ↑展開したディレクトリのうち、AMS/PS screen fonts、AMS/PS Metrics、AMS PS outlines フォルダの中のファイルを/Library/Fonts/にコピー.
- Yatex
- http://www.yatex.org/をダウンロード.
- ビルドしてインストール.
- makefileを以下のように変更.インストール先によって,.emacsに記述するyatexのパスが変わる.
[Macに最初からインストールされているemacs(22.1.1)を使う場合] PREFIX = /usr EMACS = emacs EMACSDIR= ${PREFIX}/share/${EMACS} INFODIR = ${PREFIX}/share/info [homebrewでインストールしたmacs(23.3b)の場合はこう(?)] PREFIX = /usr EMACS = emacs EMACSDIR= ${PREFIX}/local/Cellar/${EMACS} INFODIR = ${PREFIX}/share/info
-
- 修正したmakefileで
$ sudo make install $ sudo make install-info
;;;時計を表示 (setq display-time-day-and-date t) (display-time) ;;;直前/直後の括弧に対応する括弧を光らせる (show-paren-mode) ;;; mark領域に色付け(好みで有効に) (setq transient-mark-mode t) ;;; タブ幅(setq tab-width 4) ;;; インデント (global-set-key "\C-m" 'newline-and-indent) (global-set-key "\C-j" 'newline) ;;; タブに関するコマンド (setq indent-tabs-mode t) ;;;行番号表示(lispファイル読み込み (autoload 'setnu-mode "setnu" nil t) (global-set-key [f6] 'setnu-mode) ;;aspellの使用を宣言 (setq-default ispell-program-name "aspell") ;; yatexの設定 (setq auto-mode-alist (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist)) (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) (setq load-path (cons (expand-file-name "/usr/local/Cellar/emacssite-lisp/yatex") load-path));homebrewでインストールしたものを使う場合 (setq tex-command "/usr/texbin/platex -kanji=euc" dvi2-command "open -a PictPrinter") (setq YaTeX-kanji-code 3) ; (setq YaTeX-kanji-code nil)の方がいいかもしれない。 ;;kanji-code 1 shift-jis ;;kanji-code 2 iso2022jp ;;kanji-code 3 euc-jp ;;kanji-code 4 utf-8
(defvar YaTeX-dvi2-command-ext-alist '(("[agx]dvi\\|dviout" . ".dvi") ("PictPrinter\\|dviout".".dvi") ("ghostview\\|gv" . ".ps") ("acroread\\|pdf\\|Preview\\|TeXShop\\|Skim\\|evince" . ".pdf")))
また, emacsで行番号を表示できるようにlispファイルを加えて.emacsファイルを編集する.とりあえずF6キーに表示のon/offを割り当てる.以前の記事を参照のこと.http://d.hatena.ne.jp/Askeladd/20100418#1271586327
homebrewでインストールしたemacsを使う場合,行番号表示のelファイルを/usr/local/Cellar/emacs/site-lisp/にコピーしてもそのままでは読み込んでくれない.ロードパスを追加しないとダメだった.
;;ロードパスにhomebrewでインストールしたemacsのsite-lispディレクトリを追加 (setq load-path (append (list (expand-file-name "/usr/local/Cellar/emacs/site-lisp/")) load-path))
参照サイト:
- Mac Wiki http://macwiki.sourceforge.jp/wiki/index.php/CarbonEmacsAndYatex
- PictPrinter+YaTeXでDVIの表示 http://s-manahu.ddo.jp/blog/?p=372
追記:2011-12-19
jbibtexに関する設定は次の記事を参照のこと.
http://d.hatena.ne.jp/Askeladd/20111219