[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ next ]

Debian-specific information about TeX packages
Chapter 4 - How to install additional or updated (La)TeX packages or fonts

If you want to install additional (La)TeX stuff, you have to:

  1. install it at a place where TeX can find it;

  1. register it properly.

This can generally be done site-wide (by an administrator who has write access to at least /usr/local/share/texmf and /etc/texmf), or on a per-user basis. This can be done by any user on the system, without requiring write access to system directories. Some people might also find it more convenient in case they share their home directory between a couple of machines, even if they do have administrator rights.

In the following, we first explain the principles by describing a site-wide setup; then we explain the details for user-specific setup.

4.1 (La)TeX input files

This is usually quite easy. Put the files in an appropriate directory below TEXMFLOCAL, which is the directory tree rooted at /usr/local/share/texmf.

For LaTeX packages, create the directory tex/latex/packagename within that tree (or use tex/latex/misc) and put the files there; the documentation should be put into doc/latex/packagename. If the package comes as a pair of .dtx and .ins files, you need to run latex over the .ins file in order to produce the package files, and over the .dtx file to produce the documentation. After that, the .dtx and .ins files are no longer needed. Please refer to the README file of the package if there is one.

After that, registering is easy: just run the command mktexlsr (also called texhash). This will regenerate the ls-R file for all TEXMF trees you have write access to.

4.2 Complex installations

With some packages, e.g. when they contain fonts, the procedure is more complicated. Please follow the instructions given in the package. The Debian-specific part comes in when the configuration files texmf.cnf, fmtutil.cnf, updmap.cfg, or language.dat need to be changed. See the description above (The files texmf.cnf, fmtutil.cnf, updmap.cfg and language.dat, Section 2.4), the manual pages for update-updmap, update-texmf, update-fmtutil, update-language and Font installation, Section 4.3.

4.3 Font installation

If you wish to install a font package in a system-wide manner, please follow the instructions in this section. If you are preparing a Debian package containing fonts, you should refer to the Debian TeX policy instead, which is shipped in the tex-common package.

Generally, you should first have a look at the installation instructions that come with the font package, in case there is something specific to that package with respect to installation. But you should make sure that you install most files in a subdirectory of TEXMFLOCAL (see Available TEXMF trees for users and system administrators, Section 2.1). This is because we are describing here a system-wide installation that is not done by Debian packages.

For instance, AFM files should be stored into TEXMFLOCAL/fonts/afm/supplier/typeface/ where supplier identifies the supplier of the fonts (for instance, adobe, urw or public) and typeface refers to the name of the font family (e.g., marvosym or lm). If in doubt, you should have a look at the system trees managed by Debian packages, /usr/share/texmf, /usr/share/texmf-texlive and /usr/share/texmf-texlive; they follow the same layout, called the TeX Directory Structure (which is documented at http://www.tug.org/tds/).

In order for the various TeX-related programs to be able to use a font, you need to somehow register its map files (simply copying the files to TEXMFLOCAL is not enough). You can do this with the following steps, performed as root, where foo stands for the name of the font package you are installing:

  1. Make sure you have stored all the relevant files shipped in the package (.afm, .tfm, .pfb, .pfa, .mf, .fd, .enc, .map, .sty are all relevant in this context) in the appropriate subdirectories of TEXMFLOCAL, as explained above.

    Note: in teTeX 3 and current TeX Live (as opposed to teTeX 2):

    where syntax indicates the syntax followed by the files (it is often dvips). Please refer to the teTeX Manual for details. You can read this manual with the command

         texdoc TETEXDOC
  1. Create a configuration file /etc/texmf/updmap.d/10local-foo.cfg (the extension .cfg is important! You can also use one 10local.cfg for all your locally installed fonts). The file should list the map files you stored in step 1 under TEXMFLOCAL, with one line per file, as in:

         # This is a comment line
         Map foo.map
         Map other-map-file-from-package-foo.map

    If a font is available both as bitmap and outline, you should use MixedMap instead of Map. Please refer to the manual pages for update-updmap and updmap-sys for details.

    You can also use updmap-sys --enable Map foo.map; this will create the 10local.cfg file for you.

  1. Run the program update-updmap. This will generate an appropriate updmap.cfg file under /var/lib/texmf/web2c/ (not /etc/texmf/!), containing the Map and/or MixedMap lines taken from 10local-foo.cfg.

    Note: modifying updmap.cfg directly is not supported in Debian, because Debian font packages need to update it when they are installed or removed. This is why updmap.cfg is not stored under /etc and why you have to use update-updmap whenever you want to modify it.

  1. Run the program mktexlsr (or texhash, which is the same). This will record all the newly created files in ls-R files (these are used by TeX-related programs as indices to find the files they need when operating).

  1. Run the program updmap-sys. This will use your updated updmap.cfg to generate files that are needed by dvips, pdflatex, dvipdfm, etc., such as psfonts.map and pdftex.map.

At this point, the font package should be properly installed for all users on the system.

4.4 User-specific installation

Instead of a system-wide installation, one can also install input files and fonts in the private TEXMFHOME, which is set to $HOME/texmf by default. For fonts, compared to the system-wide installation explained above, the following changes have to be made:

Note that update-updmap merges the configuration files in $HOME/.texmf-config/web2c/updmap.d and in /etc/texmf/updmap.d. Therefore, all system-wide installed fonts are accessible without duplicating their configuration files. Merging the configuration files is done on the basis of file names: If a file exists in both directories, the version in TEXMFCONFIG takes precedence. Thus, you can also use this mechanism to change settings compared to the site-wide configuration, e.g. by keeping a changed copy of 00updmap.cfg in TEXMFCONFIG/updmap.d/.

Keep in mind that you still have to call update-updmap whenever the system-wide installation changes. If you keep a changed copy of a file from the site-wide directories, you need to manually merge any changes to this file, if desired.

[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ next ]

Debian-specific information about TeX packages

generated from $Id: TeX-on-Debian.sgml 2729 2007-04-25 06:17:35Z preining $

The Debian TeX mailing list debian-tex-maint@lists.debian.org