ubuntu 8.10にasymptote1.66をインストールする方法

asympoteはデフォルトのパッケージではバージョンが古い。1.43だ。1.66をコンパイルする。

asympote1.66のインストール

$ wget http://downloads.sourceforge.net/asymptote/asymptote-1.66.src.tgz
$ wget http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.1.tar.gz
$ ./configure
$ (cd /usr/local/bin; sudo ln -s `which texi2pdf` pdf)
$ (cd doc;mv Makefile Makefile.orig; sed 1s/xasy.1x// Makefile.orig > Makefile )
$ sudo make install

configureがubuntu8.10ではきちんと動かない。
中見てないのだがおそらくtexi->pdfのコマンド判別と xasy.1xの生成方法のところにバグがある。
これが理由でdebianには1.66が入っていないのだろうか…

latex周りをインストール

これないと図面に数式が入れられない。

$ sudo aptitude install dvipdfmx libsigsegv0 lmodern tex-common texlive-base texlive-base-bin texlive-base-bin-doc texlive-common texlive-doc-base texlive-generic-recommended texlive-latex-base texlive-latex-base-doc texlive-pstricks texlive-pstricks-doc

テスト

チュートリアルに載ってて1.43では実行できなかった以下をやってみる。

 import three;currentprojection=orthographic(5,4,2);size(5cm);size3(3cm,3cm,3cm);draw(unitbox);dot(unitbox,red);label("$O$",(0,0,0),NW);label("(1,0,0)",(1,0,0),S);label("(0,1,0)",(0,1,0),E);label("(0,0,1)",(0,0,1),Z);

うまく動いた。*1
しかし、gvのフォントとか色嫌いだなぁ。設定したいw

*1:fotolifeコマンドが綺麗に動いてうれしいな。