TeXLive

From ParabolaWiki
Jump to: navigation, search

According to Wikipedia:

TeX Live is a free software distribution for the TeX typesetting system that includes major TeX-related programs, macro packages, and fonts.

TeX Live includes the tex(1) and pdftex(1) programs, the LaTeX and ConTeXt TeX macro packages and the XeTeX and LuaTeX TeX engines.

1 Installation

  • The

texlive-most group contains most TeX Live packages.

    • texlive-core, the essential package, based on the medium upstream install scheme (all other packages are based on the upstream collections). The package includes pacman hooks to automate mktexlsr, fmtutil and updmap.[1]
    • texlive-bin contains the binaries and libraries (it is a dependency of texlive-core).
  • The

texlive-lang group contains packages providing character sets and features for non-English languages.

    • texlive-langextra provides language support for African, Arabic, Armenian, Croatian, Hebrew, Indic, Mongolian, Tibetan and Vietnamese.
  • The biber utility used to handle biblatex bibliography is provided as a separate package.

To determine which CTAN packages are included in each texlive- package, look up the files /var/lib/texmf/arch/installedpkgs/<package>_<revnr>.pkgs.

Note: Some tools and utilities included in TeX Live rely on ghostscript, perl, python2, or ruby.
Tip: You may want to install a TeX editor.


1.1 Package documentation

The packages in the official repositories do not contain the documentation or source files of font/macro packages.

You can access the documentation online at:

2 Usage

See the following resources:

2.1 texmf trees and Kpathsea

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

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 [3]
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
  1. The default values are defined in /etc/texmf/web2c/texmf.cnf[4]; they can be overridden with environment variables.

Kpathsea provides the kpsewhich(1) command to lookup paths. When run with the -var 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.[5] So as long as you install system-wide packages via pacman you should not need to run mktexlsr or texhash at all.


3 Tips and tricks

3.1 Making fonts available to Fontconfig

By default, the fonts that come with the various TeX Live packages are not automatically available to Fontconfig. If you want to use them with, say XeTeX or LibreOffice, the easiest approach is to make symlinks as follows:

 ln -s /usr/share/texmf-dist/fonts/opentype/public/<some_fonts_you_want> ~/.fonts/OTF/ (or TTF or Type1)

To make them available to fontconfig, run:

 fc-cache ~/.fonts
 mkfontscale ~/.fonts/OTF (or TTF or Type1)
 mkfontdir ~/.fonts/OTF (or TTF or Type1)

Alternatively, texlive-core contains the file /etc/fonts/conf.avail/09-texlive-fonts.conf that contains a list of the font directories used by TeX Live. You can use this file with:

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

And then update fontconfig:

# fc-cache && mkfontscale && mkfontdir
Note: This may cause conflicts with XeTeX/XeLaTeX if the same fonts are (separately) available to both TeX and Fontconfig, i.e. if multiple copies of the same font are available on the search path.

4 Troubleshooting

4.1 Error with "formats not generated" upon update

See Arch 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 language.def and/or language.dat for hyphenation patterns contain references to files from earlier releases of texlive-core, in particular to the latest experimental hyphenation patterns for German, whose file name changes frequently. Currently they should point to dehyph{n,t}-x-2009-06-19.tex.

To solve this, you need to either remove these files: /etc/texmf/tex/generic/config/language.{def,dat} or update them using the newest version under: /usr/share/texmf/tex/generic/config/language.{def,dat} and then run

# fmtutil-sys --missing

4.2 My fonts don't work on TeXLive-libre

Some fonts were took off Arch's texlive-* packages because of incompatible licenses. If you find your fonts won't build, please consider starting to use XeLaTeX, since it will allow you to use system fonts with Unicode support.

4.2.1 XeLaTeX

Example:

\usepackage{xunicode}
\usepackage{xltxtra}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont [Ligatures={Common}, Numbers={OldStyle}, Variant=01]{Linux Libertine O}
\setmonofont[Scale=0.8]{Droid Sans Mono}

4.2.2 (PDF)LaTeX

Another way is to use QX encoded fonts instead of T1, or OT2 instead of T2A (with different metrics and glyphs). Example:

\usepackage{lmodern}
\usepackage[QX]{fontenc}

4.3 Error during installation/update of texlive-formatsextra

See Issue#2151. The error

fmtutil [ERROR]: return error due to options --strict

during the installation or update of texlive-formatsextra is a known behaviour of the texlive pkgbuilds, but it's nothing to worry about. The installation should still succeed, and you should be able to use pdftex and friends normally.

5 See also

6 Acknowledgement

This wiki article is based on ArchWiki. We may have removed non-FSDG bits from it.