AUCTex のインストールと設定
(Carbon Emacs & NTEmacs)

emacs の、Tex 編集用パッケージ、AUCTex のインストールと設定を説明しています。

  1. まえがき
  2. インストール
  3. 設定
  4. 使いかた

関連するページはこちら、

MacOSX & Cygwin on Windows のソフトの事

CarbonEmacs と、NTEmacs のページは此方


1. まえがき

AUCTex 使ってます。


2. インストール

2.1. References

Homepage
http://savannah.gnu.org/projects/auctex
Source
ftp://ftp.gnu.org/pub/gnu/auctex

2.2. make & install

これは、./conigure —> make の普通の流れでOK。

MacOSX 用には

$ ./configure --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs --with-lispdir=/Applications/Emacs.app/Contents/Resources/share/emacs/site-lisp/

Cygwin 用には

$ ./configure --with-emacs=/usr/local/emacs/22.0.90/bin/emacs.exe --with-lispdir=/usr/local/emacs/site-lisp/ --with-texmf-dir=/usr/local/teTex/share/texmf

その後

$ make
$ sudo make install

で、お終い。


3. 設定

では、.emacs の設定です。1


3.1. 読み込み

(require 'tex-site)
(require 'tex)

3.2. 日本語 TeX 用の設定

;; 日本語 TeX 用の設定
(setq TeX-default-mode 'japanese-Latex-mode)

;; jsarticle を標準のクラスにする (デフォールトは jarticle)
(setq japanese-LaTeX-default-style "jsarticle")

(setq japanese-LaTeX-command-default "pLaTeX")

(setq kinsoku-limit 10)

(setq LaTeX-indent-level 4)
(setq LaTeX-item-indent 2)


3.3. View を、dvipdfmx + AdobeReader で

;; View は、dvipdfmx で、pdf file を作って、Adobe Reader で閲覧
(add-to-list 'TeX-output-view-style
             '("^dvi$" "." "dvipdfmx %dS %d && open %s.pdf"))


4. 使いかた

Tex file を読み込んで、適当に、編集オプションを選んで、

TeX-command-master (c-c c-c にバインドされています)

すると、pLaTex が起動して、dvi file が作られるので、もう一度

TeX-command-master (c-c c-c にバインドされています)

で、View が立ち上がります。2


1. 実際には、メンテし易いように、~/.emacs/.tex.el として、~/.emacs.el から、読みこんでいます。

2. の設定だと、dvipdfmx で、pdf file を作り、Adobe Reader で、確認しています。