wiki:TeXEnvironment

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

--

TeX 環境

Vine 6

方針

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

TeX Live のバージョン

  • 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

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.

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

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

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

Vine 5

  • tetex-3.0 ベース
    •  ptetex3-20090610
      • PTEX_IN_FILTER = /usr/bin/nkf -w を追加した。
    • xdvik-22.84.14+j1.41 (j1.41は単独パッチがないため、ptetex3-20080616 から port)
    •  dvipdfmx-20090522 (実際はほぼ 20090506 相当)
  •  asymptote (done)
    • asymptote-gui (done): xasy という python の tkinter で書かれた GUI フロントエンドの出来がいまいち
    • asy-mode (done): Emacs モード
  • fmex{7,8,9} におけるグリフ /space 問題
    • tetex-bakoma-cmex789 (done) [non-free]
      • updmap の改変により、各マップファイルを tt2001/fmex{7,8,9}.pfb から bakoma/cmex{7,8,9}.pfb へ変更している
    • tetex-tt2001-fmex789 (done)
      • tt2001/fmex{7,8,9}.pfb の /space を /visiblespace へ置換して、/usr/share/texmf/ ツリーの然るべき場所へ配置している
  • morisawa.map が PS Kanji 名でない件への対処 (done)
    • 別途 ps-morisawa.map(非埋め込み用:ps-morisaw-noEmbed.map; otf パッケージ用: otf-ps-morisawax.map, otf-ps-morisawax-noEmbed.map)として CIDFont 名にしたマップファイルを用意する。
      %% from /usr/share/texmf/fonts/map/dvipdfm/morisawa.map
      
      %%
      %% Morisawa
      %%
      ryumin-l    H	RyuminPro-Light.otf
      ryumin-l-v  V	RyuminPro-Light.otf
      gtbbb-m     H	GothicBBBPro-Medium.otf
      gtbbb-m-v   V	GothicBBBPro-Medium.otf
      futomin-b   H	FutoMinA101Pro-Bold.otf
      futomin-b-v V	FutoMinA101Pro-Bold.otf
      futogo-b    H	FutoGoB101Pro-Bold.otf
      futogo-b-v  V	FutoGoB101Pro-Bold.otf
      jun101-l    H	Jun101Pro-Light.otf
      jun101-l-v  V	Jun101Pro-Light.otf
      
  • フォント
    • map ファイルを dvipdfmx ベースに統一
    • Ryumin-Light, GothicBBB-Medium, FutoMinA101-Bold, FutoGoB101-Bold, Jun101-Light については dvipdfm では埋め込まない、xdvi では xdvi.cfg でそれぞれ以下のパターンで replace。
  • Ryumin-Light -> Mincho-Medium -> fontconfig:Ryumin

Serif

  • GothicBBB-Medium -> Gothic-Midium -> fontconfig:GothicBBB

Sans

  • FutoMinA101-Bold -> FutoMin?-Bold -> fonfconfig:FutoMin

(FutoMin?|DF GokuButoMinCho?|LX P Mincho|HanaMin? Plus|Sazanami Mincho)

  • FutoGoB101-Bold -> FutoGo?-Bold -> fontconfig:FutoGo

(FutoGo?|LX P Gothic UB|VL PGothic)

  • Jun101-Light -> MaruGo?-Medium -> fontconfig:Jun

(Jun101|LX P MaruGothic?|VL PGothic)

  • fontconfig のマッチングは /etc/fonts/conf.d/59-morisawa-font-alias.conf で設定
  • ghostscript とのマッチングも調整が必要?