last update: 2013/11/22
CygwinにはTeX環境として、TeXliveのCygwin版が提供されており、それで基本的にことが足ります。
しかし、私はUbuntuなどでもOSのパッケージシステムとは別にTeXliveを管理しています。
そこで、敢えて公式のパッケージを導入しようと思います。
ダウンロードとインストール
# ミラーサーバーを選んでダウンロードします。 # ミラーサーバー一覧はtexwikiのtexliveの項にあります。 $ wget http://ftp.riken.go.jp/pub/CTAN/systems/texlive/tlnet/install-tl-unx.tar.gz # アーカイブを展開します。 $ tar xvf install-tl-unx.tar.gz # 展開したディレクトリに移動します。 # 末尾の数字は違うかもしれません。 $ cd install-tl-20131118/ # インストールコマンドを実行します。 $ ./install-tl --repository http://ring.airnet.ne.jp/pub/text/CTAN/systems/texlive/tlnet/ ##### インストール設定が表示されます。 ======================> TeX Live installation procedure <===================== ======> Letters/digits in <angle brackets> indicate <======= ======> menu items for commands or options <======= Detected platform: Intel x86 with Cygwin <B> binary platforms: 1 out of 21 <S> set installation scheme (scheme-full) <C> customizing installation collections 44 collections out of 45, disk space required: 3423 MB <D> directories: TEXDIR (the main TeX directory): /usr/local/texlive/2013 TEXMFLOCAL (directory for site-wide local files): /usr/local/texlive/texmf-local TEXMFSYSVAR (directory for variable and automatically generated data): /usr/local/texlive/2013/texmf-var TEXMFSYSCONFIG (directory for local config): /usr/local/texlive/2013/texmf-config TEXMFVAR (personal directory for variable and automatically generated data): ~/.texlive2013/texmf-var TEXMFCONFIG (personal directory for local config): ~/.texlive2013/texmf-config TEXMFHOME (directory for user-specific files): ~/texmf <O> options: [ ] use letter size instead of A4 by default [X] allow execution of restricted list of programs via \write18 [X] create all format files [X] install macro/font doc tree [X] install macro/font source tree <V> set up for portable installation Actions: <I> start installation to hard disk <H> help <Q> quit Enter command: ##### 規定値のままで十分だったので、「I」を入力してインストールを開始します。 ## ## 出力中略 ## ##### 最後に以下のように出力されていることを確認して一段落です。 Welcome to TeX Live! Logfile: /usr/local/texlive/2013/install-tl.log ##### 更新ツール「tlmgr」にパスを通します。 $ /usr/local/texlive/2013/bin/i386-cygwin/tlmgr path add
これでおしまい。
ポイント
- LINUX系のインストール手順をまねるのが基本。
- su系は一切いらない。
- 全部初期設定でも大丈夫。
追加設定
texwikiを参考に、extractbbなどの設定を行います。
pmetapostの追加
pmetapostなどを追加します。
$ tlmgr update --self --all $ tlmgr repository add http://www.tug.org/~preining/tlptexlive/ tlptexlive $ tlmgr pinning add tlptexlive "*" $ tlmgr install pmetapost $ tlmgr update --all
extractbbの設定 (:2013/11/22)
extractbbを設定しないと、Windowsでも簡単に作れるpng画像が表示できません。
以下に示す手順は少々鈍くさいですので、スマートで等価な方法でやってもらってかまいません。
##### texmf.cnfを作成します。 # まずTEXMFLOCALを確認します。 $ kpsewhich -var-value TEXMFLOCAL /usr/local/texlive/2013/../texmf-local # そのディレクトリに移動します。 $ cd /usr/local/texlive/texmf-local # web2cというディレクトリを作成します。 $ mkdir web2c # texmf.cnfを新規作成します。 $ touch texmf.cnf
そして、以下のように記入します(texwikiからの引用です)。
shell_escape_commands = \ bibtex,bibtex8,bibtexu,pbibtex,upbibtex,biber,\ kpsewhich,\ makeindex,mendex,texindy,\ mpost,pmpost,upmpost,\ repstopdf,epspdf,extractbb
さて、一通り終わったら次のコマンドを実行します。
mktexlsr
何か設定を弄ったときには
設定を弄ったときには、(実際はファイルが作られたり削除された場合のみで十分なのですが)次のコマンドを実行します。
$ mktexlsr # Make tex "ls -R" という意味です。 # ファイルのありかを示すファイルを再構成します。