wiki:TeXEnvironment

Version 73 (modified by munepi, 12 years ago) (diff)

--

TeX 環境

TeX 環境 Vine Linux 7

次期 TeX Live のバージョンは、TeX Live 2011 を採用する予定。 TeX Live 2011 をベースに、必要に応じて有用な機能などを取り込み、Vine Linux 向けにカスタマイズする予定。

また、以下の機能の取り込みも検討する。

  • ptex の SyncTeX への対応
  • 組版エンジンが ptex である "platex" も使えるようにしておく
  • upTeX への対応
  •  LuaTeX-ja の成果を取り込み

方針

  •  TeX Live tlptexlive ベースにしつつ、操作性を変えない。
  • できるかぎり、パッケージングに手間をかけない。
  • 無駄に細かすぎるサブパッケージを作らない。

TeX Live のバージョン

2011-11-27 現時点の VineSeed に、TeX Live 2011 を採用。

TeX Live 2012

  • upTeX が upstream に取り込まれた
  • updmap が KanjiMap に対応した

TeX Live 2011

tlptexlive リポジトリ

 tlptexliveリポジトリ - ptexlive Wiki を組み合わせることで、TeX Live 2011 に不足している日本語対応周りが補足される。

  • pxdvi
  • pmetapost
  • OTF パッケージ

TeX Live 2010

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

TeX Live 2009

RPM パッケージ

カテゴリ(リポジトリのカテゴリ) パッケージの組み合わせtexlive-collections-* の生成コメント
最小(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 + texlive-collection-langcjk) + jvf + texlive-macros $ tlpdb2rpmspec --minimal-collections
標準(plus) + texmacro-otf + texlive-collection-latexextra + texlive-collection-luatex + texlive-collection-pictures + texlive-collection-genericrecommended + texlive-collection-pstricks $ tlpdb2rpmspec --standard-collections task-texlive
最大(plus) + 残り全部 $ tlpdb2rpmspec --full-collections task-texlive-full

texlive

Vine Linux 向けの TDS は、 teTeX-3.0, TeX Live 2009 から変わらずに、以下のような階層になっています。

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

texmf

/usr/share/texmf の内容は、texlive-sources パッケージに同梱されている /usr/share/texlive-sources/texmf に、 texlive パッケージをビルドしたときの texmf を上書きしています。

vine.map

(未修正)

tlptexlive の map ファイルを優先にして、 Vine Linux 向けの vine.map を追加しています。

ビルド

vbuilder を使って texlive パッケージをリビルドします。

$ vbuilder --version ''version'' --arch ''arch'' install-rpm texlive-sources
$ vbuilder --version ''version'' --arch ''arch'' build-rpm texlive-2011-Xvl7.src.rpm

texlive-collection-*

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

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

texlive-common

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

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

texlive-sources

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

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

texlive-macros

追加マクロパッケージ。

  • kanjifonts
  • jsclasses
  • jlistings

jvf

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

pTeX に必要な tfm や vf は、TeX Live 2011 の texmf-dist 以下にすでに格納されていますが、 jvf パッケージの方を優先するようにしています。

texmacro-otf

tlptexlive に合わせて、otf 1.7bX の開発版にしました。

xdvi-search-el

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

texworks

TeX Live に標準搭載されている TeX 環境総合エディタです。

task-texlive, task-texlive-full

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

task-texlive, task-texlive-full に対応する task-texlive-doc, task-texlive-full-doc もそれぞれ提供しています。

TeX Live 2011 のインストール過程

  1. texlive %pretrans を用いて、TeX Live 2009 から 2011 への移行処理
  2. texlive-common の Requires に指定しているパッケージを配置
  3. updmap.cfg に対して、Requires に依存されているパッケージに含まれているフォントマップを有効
  4. texlive-common %posttrans で updmap-sysfmtutil-sys --all を実行

TeX Live 2009 から 2011 への移行処理

texlive パッケージの %pretrans で以下のような texmf-* の移行処理をしています。

%pretrans
rpm -q texlive | grep -q 2009
[ $? -eq 1 ] && exit 0
## upgrade TeX Live from 2009 to 2011
_trans_time=$(date +%Y%m%d)
echo "Running transitional process of your TeX system ... "
for dir in %{texmf}-var %{texmf}-config; do
    _trans_dir=${dir}.${_trans_time}.rpmorig
    [ -d ${_trans_dir}.old ] && \
        echo -n "  " && \
        echo "Found ${_trans_dir}.old: " && \
        echo -n "    " && \
        %__rm -rvf ${_trans_dir}.old
    [ -d ${_trans_dir} ] && \
        echo -n "  " && \
        echo "Found ${_trans_dir}: " && \
        echo -n "    " && \
        %__mv -v ${_trans_dir} ${_trans_dir}.old
    [ -d ${dir} ] && \
        echo -n "  " && \
        echo "Found ${dir}: " && \
        echo -n "    " && \
        %__mv -v ${dir} ${_trans_dir}
done
echo "done."

しかし、以前の TeX Live 2009 が入っている途中段階だと、 fmtutil-sys --all が失敗するので、 texlive-common パッケージの %posttrans で最終的な updmap-sysfmtutil-sys を実行しています。

%posttrans

(snip)

echo -n "    "
echo -n "Running updmap ... " && %{exec_updmap} >/dev/null 2>&1 && echo "done."
rm -f %{texmf}/updmap.lock
echo -n "    "
echo -n "Running fmtutil ... " && %{exec_fmtutil} && echo "done."

exit 0

TeX Live 2011 への更新による対応が必要なパッケージ

  • dvipng: dvipng パッケージを活かす?、または、texlive 側に取り込むか?
  • asymptote: texlive 側との調整が必要
  • tlmgr: texlive パッケージから取り除く予定
  • mathabx-type1: orphaned/obsoletes へ移動
  • evince-dvi: BR: libkpathsea-devel >= 2011 でリビルド
  • lcdf-typetools: BR: libkpathsea-devel >= 2011 でリビルド

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

texlive パッケージをビルドしたときに作られる /usr/bin 以下の各シンボリックリンクは、 実ファイル・パスを含むパッケージ texlive-collection-<package> にそれぞれ吸収させる。

チェックスクリプト projects/specs/trunk/t/texlive/__usr_bin_symlink.sh を利用して、 然るべき texlive-collection-<package> に入れ込みました。

実行結果:

texlive-collection-bibtexextra,/usr/bin/bibexport,/usr/share/texmf-dist/scripts/bibexport/bibexport.sh
texlive-collection-binextra,/usr/bin/arlatex,/usr/share/texmf-dist/scripts/bundledoc/arlatex
texlive-collection-binextra,/usr/bin/bundledoc,/usr/share/texmf-dist/scripts/bundledoc/bundledoc
texlive-collection-binextra,/usr/bin/de-macro,/usr/share/texmf-dist/scripts/de-macro/de-macro
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/installfont-tl,/usr/share/texmf-dist/scripts/installfont/installfont-tl
texlive-collection-binextra,/usr/bin/latex2man,/usr/share/texmf-dist/scripts/latex2man/latex2man
texlive-collection-binextra,/usr/bin/latexdiff,/usr/share/texmf-dist/scripts/latexdiff/latexdiff.pl
texlive-collection-binextra,/usr/bin/latexdiff-vc,/usr/share/texmf-dist/scripts/latexdiff/latexdiff-vc.pl
texlive-collection-binextra,/usr/bin/latexmk,/usr/share/texmf-dist/scripts/latexmk/latexmk.pl
texlive-collection-binextra,/usr/bin/latexrevise,/usr/share/texmf-dist/scripts/latexdiff/latexrevise.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/pdf180,/usr/share/texmf-dist/scripts/pdfjam/pdf180
texlive-collection-binextra,/usr/bin/pdf270,/usr/share/texmf-dist/scripts/pdfjam/pdf270
texlive-collection-binextra,/usr/bin/pdf90,/usr/share/texmf-dist/scripts/pdfjam/pdf90
texlive-collection-binextra,/usr/bin/pdfbook,/usr/share/texmf-dist/scripts/pdfjam/pdfbook
texlive-collection-binextra,/usr/bin/pdfcrop,/usr/share/texmf-dist/scripts/pdfcrop/pdfcrop.pl
texlive-collection-binextra,/usr/bin/pdfflip,/usr/share/texmf-dist/scripts/pdfjam/pdfflip
texlive-collection-binextra,/usr/bin/pdfjam,/usr/share/texmf-dist/scripts/pdfjam/pdfjam
texlive-collection-binextra,/usr/bin/pdfjam-pocketmod,/usr/share/texmf-dist/scripts/pdfjam/pdfjam-pocketmod
texlive-collection-binextra,/usr/bin/pdfjam-slides3up,/usr/share/texmf-dist/scripts/pdfjam/pdfjam-slides3up
texlive-collection-binextra,/usr/bin/pdfjam-slides6up,/usr/share/texmf-dist/scripts/pdfjam/pdfjam-slides6up
texlive-collection-binextra,/usr/bin/pdfjoin,/usr/share/texmf-dist/scripts/pdfjam/pdfjoin
texlive-collection-binextra,/usr/bin/pdfnup,/usr/share/texmf-dist/scripts/pdfjam/pdfnup
texlive-collection-binextra,/usr/bin/pdfpun,/usr/share/texmf-dist/scripts/pdfjam/pdfpun
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/sty2dtx,/usr/share/texmf-dist/scripts/sty2dtx/sty2dtx.pl
texlive-collection-binextra,/usr/bin/texcount,/usr/share/texmf-dist/scripts/texcount/texcount.pl
texlive-collection-binextra,/usr/bin/texdef,/usr/share/texmf-dist/scripts/texdef/texdef.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-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-htmlxml,/usr/bin/ht,/usr/share/texmf-dist/scripts/tex4ht/ht.sh
texlive-collection-htmlxml,/usr/bin/htcontext,/usr/share/texmf-dist/scripts/tex4ht/htcontext.sh
texlive-collection-htmlxml,/usr/bin/htlatex,/usr/share/texmf-dist/scripts/tex4ht/htlatex.sh
texlive-collection-htmlxml,/usr/bin/htmex,/usr/share/texmf-dist/scripts/tex4ht/htmex.sh
texlive-collection-htmlxml,/usr/bin/httex,/usr/share/texmf-dist/scripts/tex4ht/httex.sh
texlive-collection-htmlxml,/usr/bin/httexi,/usr/share/texmf-dist/scripts/tex4ht/httexi.sh
texlive-collection-htmlxml,/usr/bin/htxelatex,/usr/share/texmf-dist/scripts/tex4ht/htxelatex.sh
texlive-collection-htmlxml,/usr/bin/htxetex,/usr/share/texmf-dist/scripts/tex4ht/htxetex.sh
texlive-collection-htmlxml,/usr/bin/mk4ht,/usr/share/texmf-dist/scripts/tex4ht/mk4ht.pl
texlive-collection-langgreek,/usr/bin/mkgrkindex,/usr/share/texmf-dist/scripts/mkgrkindex/mkgrkindex
texlive-collection-langindic,/usr/bin/ebong,/usr/share/texmf-dist/scripts/ebong/ebong.py
texlive-collection-latex,/usr/bin/mptopdf,/usr/share/texmf-dist/scripts/context/perl/mptopdf.pl
texlive-collection-latex,/usr/bin/pdfatfi,/usr/share/texmf-dist/scripts/oberdiek/pdfatfi.pl
texlive-collection-latexextra,/usr/bin/authorindex,/usr/share/texmf-dist/scripts/authorindex/authorindex
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.pl
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-luatex,/usr/bin/mkluatexfontdb,/usr/share/texmf-dist/scripts/luaotfload/mkluatexfontdb.lua
texlive-collection-music,/usr/bin/musixflx,/usr/share/texmf-dist/scripts/musixtex/musixflx.lua
texlive-collection-music,/usr/bin/musixtex,/usr/share/texmf-dist/scripts/musixtex/musixtex.lua
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.rb
texlive-collection-pictures,/usr/bin/epspdftk,/usr/share/texmf-dist/scripts/epspdf/epspdftk.tcl
texlive-collection-pictures,/usr/bin/fig4latex,/usr/share/texmf-dist/scripts/fig4latex/fig4latex
texlive-collection-pictures,/usr/bin/mathspic,/usr/share/texmf-dist/scripts/mathspic/mathspic.pl
texlive-collection-pstricks,/usr/bin/pst2pdf,/usr/share/texmf-dist/scripts/pst2pdf/pst2pdf
texlive-collection-science,/usr/bin/ulqda,/usr/share/texmf-dist/scripts/ulqda/ulqda.pl

テスト事項

texlive

so name のチェック

people/munepi/scripts/check-texlive-binaries.sh を実行する。

Babel

texmacro-otf:

people/munepi/documents/11/beefplate.tex を platex でタイプセットして、pxdvi, dvipdfmx, dvips でそれぞれ正しくフォントが表示・埋めこまれているかを確認する。

$ platex beefplate
$ pxdvi beefplate
$ dvipdfmx -r 8000 beefplate && acroread beefplate.pdf
$ dvips -Ppdf beefplate && ps2pdf beefplate.ps beefplate.pdf && acroread beefplate.pdf

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

people/munepi/scripts/chkdvipdfmx.sh を実行して、すべての PDF ファイルで画像が埋め込まれていることを確認する。