TeX Live: Difference between revisions

From ArchWiki
Line 115: Line 115:
  # fmtutil-sys --missing
  # fmtutil-sys --missing


===Fonts===
=== 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:
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)  
   ln -s /usr/share/texmf-dist/fonts/opentype/public/<some_fonts_you_want> ~/.fonts/OTF/ (or TTF or Type1)  

Revision as of 15:24, 29 September 2018

fa:LaTeX

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.

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).
    • 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 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, and ruby.
Tip: You may want to install a TeX editor.

Manual installation

Alternatively you can install TeX Live with the upstream installer, which is packaged as texlive-installerAUR. For more information, see the LaTeX Wikibook and the TeX Live Guide.

Usage

texmf trees and 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-sys(1) and fmtutil-sys(1) to store (cached) runtime data
TEXMFSYSCONFIG /etc/texmf updmap-sys(1) and fmtutil-sys(1) 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(1) and fmtutil(1) to store (cached) runtime data
TEXMFCONFIG ~/.texlive/texmf-config updmap(1) and fmtutil(1) 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[3], 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.[4] So as long as you install system-wide packages via pacman you should not need to run mktexlsr or texhash at all.

updmap and fmtutil

This article or section needs expansion.

Reason: Add a rough explanation. (Discuss in Talk:TeX Live)

See TUGboat, Volume 38, the official documentation and updmap(1) and fmtutil(1).

The way to handle font mappings for updmap(1) was improved in September 2009, and installation should now be much more reliable than in the past. In the meantime, if you encounter error messages about unavailable map files, simply remove them by hand from the updmap.cfg file (ideally using updmap-sys --edit). You can also run updmap-sys --syncwithtrees to automatically comment out outdated map lines from the config file.

CTAN

CTAN is the cen­tral place for all kinds of ma­te­rial around TeX.

Like most distributions Arch Linux does not use the upstream TeX Live package manager (tlmgr).[5]

Instead Arch Linux has the TeXLive Local Manager (texlive-localmanager-gitAUR), which provides the tllocalmgr utility that lets you install and update packages from CTAN as pacman packages, see its usage (-h) for details.

Package documentation

The packages containing the documentation and sources are no longer available in the official repositories. You can locally build them with tllocalmgr. You can also consult documentation online at https://tug.org/texlive/Contents/live/doc.html or on CTAN. Another possibility is using the online documentation at http://texdoc.net/pkg/packagename which resolves to the relevant pdf for packagename, similar to the command line tool texdoc (which is useless without locally installed documentation). The documentation is now contained in texlive-most-docAUR.

Important information

This article or section is out of date.

Reason: ConTeXt nowadays works out of the box. You just sometimes need to run mtxrun --generate.[6] (Discuss in Talk:TeX Live)
  • The ConTeXt formats (for Mark II and IV) are not automatically generated upon installation. See the ConTeXT wiki for instructions on how to do this.
  • TeX Live (upstream) now provides a tool for incremental updates of CTAN packages. On that basis, we also plan to update our packages on a regular basis (we have written tools that almost automate that task).

Paper size

The factual accuracy of this article or section is disputed.

Reason: It's possible by directly editing the config files.[7] (Discuss in Talk:TeX Live)

It is currently impossible to set the default page size, because the Arch package removes the tool necessary for this, see FS#59094.

Usually, you would run the texconfig command, which is also capable of changing other useful settings.

Error with "formats not generated" upon update

See FS#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: /usr/share/texmf-config/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

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.

Updating babelbib language definitions

This article or section needs language, wiki syntax or style improvements. See Help:Style for reference.

Reason: You should not manually change /usr/share/texmf-dist/. (Discuss in Talk:TeX Live)

If you have the very specific problem of babelbib not having the latest language definitions that you need, and you do not want to recompile everything, you can get them manually from https://www.tug.org/texlive/devsrc/Master/texmf-dist/tex/latex/babelbib/ and put them in /usr/share/texmf-dist/tex/latex/babelbib/. For example:

# 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

Afterwards, you need to run texhash to update the TeX database:

# texhash

See also