FreeBSD で yatex を使う
YaTeX(野鳥)は Emacs 上で動作する LaTeX 用の編集モードである。FreeBSD では ports/packages の print/yatex として提供されている。
インストール(管理者が行う)
- Emacs をインストールする。コマンドプロンプトで次のコマンドを実行する。
pkg install emacs - YaTeX をインストールする。コマンドプロンプトで次のコマンドを実行する。
pkg install yatexports からインストールする場合は,コマンドプロンプトで次のコマンドを実行する。
cd /usr/ports/print/yatex make install clean - インストール結果を確認する。コマンドプロンプトで次のコマンドを実行する。
pkg info yatex - LaTeX 本体(TeX Live)が未導入の場合はインストールする。コマンドプロンプトで次のコマンドを実行する。
pkg install texlive-full
設定(一般ユーザが行う)
Emacs の初期化ファイル(~/.emacs.d/init.el または ~/.emacs)に次の行を追加する。
(require 'yatex-startup)
yatex-startup.el は,拡張子 .tex のファイルを yatex-mode で開く設定,ヘルプファイルの指定,タイプセット用コマンド(日本語環境では platex,それ以外では latex)の指定をまとめて行う。このファイルは /usr/local/share/emacs/site-lisp/yatex/ に置かれており,dvipdfmx の利用や yahtml(HTML 編集モード)の設定例も記載されている。
個別に設定する場合は,初期化ファイルに次のように記述する。
(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
(setq auto-mode-alist (cons '("\\.tex$" . yatex-mode) auto-mode-alist))
(setq tex-command "platex")
(setq YaTeX-dvipdf-command "dvipdfmx")
[参考サイト]
- YaTeX 公式サイト
https://www.yatex.org/
- FreeBSD ports print/yatex
https://www.freshports.org/print/yatex/
- TeX Wiki(YaTeX)
https://texwiki.texjp.org/YaTeX