「TeX Live」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
216行目: 216行目:
 
=== 更新時に "formats not generated" というエラー ===
 
=== 更新時に "formats not generated" というエラー ===
   
  +
{{Bug|16467}} を参照してください。(実験的な ''LuaTeX'' エンジンを使用しない場合、これは無視できることに注意してください。) この状況は典型的に、ハイフネーションパターンの設定ファイル {{ic|language.def}} と {{ic|language.dat}} の両方/一方に、以前のリリースの {{Pkg|texlive-core}} のファイルへの参照が含まれている場合に発生します (特に、ファイル名が頻繁に変更される、ドイツ語の最新の実験的なハイフネーションパターン)。現在、それらは {{ic|dehyph{n,t}-x-2009-06-19.tex}} を指しているはずです。
See {{Bug|16467}}. (Note that if you do not use the experimental engine ''LuaTeX'', you can ignore this.) This situation typically occurs when the configuration files {{ic|language.def}} and/or {{ic|language.dat}} for hyphenation patterns contain references to files from earlier releases of {{Pkg|texlive-core}}, in particular to the latest experimental hyphenation patterns for German, whose file name changes frequently. Currently they should point to {{ic|dehyph{n,t}-x-2009-06-19.tex}}.
 
   
To solve this, you need to either remove these files: {{ic|/etc/texmf/tex/generic/config/language.<nowiki>{def,dat}</nowiki>}} or update them using the newest version under: {{ic|/usr/share/texmf/tex/generic/config/language.<nowiki>{def,dat}</nowiki>}} and then run
+
これを解決するには、ファイル {{ic|/etc/texmf/tex/generic/config/language.<nowiki>{def,dat}</nowiki>}} を削除するか、{{ic|/usr/share/texmf/tex/generic/config/language.<nowiki>{def,dat}</nowiki>}} の最新のバージョンを使うように更新し、以下を実行する必要があります:
   
 
# fmtutil-sys --missing
 
# fmtutil-sys --missing
224行目: 224行目:
 
=== tlmgr を texliveonfly で動作させる ===
 
=== tlmgr を texliveonfly で動作させる ===
   
The easiest way to get ''tlmgr'' working with ''texliveonfly'' is to make a script {{ic|tlmgr}} in your {{ic|$PATH}} (instead of making it an alias) containing:
+
''tlmgr'' ''texliveonfly'' で動作させる最も簡単な方法は、({{ic|tlmgr}} をエイリアスにせずに) 以下の内容を含むスクリプト {{ic|tlmgr}} {{ic|$PATH}} 内に作成することです:
   
 
#!/bin/sh
 
#!/bin/sh
 
/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode "$@"
 
/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode "$@"
   
  +
こうする理由は、''textliveonfly'' が Python スクリプトであり、エイリアスを処理できないからです。
This is because ''textliveonfly'' is a Python script which cannot handle aliases.
 
   
 
== 代替 ==
 
== 代替 ==

2022年12月30日 (金) 22:11時点における版

この記事あるいはセクションは翻訳の途中です。
ノート: 翻訳が古くなっているので、英語版を参照するか、記事の更新が必要です。 (議論: トーク:TeX Live#)

関連記事

Wikipedia により:

TeX Live は、TeX 植字システムのためのフリーソフトウェア配布で、主要な TeX 関連プログラム、マクロパッケージ、およびフォントを含んでいます。

TeX Live には tex(1)pdftex(1) プログラム、LaTeXConTeXt TeX マクロパッケージ、XeTeXLuaTeX TeX エンジンが含まれています。

インストール

  • texlive-most グループには、ほとんどの Tex Live パッケージが含まれています。
    • texlive-core は必須のパッケージであり、上流の medium インストールスキームに基づいています (その他のパッケージは全て上流のコレクションに基づいています)。このパッケージには、mktexlsrfmtutilupdmap を自動化する pacman フックが含まれています。
    • texlive-bin にはバイナリとライブラリが含まれています (texlive-core の依存パッケージです)。
    • texlive-latexextra には、polyglossiaamsmathgraphicx などの便利なパッケージが多く含まれています。
  • texlive-lang グループには、非ラテン文字の言語のための文字セットと機能を提供するパッケージが含まれています。
    • texlive-langextra は、アフリカの言語、アラビア語、アルメニア語、クロアチア語、ヘブライ語、インド語群、モンゴル語、チベット語、ベトナム語の言語サポートを提供します。
  • texlive-bibtexextra には、追加の BibTex と BibLaTeX スタイル、および参考文献データベースが含まれています。
  • texlive-fontsextra には、追加のフォントが含まれています (LaTeX Font Catalogue で見られます)。
  • biber は、BibLaTex のための代替の参考文献処理バックエンドを提供します。
  • texlive-latexindent-metaAUR メタパッケージは、latexindent を実際に使うために必要になるすべての依存パッケージを提供します。

それぞれの texlive- パッケージにどの CTAN パッケージが含まれているか調べるには、/var/lib/texmf/arch/installedpkgs/<package>_<revnr>.pkgs のファイルを見てください。

ノート: Tex Live に含まれている一部のツールとユーティリティは、ghostscriptperlpythonruby に依存しています。詳細は、それぞれのパッケージの任意の依存パッケージを見てください。
ヒント: Tex エディタをインストールすると良いかもしれません。

tllocalmgr

tllocalmgrAUR によって提供されている tllocalmgr ユーティリティは、pacman パッケージとして CTAN からパッケージをインストールできるようにします。詳細は 使用方法 (-h) を見てください。

tlmgr

ノート:
  • texlive-coreTEXMFDIST 内に tlmgr スクリプトを提供しますが、これは壊れています。以下で説明されているように修正するか、あるいは代わりに tllocalmgr を使用することができます。
  • texconfig(1) コマンドは、部分的に tlmgr に依存しているため、ほぼ壊れています (FS#59094)。texconfig のインタラクティブモードには dialog が必要です。
この記事またはセクションの正確性には問題があります。
理由: 以下の修正は texlive-core パッケージに組み込まれるべきです。TEXMFDIST 内のファイルを編集しても、パッケージをアップグレードすると変更が上書きされてしまいます。 (議論: トーク:TeX Live#)

tlmgr ユーティリティは、CTAN からパッケージをインストール、アップデートする標準的な方法です。以下のように小さな修正が必要となります:

まず、TEXMFDIST/scripts/texlive/tlmgr.pl を編集して $Master = "$Master/../..";$Master = "${Master}/../../.."; に置き換えてください。パスのプレフィックス TEXMFDIST は、事前に定義された環境変数ではなく、この記事の以下で定義されたものです。このプレフィックスは正しい値に置き換えてください。

その perl スクリプトのエイリアスを作成してください (シェルの init ファイルに追加できます)。

alias tlmgr='TEXMFDIST/scripts/texlive/tlmgr.pl --usermode'

これで、ユーザモードで初期化できます (インストールプレフィックスとして ~/texmf を使用します):

$ tlmgr init-usertree

自由にミラーを設定してください。例えば:

$ tlmgr option repository http://mirrors.rit.edu/CTAN/systems/texlive/tlnet

これで、CTAN パッケージを通常通りインストールできるようになりました:

$ tlmgr install package_name

パッケージのドキュメント

公式リポジトリ内のパッケージには、フォント/マクロのパッケージのドキュメントやソースファイルが含まれていません。

texdoc でオフラインアクセスするには、Tex Live のドキュメント全体とソースファイルを texlive-most-docAURインストールするか、あるいは tllocalmgr で特定のパッケージのドキュメントをインストールすることで可能です。

また、オンラインでドキュメントにアクセスすることもできます:

手動インストール

上流のインストーラで Tex Live をインストールすることもできます。これは texlive-installerAUR としてパッケージングされています。詳細は LaTeX WikibookTeX Live Guide を見てください。

使用方法

See the following resources:

texmf ツリーと Kpathsea

texmf trees (texmf stands for TeX and Metafont) should follow the TeX Directory Structure, or files may not be found.[1]

TeX Live uses the Kpathsea library to lookup paths by filename across multiple texmf trees and the current working directory.

Kpathsea searches the following variables in the reverse order (later trees override earlier ones).

Variables Arch default 1) Used by [2]
TEXMFDIST /usr/share/texmf-dist files of the original distribution
TEXMFLOCAL /usr/local/share/texmf:/usr/share/texmf administrators for system-wide installation of additional or updated macros, fonts, etc.
TEXMFSYSVAR /var/lib/texmf updmap and fmtutil (user mode) to store (cached) runtime data
TEXMFSYSCONFIG /etc/texmf updmap and fmtutil (user mode) to store modified configuration data
TEXMFHOME ~/texmf users for their own individual installations of additional or updated macros, fonts, etc.
TEXMFVAR ~/.texlive/texmf-var updmap and fmtutil (sys mode) to store (cached) runtime data
TEXMFCONFIG ~/.texlive/texmf-config updmap and fmtutil (sys mode) to store modified configuration data
TEXMFCACHE $TEXMFSYSVAR;$TEXMFVAR ConTeXt MkIV and LuaLaTeX to store (cached) runtime data
ノート: The default values are defined in /etc/texmf/web2c/texmf.cnf[3]; they can be overridden with environment variables.

Kpathsea provides the kpsewhich(1) command to lookup paths. When run with the --var-brace-valueテンプレート:=VARIABLE argument it can also print the values of variables.

Kpathsea uses filename databases (ls-R) to speed up searches in system-wide texmf trees (configured with the TEXMFDBS variable). This means that when system-wide file trees are changed, mktexlsr(1) or texhash (a symlink) need to be run as root. Fortunately the texlive-core automates this with a pacman hook targeting all default system-wide texmf trees but /usr/local/share/texmf.[4] So as long as you install system-wide packages via pacman you should not need to run mktexlsr or texhash at all.

ヒント: For setting up a local repository you can create the ~/texmf/tex/{format}/ directory structure ({format} is usually latex), where custom classes are located in the root of the ./{format} folder and other local files get placed in a folder with the same name (e.g. mycustompackage.sty goes to ./{formats}/mycustompackage/mycustompackage.sty), then run texhash to update the user database.

重要事項

この記事またはセクションは情報が古くなっています。
理由: ConTeXt は最近、設定せずに使用できます。時々、mtxrun --generate を実行する必要があるだけです。[5] (Discuss)
  • (MKII や MKIV の) ConTeXt フォーマットはインストール時に自動で生成されません。方法は ConTeXT wiki の説明を見て下さい。
  • (上流の) TeX Live は CTAN パッケージの差分更新をするためのツールを提供しています。私たちもパッケージを定期的に更新する予定です (作業をほぼ自動化するツールを書き出しています)。
  • 2009年の9月から updmap(1) のフォントマッピングを処理する方法は改善され、以前よりもインストールが信頼できるものになっています。もし、マップファイルが見つからないというエラーメッセージが表示されたときは、手動で updmap.cfg ファイルから削除してください (updmap-sys --edit を使うのが理想)。また、updmap-sys --syncwithtrees を実行すれば設定ファイルから古くなったマップを自動でコメントアウトすることができます。

ヒントとテクニック

デフォルトの用紙サイズを変更する

この記事またはセクションの正確性には問題があります。
理由: It is possible by directly editing the config files.[6] (議論: トーク:TeX Live#)

It is currently impossible to set the default page size using the texlive tools, because they do not work with the standard Arch package.

Usually, you would run texconfig or tlmgr, which are also capable of changing other useful settings.

You can edit the configuration files as follows.

  • To set the paper size for the pdftex family of commands (pdftex, pdflatex, etc) edit /etc/texmf/tex/generic/tex-ini-files/pdftexconfig.tex file.

which can also be discovered by running kpsewhich pdftexconfig.tex. Change the two lines that specify the pdfpageheight and pdfpagewidth. For example, to use letter size, change

\pdfpageheight = 297 true mm
\pdfpagewidth  = 210 true mm

to

\pdfpageheight = 11 true in
\pdfpagewidth  = 8.5 true in

Unfortunately, this will not have any effect until the binary .fmt files are rebuilt. You can do this with fmtutil-sys. Re-installing texlive-bin with pacman will also do this for you.

  • For dvips, you can use the -t option to specify the paper size: dvips -t letter foo.dvi. To change the default, edit /etc/texmf/dvips/config/config.ps file.

which can also be discovered with kpsewhich config.ps. The end of this file has sections that list all the paper sizes that dvips knows about. The first listed paper size will be the default. Just move the one that you want to be the default to the top of the list. The behavior of dvips will be affected as soon as the file file is changed.

Fontconfig でフォントを利用可能にする

デフォルトでは、さまざまな TeX Live パッケージに入っているフォントを Fontconfig から自動で利用することができません。XeTeX や LibreOffice などからフォントを使えるようにしたいときは、フォントディレクトリからユーザのフォントパスへのシンボリックリンクを作成するのが一番簡単です。OpenType フォントの場合は、以下を実行してください:

$ ln -s /usr/share/texmf-dist/fonts/opentype/public/some_fonts_you_want ~/font_path/OTF/

fontconfig で利用できるようにするには、次を実行してください:

$ fc-cache ~/font_path
$ mkfontscale ~/font_path/OTF
$ mkfontdir ~/font_path/OTF

TrueType フォントや Type 1 フォントに対しても似たような手順です。上記のコマンドでは、opentypetruetypetype1 に変更し、OTFTTFType1 に変更します。

また、texlive-core には TeX Live によって使用されるフォントディレクトリのリストが入ったファイル /usr/share/fontconfig/conf.avail/09-texlive-fonts.conf が含まれています。このファイルを利用するには次を実行して:

# ln -s /usr/share/fontconfig/conf.avail/09-texlive-fonts.conf /etc/fonts/conf.d/09-texlive-fonts.conf

それから fontconfig を更新してください:

$ fc-cache && mkfontscale && mkfontdir
ノート:
  • TeX と Fontconfig の両方で同一のフォントが利用できる場合 (検索パスに同じフォントのコピーが複数ある場合)、上記の設定が XeTeX/XeLaTeX と衝突する可能性があります。
  • Type 1 フォントは LibreOffice 5.3 およびそれ以降で利用できません。

babelbib 言語定義の更新

この記事あるいはセクションで使われている用語や表現には問題が存在します。
議論: /usr/share/texmf-dist/ を変更するべきではありません。 (議論: トーク:TeX Live#)

必要としている最新の言語定義が babelbib になく、全てをリコンパイルしたくはないという問題を抱えている場合、https://www.tug.org/texlive/devsrc/Master/texmf-dist/tex/latex/babelbib/ から手動で入手して /usr/share/texmf-dist/tex/latex/babelbib/ に配置することができます。例えば:

$ cd /usr/share/texmf-dist/tex/latex/babelbib/ 
# wget https://www.tug.org/texlive/devsrc/Master/texmf-dist/tex/latex/babelbib/romanian.bdf
# wget [...all-other-language-files...]
# wget https://www.tug.org/texlive/devsrc/Master/texmf-dist/tex/latex/babelbib/babelbib.sty

その後、texhash を実行して TeX データベースを更新してください:

# texhash

トラブルシューティング

更新時に "formats not generated" というエラー

FS#16467 を参照してください。(実験的な LuaTeX エンジンを使用しない場合、これは無視できることに注意してください。) この状況は典型的に、ハイフネーションパターンの設定ファイル language.deflanguage.dat の両方/一方に、以前のリリースの texlive-core のファイルへの参照が含まれている場合に発生します (特に、ファイル名が頻繁に変更される、ドイツ語の最新の実験的なハイフネーションパターン)。現在、それらは dehyph{n,t}-x-2009-06-19.tex を指しているはずです。

これを解決するには、ファイル /etc/texmf/tex/generic/config/language.{def,dat} を削除するか、/usr/share/texmf/tex/generic/config/language.{def,dat} の最新のバージョンを使うように更新し、以下を実行する必要があります:

# fmtutil-sys --missing

tlmgr を texliveonfly で動作させる

tlmgrtexliveonfly で動作させる最も簡単な方法は、(tlmgr をエイリアスにせずに) 以下の内容を含むスクリプト tlmgr$PATH 内に作成することです:

#!/bin/sh
/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode "$@"

こうする理由は、textliveonfly が Python スクリプトであり、エイリアスを処理できないからです。

代替

Tex Live の代替としては、MikTex や Tectonic などがあります。これらは最小限のインストールで、適宜必要なパッケージをインストールします。

参照