wiki:TeXEnvironment/Vine6

Version 3 (modified by munepi, 13 years ago) (diff)

--

TeX 環境 Vine Linux 6

方針

  • ptexlive ベースにしつつ、操作性を変えない。
  • 出来る限り手間をかけない。
  • 無駄に細かすぎるサブパッケージを作らない。

TeX Live のバージョン

TeX Live 2009 を採用。

TeX Live 2009

TeX Live 2010

  • pTeX が upstream に取り込まれた
    • xdvik の日本語化、updmap の KanjiMap? などが未対応

RPM パッケージ

カテゴリ(リポジトリのカテゴリ) パッケージの組み合わせtexlive-collections-* の生成$ du -hsc texmf texmf-distコメント
最小(main)texlive + texlive-common (= texlive-collection-langgerman + texlive-collection-langcyrillic + texlive-collection-xetex + texlive-collection-latexrecommended + texlive-collection-latex + texlive-collection-fontsrecommended + texlive-collection-basic) + jvf + texlive-macros $ tlpdb2rpmspec --minimal-collections 205M teTeX 3.0 + α
標準(plus) + texmacro-otf + texlive-collection-latexextra + texlive-collection-luatex + texlive-collection-pictures + texlive-collection-genericrecommended + texlive-collection-pstricks $ tlpdb2rpmspec --standard-collections 391M task-texlive
最大(plus) + 残り全部 $ tlpdb2rpmspec --full-collections --- task-texlive-full

小さな TeX 環境

teTeX 3.0 + α の構成で多くのユーザをカバーできていた?そうであれば、小さな TeX 環境を提供する価値はある!

  • ネットブックなどの小さなディスク(SSD, USB, SDHC など)に対して、小さな TeX 環境の提供は有効!
  • du -hsc /usr/share/texmf /usr/share/texmf-dist
    • main: apt-get install tetex; 79M
    • plus: apt-get task-tetex; 242M

texmf-dist 以下の解体作業は、パッケージの量が多くて、到底すべて手動で管理しきれていない。

  • tlpdb2rpmspec から texlive-collection-* のみを作成する。
  • texlive2009.iso:/tlpkg/texlive.tlpdb

スキーマ

TeX 環境の構築を簡単にできるようにしておきたい!かつ、Requires: させるパッケージを厳選しておく。

  • task-texlive
  • task-texlive-full

texlive

ptexlive-20100711 ベースにした TeX Live 2009 のパッケージ。

  • e-pTeX: eptex-100420 に対応。
  • luatex: --enable-luatex
  • xetex: --enable-xetex --enable-xdv2pdf --enable-xdvipdfmx
  • dvipdfmx: 別パッケージにせずに同梱。
  • xdvik: 別パッケージにせずに同梱。

ディレクトリ構成は、teTeX のときからと同様。

  • /usr/bin
  • /usr/share/
    • /usr/share/texmf
    • /usr/share/texmf-dist
    • /usr/share/texmf-local
    • /usr/share/texmf-var
    • /usr/share/texmf-config
  • /var/lib/texmf

texlive パッケージが提供されていない arch 上で、texlive をビルドするためには、 一旦 --with firstbuild でビルドした texlive パッケージを作成します。

texlive-2009-Xvl6-src.rpm をダウンロード。
 $ rpmbuild --rebuild --with firstbuild texlive-2009-Xvl6.src.rpm
 $ sudo apt-get install texlive-2009-Xvl6.''arch''.rpm libkpathsea*2009-Xvl6.''arch''.rpm libptexenc*2009-Xvl6.''arch''.rpm

--with firstbuild をはずして、texlive をリビルドします。

 $ rpmbuild --rebuild texlive-2009-Xvl6.src.rpm
 $ sudo apt-get reinstall texlive-2009-Xvl6.''arch''.rpm

vbuilder を使って texlive をリビルドすることもできます。

 $ rpmbuild -bs texlive-vl.spec
 $ vbuilder --version ''version'' --arch ''arch'' install-rpm texlive-sources
 $ vbuilder --version ''version'' --arch ''arch'' build-rpm texlive-2009-Xvl6.src.rpm

texlive-collection-*

texlive2009.iso:/tlpkg/texlive.tlpdb において category Collection をフィールドに持つパッケージです。

tlpdb2rpmspec コマンドを使って、これらの rpm を生成します。

texlive-common

TeX Live パッケージの共通ベースを提供するするための仮想パッケージ。

  • texlive-collection-langgerman
  • texlive-collection-langcyrillic
  • texlive-collection-xetex
  • texlive-collection-latexrecommended
  • texlive-collection-latex
  • texlive-collection-fontsrecommended
  • texlive-collection-basic

texlive-vl.spec で 6babel.sh を実行するために、texlive-common 以上の依存関係が必要。

texlive-sources

TeX Live のアーカイブを展開して固めたパッケージ。

  • /usr/share/texlive-sources
    • texmf
    • texmf-dist
    • source
    • ...

texlive-macros

追加マクロパッケージ。

  • kanjifonts
  • jsclasses
  • jlistings
  • ...

jvf

Vine Linux 用の vf をまとめたパッケージ。

texmacro-otf

otf 1.5.6

xdvi-search-el

TeX の src-special を Emacsen上で使用するための elisp。

texworks

lyx

task-texlive, task-texlive-full

texlive 環境を一通りインストールするための仮想パッケージ。

task-texlive, task-texlive-full に対応する task-texlive-doc, task-texlive-full-doc も提供。

tlpdb2rpmspec

texlive-collection-* の spec ファイルを生成するツールを作成しました。

tlpdb2rpmspec は texlive-vtlpkg パッケージに同梱されています。

http://trac.vinelinux.org/browser/projects/texlive-vtlpkg/trunk

  $ sudo apt-get install texlive-vtlpkg

初期設定

/usr/share/texlive-vtlpkg/dot.vtlpkg.conf を ${HOME}/.vtlpkg.conf へコピーして、必要な設定をします。

## 
## texlive-vtlpkg configuration file
## 
## This configuration is read at the startup of texlive-vtlpkg. 

## set your vendor
## default: RPM_VENDOR="Project Vine"
RPM_VENDOR="Project Vine"

## set your distribution
## default: RPM_DISTRIBUTION="Vine Linux"
RPM_DISTRIBUTION="Vine Linux"

## set your name and your e-mail address
## default: RPM_GPG_NAME="YOUR NAME <your@email.address>"
RPM_GPG_NAME=""

## set your packager id
## default: RPM_PACKAGER=your_id
RPM_PACKAGER=

## set the top of your rpm directory
## default: RPM_TOPDIR=${HOME}/rpm
RPM_TOPDIR=${HOME}/rpm

## end of file

ヘルプ

$ tlpdb2rpmspec 
Usage:	tlpdb2rpmspec [option] [pkgname]

This script generates a rpm spec file for CTAN and collection-* packages of TeX Live. 

Options:
	--name:			return [pkgname]
	--category:		return the category of [pkgname]
	--revision:		return the revision of [pkgname]
	--depend:		return dependencies of [pkgname]
	--shortdesc:		return the short description of [pkgname]
	--longdesc:		return the description of [pkgname]
	--execute:		return post processe of [pkgname]
	--catalogue-ctan:	return the locate of [pkgname]
	--catalogue-date:	return the last update of [pkgname]
	--catalogue-license:	return the license of [pkgname]
	--catalogue-version:	return the version of [pkgname]
	--filelist:		return the filelist of [pkgname]
	--help:			show this help

Supoort collections-* packages: 
collection-basic
collection-bibtexextra
collection-binextra
(snip)
collection-xetex

使い方

例えば、collection-basic の texlive-collection-basic-vl.spec を生成したい場合は、以下を実行します。

$ tlpdb2rpmspec collection-basic > texlive-collection-basic-vl.spec

rpmbuild -ba texlive-collection-basic-vl.spec を実行すると、 texlive-collection-basic-2009-Xvl6.{noarch,src}.rpm, texlive-collection-basic-doc-2009-Xvl6.src.rpm がビルドされます。

各カテゴリ別に texlive-collection-* を生成したい場合は、以下を実行することにより、rpmbuild まで実行します。

最小(main):$ tlpdb2rpmspec --minimal-collections
標準(plus):$ tlpdb2rpmspec --standard-collections
最大?(plus):$ tlpdb2rpmspec --full-collections

リポジトリ内の tetex -> texlive の解決すべきパッケージ

他のパッケージとのファイル競合

  • tipa -> obsolete done.
  • mathabx -> mathabx-type1 として abxtype1-YYYYMMDD.zip から提供される Type1 のみに re-package done.
  • psutils -> texlive 側で /man/ の衝突を除去 done.
  • t1utils -> texlive 側で /man/ の衝突を除去 done.
  • asymptote -> texlive 側で衝突を除去 done.
  • ...

apt-cache whapdepends tetex

  • tipa: obsolete <- collection-fontsrecommended (tipa) done.
  • ec-fonts-mftraced: obsolete <- collection-fontsextra (cm-super) done.
  • tgif2tex: R: texlive done.
  • mftrace.ARCH: R: texlive done.
  • lyx.ARCH: R: texlive done.
  • linuxdoc-tools.ARCH: R: texlive done.
  • hevea.ARCH: R: texlive done.
  • geany-plugins-geanylatex: toshi_kd2 -san done.
  • latex2html: done.

TeX 関係の /usr/bin 以下にあるシンボリックリンク

各シンボリックリンクは、実ファイル・パスを含むパッケージに吸収させる。

texlive-2009-18vl6 から 2009-19vl6 への更新では、 以下のチェックスクリプトを利用して、 然るべき texlive-collection-<package> にいれこんだ。

#!/bin/bash

rpm -q --quiet task-texlive-full-doc
[ $? -ne 0 ] && \
    echo "Usage: $(basename $0) > result.txt" && \
    echo "please install task-texlive-full-doc" && \
    exit 1

(
    cd /usr/bin
    for lnk in $(rpm -ql texlive | grep /usr/bin); do
	[ -L $lnk ] || continue
	rlnk=$(readlink $lnk | sed -e "s|../|/usr/|")
	#echo "$(rpm -qf $rlnk),$lnk,$rlnk,$(head -n 1 $lnk)"
	echo "$(rpm -qf --qf '%{name}' $rlnk),$lnk,$rlnk"
    done
) | sort | grep -v texlive-2009

exit

実行結果

texlive-collection-binextra,/usr/bin/dviasm,/usr/share/texmf-dist/scripts/dviasm/dviasm.py
texlive-collection-binextra,/usr/bin/findhyph,/usr/share/texmf-dist/scripts/findhyph/findhyph
texlive-collection-binextra,/usr/bin/fragmaster,/usr/share/texmf-dist/scripts/fragmaster/fragmaster.pl
texlive-collection-binextra,/usr/bin/latex2man,/usr/share/texmf-dist/scripts/latex2man/latex2man
texlive-collection-binextra,/usr/bin/latexmk,/usr/share/texmf-dist/scripts/latexmk/latexmk.pl
texlive-collection-binextra,/usr/bin/listings-ext.sh,/usr/share/texmf-dist/scripts/listings-ext/listings-ext.sh
texlive-collection-binextra,/usr/bin/mkjobtexmf,/usr/share/texmf-dist/scripts/mkjobtexmf/mkjobtexmf.pl
texlive-collection-binextra,/usr/bin/pdfcrop,/usr/share/texmf-dist/scripts/pdfcrop/pdfcrop.pl
texlive-collection-binextra,/usr/bin/pkfix,/usr/share/texmf-dist/scripts/pkfix/pkfix.pl
texlive-collection-binextra,/usr/bin/pkfix-helper,/usr/share/texmf-dist/scripts/pkfix-helper/pkfix-helper
texlive-collection-binextra,/usr/bin/purifyeps,/usr/share/texmf-dist/scripts/purifyeps/purifyeps
texlive-collection-binextra,/usr/bin/texcount,/usr/share/texmf-dist/scripts/texcount/texcount.pl
texlive-collection-binextra,/usr/bin/texdiff,/usr/share/texmf-dist/scripts/texdiff/texdiff
texlive-collection-binextra,/usr/bin/texdirflatten,/usr/share/texmf-dist/scripts/texdirflatten/texdirflatten
texlive-collection-binextra,/usr/bin/texloganalyser,/usr/share/texmf-dist/scripts/texloganalyser/texloganalyser
texlive-collection-context,/usr/bin/context,/usr/share/texmf-dist/scripts/context/stubs/unix/context
texlive-collection-context,/usr/bin/ctxtools,/usr/share/texmf-dist/scripts/context/stubs/unix/ctxtools
texlive-collection-context,/usr/bin/luatools,/usr/share/texmf-dist/scripts/context/lua/luatools.lua
texlive-collection-context,/usr/bin/makempy,/usr/share/texmf-dist/scripts/context/stubs/unix/makempy
texlive-collection-context,/usr/bin/mpstools,/usr/share/texmf-dist/scripts/context/stubs/unix/mpstools
texlive-collection-context,/usr/bin/mptopdf,/usr/share/texmf-dist/scripts/context/stubs/unix/mptopdf
texlive-collection-context,/usr/bin/mtxrun,/usr/share/texmf-dist/scripts/context/lua/mtxrun.lua
texlive-collection-context,/usr/bin/mtxtools,/usr/share/texmf-dist/scripts/context/stubs/unix/mtxtools
texlive-collection-context,/usr/bin/pdftools,/usr/share/texmf-dist/scripts/context/stubs/unix/pdftools
texlive-collection-context,/usr/bin/pstopdf,/usr/share/texmf-dist/scripts/context/stubs/unix/pstopdf
texlive-collection-context,/usr/bin/rlxtools,/usr/share/texmf-dist/scripts/context/stubs/unix/rlxtools
texlive-collection-context,/usr/bin/runtools,/usr/share/texmf-dist/scripts/context/stubs/unix/runtools
texlive-collection-context,/usr/bin/texexec,/usr/share/texmf-dist/scripts/context/stubs/unix/texexec
texlive-collection-context,/usr/bin/texfont,/usr/share/texmf-dist/scripts/context/stubs/unix/texfont
texlive-collection-context,/usr/bin/texmfstart,/usr/share/texmf-dist/scripts/context/ruby/texmfstart.rb
texlive-collection-context,/usr/bin/textools,/usr/share/texmf-dist/scripts/context/stubs/unix/textools
texlive-collection-context,/usr/bin/texutil,/usr/share/texmf-dist/scripts/context/stubs/unix/texutil
texlive-collection-context,/usr/bin/tmftools,/usr/share/texmf-dist/scripts/context/stubs/unix/tmftools
texlive-collection-context,/usr/bin/xmltools,/usr/share/texmf-dist/scripts/context/stubs/unix/xmltools
texlive-collection-fontutils,/usr/bin/afm2afm,/usr/share/texmf-dist/scripts/fontools/afm2afm
texlive-collection-fontutils,/usr/bin/autoinst,/usr/share/texmf-dist/scripts/fontools/autoinst
texlive-collection-fontutils,/usr/bin/cmap2enc,/usr/share/texmf-dist/scripts/fontools/cmap2enc
texlive-collection-fontutils,/usr/bin/epstopdf,/usr/share/texmf-dist/scripts/epstopdf/epstopdf.pl
texlive-collection-fontutils,/usr/bin/font2afm,/usr/share/texmf-dist/scripts/fontools/font2afm
texlive-collection-fontutils,/usr/bin/mkt1font,/usr/share/texmf-dist/scripts/accfonts/mkt1font
texlive-collection-fontutils,/usr/bin/ot2kpx,/usr/share/texmf-dist/scripts/fontools/ot2kpx
texlive-collection-fontutils,/usr/bin/pfm2kpx,/usr/share/texmf-dist/scripts/fontools/pfm2kpx
texlive-collection-fontutils,/usr/bin/showglyphs,/usr/share/texmf-dist/scripts/fontools/showglyphs
texlive-collection-fontutils,/usr/bin/vpl2ovp,/usr/share/texmf-dist/scripts/accfonts/vpl2ovp
texlive-collection-fontutils,/usr/bin/vpl2vpl,/usr/share/texmf-dist/scripts/accfonts/vpl2vpl
texlive-collection-langgreek,/usr/bin/mkgrkindex,/usr/share/texmf-dist/scripts/mkgrkindex/mkgrkindex
texlive-collection-langindic,/usr/bin/ebong,/usr/share/texmf-dist/scripts/bengali/ebong.py
texlive-collection-latex,/usr/bin/pdfatfi,/usr/share/texmf-dist/scripts/oberdiek/pdfatfi.pl
texlive-collection-latexextra,/usr/bin/makeglossaries,/usr/share/texmf-dist/scripts/glossaries/makeglossaries
texlive-collection-latexextra,/usr/bin/pdfannotextractor,/usr/share/texmf-dist/scripts/pax/pdfannotextractor.pl
texlive-collection-latexextra,/usr/bin/pdfthumb,/usr/share/texmf-dist/scripts/ppower4/pdfthumb.tlu
texlive-collection-latexextra,/usr/bin/perltex,/usr/share/texmf-dist/scripts/perltex/perltex
texlive-collection-latexextra,/usr/bin/ppower4,/usr/share/texmf-dist/scripts/ppower4/ppower4.tlu
texlive-collection-latexextra,/usr/bin/ps4pdf,/usr/share/texmf-dist/scripts/pst-pdf/ps4pdf
texlive-collection-latexextra,/usr/bin/splitindex,/usr/share/texmf-dist/scripts/splitindex/perl/splitindex.pl
texlive-collection-latexextra,/usr/bin/svn-multi,/usr/share/texmf-dist/scripts/svn-multi/svn-multi.pl
texlive-collection-latexextra,/usr/bin/vpe,/usr/share/texmf-dist/scripts/vpe/vpe.pl
texlive-collection-latexrecommended,/usr/bin/thumbpdf,/usr/share/texmf-dist/scripts/thumbpdf/thumbpdf.pl
texlive-collection-pictures,/usr/bin/cachepic,/usr/share/texmf-dist/scripts/cachepic/cachepic.tlu
texlive-collection-pictures,/usr/bin/epspdf,/usr/share/texmf-dist/scripts/epspdf/epspdf
texlive-collection-pictures,/usr/bin/epspdftk,/usr/share/texmf-dist/scripts/epspdf/epspdftk
texlive-collection-pictures,/usr/bin/fig4latex,/usr/share/texmf-dist/scripts/fig4latex/fig4latex
texlive-collection-pstricks,/usr/bin/pst2pdf,/usr/share/texmf-dist/scripts/pst2pdf/pst2pdf.pl
texlive-collection-science,/usr/bin/ulqda,/usr/share/texmf-dist/scripts/ulqda/ulqda.pl

texlive パッケージのテスト事項

dvipdfmx: いくつかの画像形式の埋め込みをチェック

luatex: zlib のバージョンチェック