Kpathsea library

for version 3.0

February 1997

K. Berry (@email{kb@mail.tug.org})


@dircategory TeX @direntry * Kpathsea: (kpathsea). File lookup along search paths. * kpsewhich: (kpathsea)Invoking kpsewhich. TeX file searching. * MakeTeXMF: (kpathsea)MakeTeX scripts. MF source generation. * MakeTeXPK: (kpathsea)MakeTeX scripts. PK bitmap generation. * MakeTeXTeX: (kpathsea)MakeTeX scripts. TeX source generation. * MakeTeXTFM: (kpathsea)MakeTeX scripts. TeX font metric generation. * MakeTeXls-R: (kpathsea)Filename database. Update ls-R.

Copyright (C) 1993, 94, 95, 96, 97 K. Berry.

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.

Introduction

This manual corresponds to version 3.0 of the Kpathsea library, released in February 1997.

The library's fundamental purpose is to return a filename from a list of directories specified by the user, similar to what shells do when looking up program names to execute.

The following software, all of which I maintain, uses this library:

Other software that I do not maintain also uses it.

I am still actively maintaining the library (and probably always will be, despite my hopes). If you have comments or suggestions, please send them to me (see section Reporting bugs).

I distribute the library under the GNU Library General Public License (LGPL), with one exception (see below). In short, this means if you write a program using the library, you must (offer to) distribute the source to the library, along with any changes you have made, and allow anyone to modify the library source and distribute their modifications. It does not mean you have to distribute the source to your program, although I hope you will.

The exception is the part of the file `expand.c' which implements brace expansion. I took this from Bash, which is covered by the GNU General Public License (GPL). Therefore, if you wish to redistribute the library under the LGPL, you must remove this code. (If you write a replacement I can distribute, I hope you'll share it with me.) See the files `COPYING' and `COPYING.LIB' for the text of the GNU licenses.

If you know enough about TeX to be reading this manual, then you (or your institution) should consider joining the TeX Users Group (if you're already a member, great!). TUG produces the periodical TUGboat, sponsors an annual meeting and publishes the proceedings, and arranges courses on TeX for all levels of users throughout the world. Anyway, here is the address:

TeX Users Group
870 Market St. #801
San Francisco, CA 94102  USA
phone: +1 (415) 982-8449
fax:   +1 (415) 982-8559
email: @email{tug@tug.org}

History

(This section is for those people who are curious about how the library came about.) (If you like to read historical accounts of software, I urge you to seek out the GNU Autoconf manual and the "Errors of TeX" paper by Don Knuth, published in Software--Practice and Experience 19(7), July 1989.)

My first ChangeLog entry for Web2c seems to be February 1990, but I may have done some work before then. In any case, Tim Morgan and I were jointly maintaining it for a time. (I should mention here that Tim had made Web2c into a real distribution long before I had ever used it or even heard of it, and Tom Rokicki did the original implementation. I was using pxp and pc on VAX 11/750's and the hot new Sun 2 machines.)

It must have been later in 1990 and 1991 that I started working on TeX for the Impatient. Dvips, Xdvi, Web2c, and the GNU fontutils (which I was also writing at the time) all used different environment variables, and, more importantly, had different bugs in their path searching. This became extremely painful, as I was stressing everything to the limit working on the book. I also desperately wanted to implement subdirectory searching, since I couldn't stand putting everything in one big directory, and also couldn't stand having to explicitly specify `cm', `pandora', ... in a path.

In the first incarnation, I just hacked separately on each program--that was the original subdirectory searching code in both Xdvi and Dvips, though I think Paul Vojta has completely rewritten Xdvi's support by now. That is, I tried to go with the flow in each program, rather than changing the program's calling sequences to conform to common routines.

Then, as bugs inevitably appeared, I found I was fixing the same thing three times (Web2c and fontutils were always sharing code, since I maintained those--there was no Dvipsk or Xdvik or Dviljk at this point). After a while, I finally started sharing source files. They weren't yet a library, though. I just kept things up to date with shell scripts. (I was developing on a 386 running ISC 2.2 at the time, and so didn't have symbolic links. An awful experience.)

The ChangeLogs for Xdvik and Dvipsk record initial releases of those distributions in May and June 1992. I think it was because I was tired of the different configuration strategies of each program, not so much because of the path searching. (Autoconf was being developed by David MacKenzie and others, and I was adapting it to TeX and friends.)

I started to make a separate library that other programs could link with on my birthday in April 1993, according to the ChangeLog. I don't remember exactly why I finally took the time to make it a separate library; a conversation with david zuhn that initiated it. Just seemed like it was time.

Dviljk got started in March 1994 after I bought a Laserjet 4. (Kpathsea work got suspended while Norm Walsh and I, with Gustaf Neumann's help, implemented a way for TeX to get at all those neat builtin LJ4 fonts ... such a treat to have something to typeset in besides Palatino!)

By spring of 1995, I had implemented just about all the path-searching features in Kpathsea that I plan to, driven beyond my initial goals by Thomas Esser and others. I then started to integrate Web2c with Kpathsea. After the release of a stable Web2c, I hope to be able to stop development, and turn most of my attention back to making fonts for GNU. (Always assuming Micros**t hasn't completely obliterated Unix by then, or that software patents haven't stopped software development by anybody smaller than a company with a million-dollar-a-year legal budget. Which is actually what I think is likely to happen, but that's another story...)

Installation

(A copy of this chapter is in the distribution file `kpathsea/INSTALL'.)

The procedure for Kpathsea (and Web2c, etc.) configuration and installation follows. If trouble, see section Common problems, a copy of which is in the file `kpathsea/BUGS'.

Simple installation

Installing TeX and friends for the first time can be a daunting experience. Thus, you may prefer to skip this whole thing and just get precompiled executables: see section `unixtex.ftp': Obtaining TeX.

This section explains what to do if you wish to take the defaults for everything (installing under `/usr/local'), and generally to install in the simplest possible way. Most steps here refer to corresponding subsection in the next section which explains how to override defaults and generally gives more details.

  1. Be sure you have enough disk space: approximately 8 megabytes for the compressed archives, 15MB for sources, 45MB for compilation, 40MB for the (initial) installed system (including library files). See section Disk space.
  2. Retrieve these two distribution archives:
    @url{ftp://ftp.tug.org/tex/texk.tar.gz}
    These are the sources, which you will be compiling.
    @url{ftp://ftp.tug.org/tex/texmflib.tar.gz}
    This is a basic set of input files. You should unpack it in the directory `/usr/local/share'; doing so will create a `texmf' subdirectory there.
    See section Kpathsea application distributions.
  3. When using the default search paths, there is no need to edit any distribution files. See section Changing search paths.
  4. At the top level of the distribution, run `sh configure'. (If you have the GNU Bash shell installed, run `bash configure'.) See section Running configure.
  5. `make'. See section Running make.
  6. `make install'. See section Installing files.
  7. `make distclean'. See section Cleaning up.
  8. Set up a cron job to rebuild the filename database that makes searching faster. This line will rebuild it every midnight:
    0 0 * * * cd /usr/local/share/texmf && /bindir/MakeTeXls-R
    
    See section Filename database generation, and section Filename database (ls-R).
  9. If you're installing Dvips, you also need to set up configuration files for your printers and make any additional PostScript fonts available. See section `Installation' in Dvips. If you have any color printers, see section `Color device configuration' in Dvips.
  10. The first time you run a DVI driver, a bunch of PK fonts will be built by Metafont via MakeTeXPK (and added to the filename database). This will take some time. Don't be alarmed; they will created only this first time (unless something is wrong with your path definitions). By default, MakeTeXPK assumes `/usr/local/share/texmf/fonts' is globally writable. If you need a different arrangement, see section `MakeTeX' configuration. See section `MakeTeX' scripts.
  11. For some simple tests, try `tex story \\bye' and `latex simple'. Then run `xdvi story' or `dvips simple' on the resulting DVI files to preview/print the documents. See section Installation testing.

Custom installation

Most sites need to modify the default installation procedure in some way, perhaps merely changing the prefix from `/usr/local', perhaps adding extra compiler or loader options to work around configure bugs. This section explains how to override default choices. For additional distribution-specific information:

These instructions are for Unix systems. Other operating-system specific distributions have their own instructions. The code base itself supports Amiga, DOS, OS/2, and VMS.

Following are the same steps as in the previous section (which describes the simplest installation), but with much more detail.

Disk space

Here is a table showing the disk space needed for each distribution (described in the next section). The `(totals)' line reflects the `texk' source distribution and `texmflib'; the individual distributions don't enter into it. Sizes are in megabytes. All numbers are approximate.

@multitable {distribution} {.tar.gz} {unpacked} {compiled} {installed}

  • dviljk @tab .9 @tab 3.8 @tab
  • dvipsk @tab .9 @tab 3.2 @tab
  • xdvik @tab .7 @tab 2.5 @tab
  • web2c @tab 1.3 @tab 5.0 @tab
  • web @tab 1.9 @tab 6.5 @tab - @tab -
  • texk @tab 3.8 @tab 14.1 @tab 43.1 @tab 23.5
  • texmflib @tab 3.8 @tab 15.0 @tab - @tab 15.0
  • (totals) @tab 7.6 @tab 29.1 @tab 43.1 @tab 38.5

    Kpathsea application distributions

    The archive @url{ftp://ftp.tug.org/tex/texk.tar.gz} contains all of the Kpathsea applications I maintain, and the library itself. For example, since NeXT does not generally support X11, you'd probably want to skip `xdvik' (or simply remove it after unpacking `texk.tar.gz'. If you are not interested in all of them, you can also retrieve them separately:

    `dviljk.tar.gz'
    DVI to PCL, for LaserJet printers.
    `dvipsk.tar.gz'
    DVI to PostScript, for previewers, printers, or PDF generation.
    `web2c.tar.gz'
    The software needed to compile TeX and friends.
    `web.tar.gz'
    The original WEB source files, also used in compilation.
    `xdvik.tar.gz'
    DVI previewing under the X window system.

    If you want to use the Babel LaTeX package for support of non-English typesetting, you may need to retrieve additional files. See the file `install.txt' in the Babel distribution.

    Changing search paths

    If the search paths for your installation differ from the standard TeX directory structure (see section `Introduction' in A Directory Structure for TeX files), edit the file `kpathsea/texmf.cnf.in' as desired, before running configure. For example, if you have all your fonts or macros in one big directory.

    You may also wish to edit the file `MakeTeXnames.cnf', either before or after installation, to control various aspects of MakeTeXPK and friends. See section `MakeTeX' configuration.

    You do not need to edit `texmf.cnf.in' to change the default top-level or other installation directories (only the paths). You can and should do that when you run configure (next step).

    You also do not need to edit `texmf.cnf.in' if you are willing to rely on `texmf.cnf' at runtime to define the paths, and let the compile-time default paths be incorrect. Usually there is no harm in doing this.

    The section below explains default generation in more detail.

    Default path features

    The purpose of having all the different files described in the section above is to avoid having the same information in more than one place. If you change the installation directories or top-level prefix at configure-time, those changes will propagate through the whole sequence. And if you change the default paths in `texmf.cnf.in', those changes are propagated to the compile-time defaults.

    The Make definitions are all repeated in several Makefile's; but changing the top-level `Makefile' should suffice, as it passes down all the variable definitions, thus overriding the submakes. (The definitions are repeated so you can run Make in the subdirectories, if you should have occasion to.)

    By default, the bitmap font paths end with `/$MAKETEX_MODE', thus including the device name (usually a Metafont mode name such as `ljfour'). This distinguishes two different devices with the same resolution--a write/white from a write/black 300dpi printer, for example.

    However, since most sites don't have this complication, Kpathsea (specifically, the kpse_init_prog function in `kpathsea/proginit.c') has a special case: if the mode has not been explicitly set by the user (or in a configuration file), it sets MAKETEX_MODE to /. This makes the default PK path, for example, expand into .../pk//, so fonts will be found even if there is no subdirectory for the mode (if you arranged things that way because your site has only one printer, for example) or if the program is mode-independent (e.g., pktype).

    To make the paths independent of the mode, simply edit `texmf.cnf.in' before installation, or the installed `texmf.cnf', and remove the `$MAKETEX_MODE'.

    See section `MakeTeX' script arguments, for how this interacts with MakeTeXPK.

    See section TeX directory structure, for a description of the default arrangement of the input files that comprise the TeX system. The file `kpathsea/HIER' is a copy of that section.

    Default path generation

    This section describes how the default paths are constructed.

    You may wish to ignore the whole mess and simply edit `texmf.cnf' after it is installed, perhaps even copying it into place beforehand so you can complete the installation, if it seems necessary.

    To summarize the chain of events that go into defining the default paths:

    1. `configure' creates a `Makefile' from each `Makefile.in'.
    2. When Make runs in the `kpathsea' directory, it creates a file `texmf.sed' that substitutes the Make value of $(var) for a string @var@. The variables in question are the one that define the installation directories.
    3. `texmf.sed' (together with a little extra magic--see `kpathsea/Makefile') is applied to `texmf.cnf.in' to generate `texmf.cnf'. This is the file that will eventually be installed and used.
    4. The definitions in `texmf.cnf' are recast as C #define's in `paths.h'. These values will be the compile-time defaults; they are not used at runtime unless no `texmf.cnf' file can be found. (That's a lie: the compile-time defaults are what any extra :'s in `texmf.cnf' expand into; but the paths as distributed have no extra :'s, and there's no particular reason for them to.)

    Running configure

    Run sh configure options (in the top-level directory, the one containing `kpathsea/'), possibly using a shell other than sh (see section configure shells).

    configure adapts the source distribution to the present system via #define's in `*/c-auto.h', which are created from the corresponding `c-auto.h.in'. It also creates a `Makefile' from the corresponding `Makefile.in', doing `@var@' and `ac_include' substitutions).

    configure is the best place to control the configuration, compilation, and installed location of the software, either via command-line options, or by setting environment variables before invoking it. For example, you can disable MakeTeXPK by default with the option `--disable-maketexpk'. See section configure options.

    configure shells

    If you have Bash, the GNU shell, use it if sh runs into trouble (see section `Top' in Bash Features).

    Most Bourne shell variants other than Bash cannot handle configure scripts as generated by GNU Autoconf (see section `Top' in Autoconf). Specifically:

    ksh
    The Korn shell may be installed as `/bin/sh' on AIX. `/bin/bsh' may serve instead.
    ash
    Ash is sometimes installed as `/bin/sh' on NetBSD, FreeBSD, and Linux systems. `/bin/bash' should be available.
    Ultrix /bin/sh
    `/bin/sh' under Ultrix is a DEC-grown shell that is notably deficient in many ways. `/bin/sh5' may be necessary.

    configure options

    For a complete list of all configure options, run `configure --help' or see section `Running configure scripts' in Autoconf (a copy is in the file `kpathsea/CONFIGURE'). The generic options are listed first in the `--help' output, and the package-specific options come last. The environment variables configure pays attention to are listed below.

    Options particularly likely to be useful are `--prefix', `--datadir', and the like; see section configure scenarios.

    This section gives pointers to descriptions of the `--with' and `--enable' options to configure that Kpathsea-using programs accept.

    `--without-maketexmf-default'
    `--without-maketexpk-default'
    `--without-maketextfm-default'
    `--with-maketextex-default'
    Enable or disable the dynamic generation programs. See section `MakeTeX' configuration.
    `--enable-shared'
    Build Kpathsea as a shared library, and link against it. Also build the usual static library. See section Shared library.
    `--disable-static'
    Build only the shared library.

    configure environment

    configure uses the value of the following environment variables in determining your system's characteristics, and substitutes for them in Makefile's:

    `CC'
    The compiler to use: default is gcc if it's installed, otherwise cc.
    `CFLAGS'
    Options to give the compiler: default is `-g -O2' for gcc, `-g' otherwise. CFLAGS comes after any other options. You may need to include -w here if your compilations commonly have useless warnings (e.g., NULL redefined), or configure may fail to detect the presence of header files (it takes the messages on standard error to mean the header file doesn't exist).
    `CPPFLAGS'
    Options to pass to the compiler preprocessor; this matters most for configuration, not the actual source compilation. The configure script often does only preprocessing (e.g., to check for the existence of #include files), and CFLAGS is not used for this. You may need to set this to something like `-I/usr/local/include/wwwhatever' if you have the libwww library installed for hyper-xdvik (see `xdvik/INSTALL').
    `DEFS'
    Additional preprocessor options, but not used by configure. Provided for enabling or disabling program features, as documented in the various program-specific installation instructions. DEFS comes before any compiler options included by the distribution `Makefile's or by configure.
    `LDFLAGS'
    Additional options to give to the loader. LDFLAGS comes before any other linker options.
    `LIBS'
    Additional libraries to link with.

    configure scenarios

    Here are some common installation scenarios:

    Shared library

    You can compile Kpathsea as a shared library on a few systems, by specifying the option `--enable-shared' when you run `configure'.

    The main advantage in doing this is that the executables can then share the code, thus decreasing memory and disk space requirements.

    On some systems, you can record the location of shared libraries in a binary, usually by giving certain options to the linker. Then individual users do not need to set their system's environment variable (e.g., LD_LIBRARY_PATH) to find shared libraries. If you want to do this, you will need to add the necessary options to LDFLAGS yourself; for example, on Solaris, include something like `-R${prefix}/lib'. (Unfortunately, making this happen by default is very difficult, because of interactions with an existing installed shared library.)

    Currently, shared library support is implemented only on SunOS 4 (Solaris 1) and SunOS 5 (Solaris 2). If you're interested and willing in adding support for other systems, please see the `configure' mode in the `klibtool' script, especially the host-specific case statement around line 250.

    Running make

    make (still in the top-level directory). This also creates the `texmf.cnf' and `paths.h' files that define the default search paths, and (by default) the `plain' and `latex' TeX formats.

    You can override directory names and other values at make-time. `make/paths.make' lists the variables most commonly reset. For example, `make default_texsizes=600' changes the list of fallback resolutions.

    You can also override each of configure's environment variables (see section configure environment). The Make variables have the same names.

    Finally, you can supply additional options via the following variables. (configure does not use these.)

    `XCPPFLAGS'
    `XDEFS'
    Preprocessor options.
    `XCFLAGS'
    Compiler options.
    `XLDFLAGS'
    Loader options (included at beginning of link commands).
    `XLOADLIBES'
    More loader options (included at end of link commands).
    `XMAKEARGS'
    Additional Make arguments passed to all sub-make's. You may need to include assignments to the other variables here via XMAKEARGS; for example: `make XMAKEARGS="CFLAGS=-O XDEFS=-DA4"'.

    It's generally a bad idea to use a different compiler (`CC') or libraries (LIBS) for compilation than you did for configuration, since the values configure determined may then be incorrect.

    Adding compiler options to change the "universe" you are using (typically BSD vs. system V) is generally a cause of trouble. It's best to use the native environment, whatever that is; configure and the software usually adapt best to that. In particular, under Solaris 2.x, you should not use the BSD-compatibility library (`libucb') or include files (`ucbinclude').

    If you want to use the Babel LaTeX package for support of non-English typesetting, you need to modify some files before making the LaTeX format. See the file `install.txt' in the Babel distribution.

    Installing files

    The basic command is the usual make install. For security issues, see section Security.

    The first time you install any manual in the GNU Info system, you should add a line (you choose where) to the file `dir' in your `$(infodir)' directory. Sample text for this is given near the top of the Texinfo source files (`kpathsea/kpathsea.texi', `dvipsk/dvips.texi', and `web2c/doc/web2c.texi'). If you have a recent version of the GNU Texinfo distribution installed (@url{ftp://prep.ai.mit.edu/pub/gnu/texinfo-3.9.tar.gz} or later), this should happen automatically.

    On the offchance that this is your first Info installation, the `dir' file I use is included in the distribution as `etc/dir-example'.

    You may wish to use one of the following targets, especially if you are installing on multiple architectures:

    If you use the Andrew File System, the normal path (e.g., prefix/bin) only gets you to a read-only copy of the files, and you must specify a different path for installation. The best way to do this is by setting the `prefix' variable on the make command line. The sequence becomes something like this:

    configure --prefix=/whatever
    make
    make install prefix=/afs/.system.name/system/1.3/@sys/whatever
    

    With AFS, you will definitely want to use relative filenames in `ls-R' (see section Filename database (ls-R)), not absolute filenames. This is done by default, but check anyway.

    Cleaning up

    The basic command is make distclean. This removes all files created by the build.

    Alternatively,

    Filename database generation

    You will probably want to set up a cron entry on the appropriate machine(s) to rebuild the filename database nightly or so, as in:

    0 0 * * * cd texmf && /bindir/MakeTeXls-R
    

    See section Filename database (ls-R).

    Although the MakeTeX... scripts make every effort to add newly-created files on the fly, it can't hurt to make sure you get a fresh version every so often.

    `MakeTeX' scripts

    If Kpathsea cannot otherwise find a file, for some file types it is configured by default to invoke an external program to create it dynamically (see section `MakeTeX' configuration). This is most useful for fonts (bitmaps, TFM's, and arbitrarily-sizable Metafont sources such as the Sauter and DC fonts), since any given document can use fonts never before referenced. Trying to build all fonts in advance is therefore impractical, if not impossible.

    The script is passed the name of the file to create and possibly other arguments, as explained below. It must echo the full pathname of the file it created (and nothing else) to standard output; it can write diagnostics to standard error.

    `MakeTeX' configuration

    The following file types can run an external program to create missing files: `pk', `tfm', `mf', `tex'; the scripts are named `MakeTeXPK', `MakeTeXTFM', `MakeTeXMF', and `MakeTeXTeX'.

    In the absence of configure options specifying otherwise, everything but `MakeTeXTeX' will be enabled by default. The configure options to change the defaults are:

    --without-maketexmf-default
    --without-maketexpk-default
    --without-maketextfm-default
    --with-maketextex-default
    

    The configure setting is overridden if the environment variable or configuration file value named for the script is set; e.g., `MAKETEXPK' (see section `MakeTeX' script arguments).

    As distributed, all the scripts source a file `texmf/web2c/MakeTeX.site' if it exists, so you can override various defaults. See `MakeTeXcommon', for instance, which defines the default mode, resolution, directory permissions, some special directory names, etc. If you prefer not to change the distributed scripts, you can simply create `MakeTeX.site' with the appropriate definitions (you do not need to create it if you have nothing to put in it). `MakeTeX.site' has no special syntax; it's an arbitrary Bourne shell script. The distribution contains a sample `MakeTeX.site' for you to copy and modify as you please (it is not installed anywhere).

    In addition, you can configure a number of features with the MT_FEATURES variable, which you can define:

    By default, MakeTeXPK installs fonts into the standard TeX directory structure (see section TeX directory structure). It uses aliases and directory names from the Fontname distribution (see section `Introduction' in Fontname). Most of the options here change that.

    `appendonlydir'
    Tell MakeTeXmkdir to create directories append-only, i.e., set their sticky bit (see section `Mode Structure' in GNU File Utilities).
    `dosnames'
    Use 8.3 names; e.g., `dpi600/cmr10.pk' instead of `cmr10.600pk'.
    `nomode'
    Omit the directory level for the mode name; this is fine as long as you generate fonts for only one mode.
    `strip'
    Omit the font supplier and typeface name directory levels.
    `varfonts'
    Put MakeTeXPK-generated fonts under the directory named by VARTEXFONTS; the default value in `kpathsea/texmf.cnf.in' is `/var/tex/fonts', as recommended by the Linux File System Standard (but unless `varfonts' is enabled, nothing cares about that value). The `varfonts' setting in MT_FEATURES is overridden by the USE_VARTEXFONTS environment variable: if set to `1', the feature is enabled, and if set to `0', the feature is disabled.

    `MakeTeX' script names

    The following table shows the default name of the script for each possible file types. (The source is the variable kpse_make_specs in `kpathsea/tex-make.c'.)

    `MakeTeXPK'
    Glyph fonts.
    `MakeTeXTeX'
    TeX input files.
    `MakeTeXMF'
    Metafont input files.
    `MakeTeXTFM'
    TFM files.

    These names are overridden by an environment variable specific to the program--for example, DVIPSMAKEPK for Dvipsk.

    If a MakeTeX... script fails, the invocation is appended to a file `missfont.log' (by default) in the current directory. You can then execute the log file to create the missing files after fixing the problem.

    If the current directory is not writable and the environment variable or configuration file value TEXMFOUTPUT is set, its value is used. Otherwise, nothing is written. The name `missfont.log' is overridden by the MISSFONT_LOG environment variable or configuration file value.

    `MakeTeX' script arguments

    The first argument to a `MakeTeX' script is always the name of the file to be created.

    In the default `MakeTeXPK' implementation, from three to five additional arguments may also passed, via environment variables:

    1. The resolution to make the font at (KPATHSEA_DPI).
    2. The "base dpi" the program is operating at (MAKETEX_BASE_DPI), i.e., the assumed resolution of the output device.
    3. A "magstep" string suitable for the Metafont mag variable (MAKETEX_MAG).
    4. Optionally, a Metafont mode name to assign to the Metafont mode variable (MAKETEX_MODE). Otherwise, (the default) MakeTeXPK guesses the mode from the resolution. See section TeX directory structure.
    5. Optionally, a directory name. If the directory is absolute, it is used as-is. Otherwise, it is appended to the root destination directory set in the script (from environment variables DESTDIR or MTP_DESTDIR or a compile-time default). If this argument is not supplied, the mode name is appended to the root destination directory.

    Kpathsea sets KPATHSEA_DPI appropriately for each attempt at building a font. It's up to the program using Kpathsea to set the others. (See section Calling sequence.)

    You can change the specification for the arguments passed to the external script by setting the environment variable named as the script name, but all capitals---MAKETEXPK, for example. If you've changed the script name by setting (say) DVIPSMAKEPK to `foo', then the spec is taken from the environment variable FOO.

    The spec can contain any variable references, to the above variables or any others. As an example, the default spec for MakeTeXPK is:

    $KPATHSEA_DPI $MAKETEX_BASE_DPI $MAKETEX_MAG $MAKETEX_MODE
    

    The convention of passing the name of the file to be created as the first argument cannot be changed.

    Installation testing

    Besides the tests listed in section Simple installation, you can try running `make check'. This includes the torture tests (trip, trap, and mptrap) that come with Web2c (see section `Torture tests' in Web2c).

    Security

    None of the programs in the TeX system require any special system privileges, so there's no first-level security concern of people gaining illegitimate root access.

    A TeX document, however, can write to arbitrary files, e.g., `~/.rhosts', and thus an unwitting user who runs TeX on a random document is vulnerable to a trojan horse attack. This loophole is closed by default, but you can be permissive if you so desire in `texmf.cnf'. See section `tex invocation' in Web2c. MetaPost has the same issue.

    Dvips, Xdvi, and TeX can also execute shell commands under some circumstances. To disable this, see the `-R' option in section `Option details' in Dvips, the xdvi man page, and section `tex invocation' in Web2c, respectively.

    Another security issue arises because it's very useful--almost necessary--to make arbitrary fonts on user demand with MakeTeXPK and friends. Where do these files get installed? By default, the MakeTeXPK distributed with Kpathsea assumes a globally writable `texmf' tree; this is the simplest and most convenient approach, but it may not suit your situation.

    The first restriction you can apply is to make newly-created directories under `texmf' be append-only with an option in `MakeTeXnames.cnf'. See section `MakeTeX' configuration.

    Another approach is to establish a group (or user) for TeX files, make the `texmf' tree writable only to that group (or user), and make MakeTeXPK et al. setgid to that group (or setuid to that user). Then users must invoke the scripts to install things. (If you're worried about the inevitable security holes in scripts, then you could write a C wrapper to exec the script.)

    Finally, using a central writable `texmf' tree may be completely impossible, because it's on an NFS filesystem that you cannot export read/write, or AFS is in use, or simply because "it's policy". Then you must resort to each user's machine having its own local directory of dynamically-created fonts; again, `MakeTeXnames.cnf' has an option to do this, and again, see section `MakeTeX' configuration.

    TeX directory structure

    This section describes the default installation hierarchy of the distribution. It conforms to both the GNU coding standards and the TeX directory structure (TDS) standard. For rationale and further explanation, please see those documents. The GNU standard is available as @url{ftp://prep.ai.mit.edu/pub/gnu/standards/standards.texi} and mirrors. The TDS document is available from `CTAN:/tex-archive/tds' (see section `unixtex.ftp': Obtaining TeX).

    You can change the default paths in many ways (see section Changing search paths). One common desire is to put everything (binaries and all) under a single top-level directory such as `/usr/local/texmf' or `/opt/texmf'---in the terms used below, make prefix and texmf the same. For specific instructions on doing that, see section configure scenarios.

    Here is a skeleton of the default directory structure, extracted from the TDS document:

    prefix/      installation root (`/usr/local' by default)
     bin/         executables
     man/         man pages
     include/     C header files
     info/        GNU info files
     lib/         libraries (`libkpathsea.*')
     share/       architecture-independent files
      texmf/      TDS root
       bibtex/     BibTeX input files
        bib/        BibTeX databases
         base/       base distribution (e.g., `xampl.bib')
         misc/       single-file databases
         pkg/       name of a package
        bst/        BibTeX style files
         base/       base distribution (e.g., `plain.bst', `acm.bst')
         misc/       single-file styles
         pkg/       name of a package
       doc/         additional documentation
       dvips/       `.pro', `.ps', `psfonts.map'
       fonts/       font-related files
        type/         file type (e.g., `tfm', `pk')
         mode/          type of output device (types `pk' and `gf' only)
          supplier/       name of a font supplier (e.g., `public')
           typeface/        name of a typeface (e.g., `cm')
            dpinnn/           font resolution (types `pk' and `gf' only)
       metafont/    Metafont (non-font) input files
        base/        base distribution (e.g., `plain.mf')
        misc/        single-file packages (e.g., `modes.mf')
        pkg/           name of a package (e.g., `mfpic')
       metapost/    MetaPost input files
        base/        base distribution (e.g., `plain.mp')
        misc/        single-file packages
        pkg/           name of a package
        support/     support files for MetaPost-related utilities (e.g., `trfonts.map')
       mft/         `MFT' inputs (e.g., `plain.mft')
       tex/         TeX input files
        format/         name of a format (e.g., `plain')
         base/        base distribution for format (e.g., `plain.tex')
         misc/        single-file packages (e.g., `webmac.tex')
         local/       local additions to or local configuration files for format
         pkg/           name of a package (e.g., `graphics', `mfnfss')
        generic/     format-independent packages
         hyphen/      hyphenation patterns (e.g., `hyphen.tex')
         images/      image input files (e.g., Encapsulated PostScript)
         misc/        single-file format-independent packages (e.g., `null.tex').
         pkg/           name of a package (e.g., `babel')
       web2c/        implementation-dependent files (`.pool', `.fmt', `texmf.cnf', etc.)
    

    Some concrete examples for most file types:

    /usr/local/bin/tex
    /usr/local/man/man1/xdvi.1
    /usr/local/info/kpathsea.info
    /usr/local/lib/libkpathsea.a
    /usr/local/share/texmf/bibtex/bst/base/plain.bst
    /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmr10.600pk
    /usr/local/share/texmf/fonts/source/public/pandora/pnr10.mf
    /usr/local/share/texmf/fonts/tfm/public/cm/cmr10.tfm
    /usr/local/share/texmf/fonts/type1/adobe/utopia/putr.pfa
    /usr/local/share/texmf/metafont/base/plain.mf
    /usr/local/share/texmf/metapost/base/plain.mp
    /usr/local/share/texmf/tex/plain/base/plain.tex
    /usr/local/share/texmf/tex/generic/hyphen/hyphen.tex
    /usr/local/share/texmf/web2c/tex.pool
    /usr/local/share/texmf/web2c/tex.fmt
    /usr/local/share/texmf/web2c/texmf.cnf
    

    `unixtex.ftp': Obtaining TeX

    This chapter is @url{ftp://ftp.tug.org/tex/unixtex.ftp}, last updated 1 February 1997. Also available as @url{http://www.tug.org/unixtex.ftp}. The IP address is currently [158.121.106.10], and the canonical host name is currently `tug.cs.umb.edu'. It is also in Kpathsea source distributions as `etc/unixtex.ftp' (although the network version is usually newer). Mail @email{kb@mail.tug.org} with comments or questions.

    Following are general instructions for Unix or other sites who wish to acquire the Web2c distribution, (plain) TeX, LaTeX (2e), BibTeX, Metafont, MetaPost, DVI processors for the X window system, PostScript, the PCL language in the HP LaserJet, and related programs. They are oriented towards building from the original sources, though some information on alternative packages is included in the last section. See also @url{http://www.tug.org/web2c}, the Web2c and Kpathsea home page.

    Please consider joining the TeX Users Group (TUG) to help support the maintenance and development of the programs you retrieve. Email @email{tug@tug.org} or see @url{http://www.tug.org} for information and a membership form.

    For actual installation instructions after obtaining the necessary sources, see section Installation. A copy is in the distribution file `kpathsea/INSTALL'.

    Electronic distribution

    In many places we refer to CTAN:. This is both a host name and a directory name. Here are some primary locations:

    @url{ftp://ftp.cdrom.com/pub/tex/ctan}  (California, USA)
    @url{ftp://ftp.dante.de/tex-archive}    (Germany)
    @url{ftp://ftp.tex.ac.uk/tex-archive}   (England)
    

    CTAN has many mirrors worldwide; see the top-level file `README.mirrors' from one of the sites above, or finger @email{ctan@ftp.tug.org}, or see @url{http://www.tug.org/CTAN.sites}. A list current as of the time of distribution is in the top-level file `./MIRROR'.

    You can also access CTAN via the World Wide Web, Gopher, electronic mail, or NFS. The same `README.mirrors' file explains how.

    You will need to retrieve some or all of the following archives, depending on your needs (don't forget to set binary mode for file transfers):

    `CTAN:/systems/web2c/lib.tar.gz'
    A basic collection of fonts (TFM files only) and macro packages (including Texinfo and LaTeX 2e). It unpacks into `texmf/'; if you change the structure of this hierarchy, you will also have to change the default search paths (see section Changing search paths). It is required unless you already have these files, in which case you should change the default paths as necessary to find them.
    `CTAN:/systems/web2c/web.tar.gz'
    The original WEB source files, written mostly by Don Knuth. Required unless you already have this `web' version. (The WEB sources change irregularly with respect to Web2c itself.) Unpacks into `web2c-version'.
    `CTAN:/systems/web2c/web2c.tar.gz'
    The Web2c system. Required. Also unpacks into `web2c-version'.
    `CTAN:/dviware/dvipsk.tar.gz'
    DVI-to-PostScript translator. Unpacks into `dvipsk-version'. Optional.
    `CTAN:/dviware/xdvik.tar.gz'
    X window system DVI previewer. Unpacks into `xdvik-version'. Optional.
    `CTAN:/dviware/dviljk.tar.gz'
    DVI-to-PCL (HP LaserJet) translator. Unpacks into `dviljk-version'. Optional.

    All that said, the originating host for the software above is `ftp.tug.org'. You can retrieve these distributions (but not much else) from the `tex/' directory on that host.

    CD-ROM distribution

    Numerous organizations distribute various TeX CD-ROM's:

    If you know of additional TeX CD-ROM distributions to add to this list, please inform @email{kb@mail.tug.org}.

    Tape distribution

    You can obtain a complete TeX distribution, including Web2c, on tape. Contact:

    Pierre MacKay / Denny Hall, Mail Stop DH-10 / Department of Classics
    University of Washington / Seattle, WA 98195 / USA
    phone: 206-543-2268; email: @email{unixtex@u.washington.edu}
    

    At this writing, the distribution is available in tar format on 1/4 inch 4-track QIC-24 cartridges and 4mm DAT cartridges, and the cost is US$210. Make checks payable to the University of Washington, drawn on a U.S. bank. Purchase orders are acceptable, but they carry an extra charge of $10 to pay for invoice processing. Overseas sites, please add $20 for shipment via air parcel post, or $30 for shipment via courier.

    Other TeX packages

    Many other TeX implementations are available in `CTAN:/systems', including ready-to-run distributions for Unix, Amiga, Acorn, VMS, Macintosh, DOS, and Windows (in various forms). Although Web2c has support in the source code for many operating systems, and in fact some of the other distributions are based on it, it's unlikely to work as distributed on anything but Unix. (Please contribute improvements!)

    The Unix distribution alluded to above is the teTeX distribution. This includes both complete sources and precompiled binaries for many popular Unix variants, including Linux. It is based on Web2c, and contains many other TeX-related programs as well.

    The host labrea.stanford.edu is the original source for the files for which Donald Knuth is directly responsible: `tex.web', `plain.tex', etc. However, unless you want to build your TeX library tree ab initio, it is more reliable and less work to retrieve these files as part of the above packages. In any case, labrea is not the canonical source for anything except what was created by Stanford TeX project, so do not rely on all the files available at that ftp site being up-to-date.

    Reporting bugs

    (A copy of this chapter is in the file `kpathsea/BUGS'.)

    If you have problems or suggestions, please report them to @email{tex-k@mail.tug.org} using the bug checklist below.

    Please report bugs in the documentation; not only factual errors or inconsistent behavior, but unclear or incomplete explanations, typos, wrong fonts, ...

    Bug checklist

    Before reporting a bug, please check below to be sure it isn't already known (see section Common problems).

    Bug reports should be sent via electronic mail to @email{tex-k@mail.tug.org}, or by postal mail to 135 Center Hill Road / Plymouth, MA 02360 / USA.

    The general principle is that a good bug report includes all the information necessary for reproduction. Therefore, to enable investigation, your report should include the following:

    Mailing lists

    Web2c and Kpathsea in general are discussed on the mailing list @email{tex-k@mail.tug.org}. To join, email @email{tex-k-request@mail.tug.org} with a line consisting of

    subscribe you@your.preferred.email.address
    

    in the body of the message.

    You do not need to join to submit a report, nor will it affect whether you get a response. There is no Usenet newsgroup equivalent (if you can be the one to set this up, email `tex-k-request'). Traffic on the list is fairly light, and is mainly bug reports and enhancement requests to the software. The best way to decide if you want to join or not is read some of the archives from @url{ftp://ftp.tug.org/mail/archives/tex-k/}.

    Be aware that large data files are sometimes included in bug reports. If this is a problem for you, do not join the list.

    If you only want announcements of new releases, not bug reports and discussion, join @email{tex-archive@math.utah.edu} (via mail to @email{tex-archive-request@math.utah.edu}).

    If you are looking for general TeX help, such as how to use LaTeX, please use the mailing list @email{info-tex@shsu.edu} mailing list, which is gatewayed to the `comp.text.tex' Usenet newsgroup (or post to the newsgroup; the gateway is bidirectional).

    Debugging

    Kpathsea provides a number of runtime debugging options, detailed below by their names and corresponding numeric values. When the files you expect aren't being found, the thing to do is enable these options and examine the output.

    You can set these with some runtime argument (e.g., `-d') to the program; in that case, you should use the numeric values described in the program's documentation (which, for Dvipsk and Xdvik, are different than those below). It's best to give the `-d' (or whatever) option first, for maximal output. Dvipsk and Xdvik have additional program-specific debugging options as well.

    You can also set the environment variable KPATHSEA_DEBUG; in this case, you should use the numbers below. Also, if you run the program under a debugger and set the variable kpathsea_debug, Also use the numbers below

    In any case, by far the simplest value to use is `-1', which will turn on all debugging output. This is usually better than guessing which particular values will yield the output you need.

    Debugging output always goes to standard error, so you can redirect it easily. For example, in Bourne-compatible shells:

    dvips -d -1 ... 2>/tmp/debug
    

    It is sometimes helpful to run the standalone Kpsewhich utility (see section kpsewhich: Standalone path searching), instead of the original program.

    In any case, you can not use the names below; you must always use somebody's numbers. (Sorry.) To set more than one option, just sum the corresponding numbers.

    KPSE_DEBUG_STAT (1)
    Report `stat'(2) calls. This is useful for verifying that your directory structure is not forcing Kpathsea to do many additional file tests (see section Slow path searching, and see section Subdirectory expansion). If you are using an up-to-date `ls-R' database (see section Filename database (ls-R)), this should produce no output unless a nonexistent file that must exist is searched for.
    KPSE_DEBUG_HASH (2)
    Report lookups in all hash tables: `ls-R' and `aliases' (see section Filename database (ls-R)); font aliases (see section Fontmap); and config file values (see section Config files). Useful when expected values are not being found, e.g.., file searches are looking at the disk instead of using `ls-R'.
    KPSE_DEBUG_FOPEN (4)
    Report file openings and closings. Especially useful when your system's file table is full, for seeing which files have been opened but never closed. In case you want to set breakpoints in a debugger: this works by redefining `fopen' (`fclose') to be `kpse_fopen_trace' (`kpse_fclose_trace').
    KPSE_DEBUG_PATHS (8)
    Report general path information for each file type Kpathsea is asked to search. This is useful when you are trying to track down how a particular path got defined--from `texmf.cnf', `config.ps', an environment variable, the compile-time default, etc. This is the contents of the kpse_format_info_type structure defined in `tex-file.h'.
    KPSE_DEBUG_EXPAND (16)
    Report the directory list corresponding to each path element Kpathsea searches. This is only relevant when Kpathsea searches the disk, since `ls-R' searches don't look through directory lists in this way.
    KPSE_DEBUG_SEARCH (32)
    Report on each file search: the name of the file searched for, the path searched in, whether or not the file must exist (when drivers search for `cmr10.vf', it need not exist), and whether or not we are collecting all occurrences of the file in the path (as with, e.g., `texmf.cnf' and `texfonts.map'), or just the first (as with most lookups). This can help you correlate what Kpathsea is doing with what is in your input file.

    Debugging output from Kpathsea is always written to standard error, and begins with the string `kdebug:'. (Except for hash table buckets, which just start with the number, but you can only get that output running under a debugger. See comments at the hash_summary_only variable in `kpathsea/db.c'.)

    Logging

    Kpathsea can record the time and filename found for each successful search. This may be useful in finding good candidates for deletion when your filesystem is full, or in discovering usage patterns at your site.

    To do this, define the environment or config file variable TEXMFLOG. The value is the name of the file to append the information to. The file is created if it doesn't exist, and appended to if it does.

    Each successful search turns into one line in the log file: two words separated by a space. The first word is the time of the search, as the integer number of seconds since "the epoch", i.e., UTC midnight 1 January 1970 (more precisely, the result of the time system call). The second word is the filename.

    For example, after setenv TEXMFLOG /tmp/log, running Dvips on `story.dvi' appends the following lines:

    774455887 /usr/local/share/texmf/dvips/config.ps
    774455887 /usr/local/share/texmf/dvips/psfonts.map
    774455888 /usr/local/share/texmf/dvips/texc.pro
    774455888 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmbx10.600pk
    774455889 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmsl10.600pk
    774455889 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmr10.600pk
    774455889 /usr/local/share/texmf/dvips/texc.pro
    

    Only filenames that are absolute are recorded, to preserve some semblance of privacy.

    Common problems

    Here are some common problems with configuration, compilation, linking, execution, ...

    Unable to find files

    If a program complains it cannot find fonts (or other input files), any of several things might be wrong. In any case, you may find the debugging options helpful. See section Debugging.

    Slow path searching

    If your program takes an excessively long time to find fonts or other input files, but does eventually succeed, here are some possible culprits:

    In any case, you may find the debugging options helpful in determining precisely when the disk or network is being pounded. See section Debugging.

    Unable to generate fonts

    This can happen if either MakeTeXPK hasn't been installed properly, or if the local installation of Metafont isn't correct.

    If mf is a command not found by MakeTeXPK, then you need to install Metafont (see section `unixtex.ftp': Obtaining TeX).

    If Metafont runs, but generates fonts at the wrong resolution, you need to be sure the `M' and `D' lines in your Dvips configuration file match (see section `Config files' in Dvips). For example, if MakeTeXPK is generating 300dpi fonts, but you need 600dpi fonts, you should have:

    M ljfour
    D 600
    

    If Metafont runs but generates fonts at a resolution of 2602dpi (and prints out the name of each character as well as just a character number, and maybe tries to display the characters), then your Metafont base file probably hasn't been made properly. (It's using the default proof mode, instead of an actual device mode.) To make a proper `plain.base', assuming the local mode definitions are contained in a file `modes.mf', run the following command (assuming Unix):

    inimf "plain; input modes; dump"
    

    Then copy the `plain.base' file from the current directory to where the base files are stored on your system (`/usr/local/share/texmf/web2c' by default), and make a link (either hard or soft) from `plain.base' to `mf.base' in that directory. See section `inimf invocation' in Web2c.

    TeX or Metafont failing

    If TeX or Metafont get a segmentation fault or otherwise fail while running a normal input file, the problem is usually a compiler bug (unlikely as that may sound). Even if the trip and trap tests are passed, problems may lurk. Optimization occasionally causes trouble in programs other than TeX and Metafont themselves, too.

    Insufficient swap space may also cause core dumps or other erratic behavior.

    For a workaround, if you enabled any optimization flags, it's best to omit optimization entirely. In any case, the way to find the facts is to run the program under the debugger and see where it's failing.

    Also, if you have trouble with a system C compiler, I advise trying the GNU C compiler. And vice versa, unfortunately; but in that case I also recommend reporting a bug to the GCC mailing list; see section `Bugs' in Using and Porting GNU CC.

    To report compiler bugs effectively requires perseverance and perspicacity: you must find the miscompiled line, and that usually involves delving backwards in time from the point of error, checking through TeX's (or whatever program's) data structures. Things are not helped by all-too-common bugs in the debugger itself. Good luck.

    XtStrings

    You may find that linking X programs results in an error from the linker that `XtStrings' is undefined, something like this:

    gcc -o virmf ...
    .../x11.c:130: undefined reference to `XtStrings'
    

    This generally happens because of a mismatch between the X include files with which you compiled and the X libraries with which you linked; often, the include files are from MIT and the libraries from Sun.

    The solution is to use the same X distribution for compilation and linking. Probably `configure' was unable to guess the proper directories from your installation. You can use the configure options `--x-includes=path' and `--x-libraries=path' to explicitly specify them.

    dlopen

    (This section adapted from the file `dlsym.c' in the X distribution.)

    The Xlib library uses the standard C function wcstombs. Under SunOS 4.1, wcstombs uses the `dlsym' interface defined in `libdl.so'. Unfortunately, the SunOS 4.1 distribution does not include a static `libdl.a' library.

    As a result, if you try to link an X program statically under SunOS, you may get undefined references to dlopen, dlsym, and dlclose. One workaround is to include these definitions when you link:

    void *dlopen() { return 0; }
    void *dlsym()  { return 0; }
    int dlclose()  { return -1; }
    

    These are contained in the `dlsym.c' file in the MIT X distribution.

    ShellWidgetClass

    (This section adapted from the comp.sys.sun.admin FAQ.)

    If you are linking with Sun's OpenWindows libraries in SunOS 4.1.x, you may get undefined symbols _get_wmShellWidgetClass and _get_applicationShellWidgetClass when linking. This problem does not arise using the standard MIT X libraries under SunOS.

    The cause is bugs in the Xmu shared library as shipped from Sun. There are several fixes:

    Here is the information for getting the two patches:

    Patch ID: 100512-02
    Bug ID's: 1086793, 1086912, 1074766
    Description: 4.1.x OpenWindows 3.0 libXt jumbo patch
    
    Patch ID: 100573-03
    Bug ID: 1087332
    Description: 4.1.x OpenWindows 3.0 undefined symbols when using shared libXmu.
    

    The way to statically link with libXmu depends on whether you are using a Sun compiler (e.g., cc) or gcc. If the latter, alter the x_libs Make variable to include

    -static -lXmu -dynamic
    

    If you are using the Sun compiler, use `-Bstatic' and `-Bdynamic'.

    Pointer combination warnings

    When compiling with old C compilers, you may get some warnings about "illegal pointer combinations". These are spurious; just ignore them. I decline to clutter up the source with casts to get rid of them.

    Path searching

    This chapter describes the generic path searching mechanism Kpathsea provides. For information about searching for particular file types (e.g., TeX fonts), see the next chapter.

    Searching overview

    A search path is a colon-separated list of path elements, which are directory names with a few extra frills. A search path can come from (a combination of) many sources; see below. To look up a file `foo' along a path `.:/dir', Kpathsea checks each element of the path in turn: first `./foo', then `/dir/foo', returning the first match (or possibly all matches).

    The "colon" and "slash" mentioned here aren't necessarily `:' and `/' on non-Unix systems. Kpathsea tries to adapt to other operating systems' conventions.

    To check a particular path element e, Kpathsea first sees if a prebuilt database (see section Filename database (ls-R)) applies to e, i.e., if the database is in a directory that is a prefix of e. If so, the path specification is matched against the contents of the database.

    If the database does not exist, or does not apply to this path element, or contains no matches, the filesystem is searched (if this was not forbidden by the specification with `!!' and if the file being searched for must exist). Kpathsea constructs the list of directories that correspond to this path element, and then checks in each for the file being searched for. (To help speed future lookups of files in the same directory, the directory in which a file is found is floated to the top of the directory list.)

    The "file must exist" condition comes into play with VF files and input files read by the TeX `\openin' command. These files may not exist (consider `cmr10.vf'), and so it would be wrong to search the disk for them. Therefore, if you fail to update `ls-R' when you install a new VF file, it will never be found.

    Each path element is checked in turn: first the database, then the disk. If a match is found, the search stops and the result is returned. This avoids possibly-expensive processing of path specifications that are never needed on a particular run. (Unless the search explicitly requested all matches.)

    Although the simplest and most common path element is a directory name, Kpathsea supports additional features in search paths: layered default values, environment variable names, config file values, users' home directories, and recursive subdirectory searching. Thus, we say that Kpathsea expands a path element, meaning transforming all thel magic specifications into the basic directory name or names. This process is described in the sections below. It happens in the same order as the sections.

    Exception to all of the above: If the filename being searched for is absolute or explicitly relative, i.e., starts with `/' or `./' or `../', Kpathsea simply checks if that file exists.

    Ordinarily, if Kpathsea tries to access a file or directory that cannot be read, it gives a warning. This is so you will be alerted to directories or files that accidentally lack read permission (for example, a `lost+found'). If you prefer not to see these warnings, include the value `readable' in the TEX_HUSH environment variable or config file value.

    This generic path searching algorithm is implemented in `kpathsea/pathsearch.c'. It is employed by a higher-level algorithm when searching for a file of a particular type (see section File lookup, and section Glyph lookup).

    Path sources

    A search path can come from many sources. In the order in which Kpathsea uses them:

    1. A user-set environment variable, e.g., TEXINPUTS. Environment variables with an underscore and the program name appended override; for example, TEXINPUTS_latex overrides TEXINPUTS if the program being run is named `latex'.
    2. A program-specific configuration file, e.g., an `S /a:/b' line in Dvips' `config.ps' (see section `Config files' in Dvips).
    3. A line in a Kpathsea configuration file `texmf.cnf', e.g., `TEXINPUTS=/c:/d' (see below).
    4. The compile-time default (specified in `kpathsea/paths.h').

    You can see each of these values for a given search path by using the debugging options (see section Debugging).

    These sources may be combined via default expansion (see section Default expansion).

    Config files

    As mentioned above, Kpathsea reads runtime configuration files named `texmf.cnf' for search path and other definitions. The search path used to look for these configuration files is named TEXMFCNF, and is constructed in the usual way, as described above, except that configuration files cannot be used to define the path, naturally; also, an `ls-R' database is not used to search for them.

    Kpathsea reads all `texmf.cnf' files in the search path, not just the first one found; definitions in earlier files override those in later files. Thus, with the search path of `.:$TEXMF', values from `./texmf.cnf' override those from `$TEXMF/texmf.cnf'.

    While (or instead of) reading this description, you may find it helpful to look at the distributed `texmf.cnf', which uses or at least mentions most features. The format of `texmf.cnf' files follows:

    Here is a configuration file fragment illustrating most of these points:

    % TeX input files -- i.e., anything to be found by \input or \openin ...
    latex209_inputs = .:$TEXMF/tex/latex209//:$TEXMF/tex//
    latex2e_inputs = .:$TEXMF/tex/latex//:$TEXMF/tex//
    TEXINPUTS = .:$TEXMF/tex//
    TEXINPUTS.latex209 = $latex209_inputs
    TEXINPUTS.latex2e = $latex2e_inputs
    TEXINPUTS.latex = $latex2e_inputs
    

    Although this format has obvious similarities to Bourne shell scripts--change the comment character to #, disallow spaces around the =, and get rid of the .name convention, and it could be run through the shell. But there seemed little advantage to doing this, since all the information would have to passed back to Kpathsea and parsed there anyway, since the sh process couldn't affect its parent's environment.

    The implementation of all this is in `kpathsea/cnf.c'.

    Path expansion

    Kpathsea recognizes certain special characters and constructions in search paths, similar to that in shells. As a general example: `~$USER/{foo,bar}//baz' expands to all subdirectories under directories `foo' and `bar' in $USER's home directory that contain a directory or file `baz'. These expansions are explained in the sections below.

    Default expansion

    If the highest-priority search path (see section Path sources) contains an extra colon (i.e., leading, trailing, or doubled), Kpathsea inserts at that point the next-highest-priority search path that is defined. If that inserted path has an extra colon, the same happens with the next-highest. (An extra colon in the compile-time default value has unpredictable results, so installers beware.)

    For example, given an environment variable setting

    setenv TEXINPUTS /home/karl:
    

    and a TEXINPUTS value from `texmf.cnf' of

    .:$TEXMF//tex
    

    then the final value used for searching will be:

    /home/karl:.:$TEXMF//tex
    

    Since Kpathsea looks for multiple configuration files, it would be natural to expect that (for example) an extra colon in `./texmf.cnf' would expand to the path in `$TEXMF/texmf.cnf'. Or, with Dvips' configuration files, that an extra colon in `config.$PRINTER' would expand to the path in `config.ps'. This doesn't happen. It's not clear this would be desirable in all cases, and trying to devise a way to specify the path to which the extra colon should expand seemed truly baroque.

    Technicality: Since it would be useless to insert the default value in more than one place, Kpathsea changes only one extra `:' and leaves any others in place (where they will eventually be equivalent to `.', i.e., the current directory). Kpathsea checks first for a leading `:', then a trailing `:', then a doubled `:'.

    You can trace this by debugging "paths" (see section Debugging). Default expansion is implemented in the source file `kpathsea/kdefault.c'.

    Variable expansion

    `$foo' or `${foo}' in a path element is replaced by (1) the value of an environment variable `foo' (if defined); (2) the value of `foo' from `texmf.cnf' (if defined); (3) the empty string.

    If the character after the `$' is alphanumeric or `_', the variable name consists of all consecutive such characters. If the character after the `$' is a `{', the variable name consists of everything up to the next `}' (braces may not be nested). Otherwise, Kpathsea gives a warning and ignores the `$' and its following character.

    You must quote the $'s and braces as necessary for your shell. Shell variable values cannot be seen by Kpathsea, i.e., ones defined by set in C shells and without export in Bourne shells.

    For example, given

    setenv tex /home/texmf
    setenv TEXINPUTS .:$tex:${tex}prev
    

    the final TEXINPUTS path is the three directories:

    .:/home/texmf:/home/texmfprev
    

    The `.progname' suffix on variables and `_progname' on environment variable names are not implemented for general variable expansions. These are only recognized when search paths are initialized (see section Path sources).

    Variable expansion is implemented in the source file `kpathsea/variable.c'.

    Tilde expansion

    A leading `~' in a path element is replaced by the value of the environment variable HOME, or `.' if HOME is not set.

    A leading `~user' in a path element is replaced by user's home directory from the system `passwd' database.

    For example,

    setenv TEXINPUTS ~/mymacros:
    

    will prepend a directory `mymacros' in your home directory to the default path.

    As a special case, if a home directory ends in `/', the trailing slash is dropped, to avoid inadvertently creating a `//' construct in the path. For example, if the home directory of the user `root' is `/', the path element `~root/mymacros' expands to just `/mymacros', not `//mymacros'.

    Tilde expansion is implemented in the source file `kpathsea/tilde.c'.

    Brace expansion

    `x{a,b}y' expands to `xay:xby'. For example:

    foo/{1,2}/baz
    

    expands to `foo1baz:foo2baz'. `:' is the path separator on the current system; e.g., on a DOS system, it's `;'.

    Braces can be nested; for example, `x{a,b{1,2}}y' expands to `xay:xb1y:xb2y'.

    This feature can be used to implement multiple TeX hierarchies, by assigning a brace list to $TEXMF, as mentioned in `texmf.cnf.in'.

    Brace expansion is implemented in the source file `kpathsea/expand.c'. It is taken from Bash, and is thus covered by the GNU General Public License, rather than the Library General Public License that covers the rest of Kpathsea.

    Subdirectory expansion

    Two or more consecutive slashes in a path element following a directory d is replaced by all subdirectories of d: first those subdirectories directly under d, then the subsubdirectories under those, and so on. At each level, the order in which the directories are searched is unspecified. (It's "directory order", and definitely not alphabetical.)

    If you specify any filename components after the `//', only subdirectories which match those components are included. For example, `/a//b' would expand into directories `/a/1/b', `/a/2/b', `/a/1/1/b', and so on, but not `/a/b/c' or `/a/1'.

    You can include multiple `//' constructs in the path.

    `//' at the beginning of a path is ignored; you didn't really want to search every directory on the system, did you?

    I should mention one related implementation trick, which I took from GNU find. Matthew Farwell suggested it, and David MacKenzie implemented it.

    The trick is that in every real Unix implementation (as opposed to the POSIX specification), a directory which contains no subdirectories will have exactly two links (namely, one for `.' and one for `..'). That is to say, the st_nlink field in the `stat' structure will be two. Thus, we don't have to stat everything in the bottom-level (leaf) directories--we can just check st_nlink, notice it's two, and do no more work.

    But if you have a directory that contains a single subdirectory and 500 regular files, st_nlink will be 3, and Kpathsea has to stat every one of those 501 entries. Therein lies slowness.

    You can disable the trick by undefining UNIX_ST_LINK in `kpathsea/config.h'. (It is undefined by default except under Unix.)

    Unfortunately, in some cases files in leaf directories are stat'd: if the path specification is, say, `$TEXMF/fonts//pk//', then files in a subdirectory `.../pk', even if it is a leaf, are checked. The reason cannot be explained without reference to the implementation, so read `kpathsea/elt-dirs.c' (search for `may descend') if you are curious. And if you can find a way to solve the problem, please let me know.

    Subdirectory expansion is implemented in the source file `kpathsea/elt-dirs.c'.

    Filename database (ls-R)

    Kpathsea goes to some lengths to minimize disk accesses for searches (see section Subdirectory expansion). Nevertheless, at installations with enough directories, searching each possible directory for a given file can take an excessively long time (depending on the speed of the disk, whether it's NFS-mounted, how patient you are, etc.).

    In practice, a font tree containing the standard PostScript and PCL fonts is large enough for searching to be noticeably slow on typical systems these days. Therefore, Kpathsea can use an externally-built "database" file named `ls-R' that maps files to directories, thus avoiding the need to exhaustively search the disk.

    A second database file `aliases' allows you to give additional names to the files listed in `ls-R'. This can be helpful to adapt to "8.3" filename conventions in source files.

    The `ls-R' and `aliases' features are implemented in the source file `kpathsea/db.c'.

    `ls-R'

    As mentioned above, you must name the main filename database `ls-R'. You can put one at the root of each TeX installation hierarchy you wish to search ($TEXMF by default); most sites have only one hierarchy. Kpathsea looks for `ls-R' files along the TEXMFDBS path, so that should presumably match the list of hierarchies.

    The recommended way to create and maintain `ls-R' is to run the MakeTeXls-R script, which is installed in `$(bindir)' (`/usr/local/bin' by default). That script goes to some trouble to follow symbolic links as necessary, etc. It's also invoked by the distributed `MakeTeX...' scripts.

    At its simplest, though, you can build `ls-R' with the command

    cd /your/texmf/root && ls -LAR ./ >ls-R
    

    presuming your ls produces the right output format (see the section below). GNU ls, for example, outputs in this format. Also presuming your ls hasn't been aliased in a system file (e.g., `/etc/profile') to something problematic, e.g., `ls --color=tty'. In that case, you will have to disable the alias before generating `ls-R'. For the precise definition of the file format, see section Database format.

    Regardless of whether you use the supplied script or your own, you will almost certainly want to invoke it via cron, so when you make changes in the installed files (say if you install a new LaTeX package), `ls-R' will be automatically updated.

    The `-A' option to ls includes files beginning with `.' (except for `.' and `..'), such as the file `.tex' included with the LaTeX tools package. (On the other hand, directories whose names begin with `.' are always ignored.)

    If your system does not support symbolic links, omit the `-L'.

    ls -LAR /your/texmf/root will also work. But using `./' avoids embedding absolute pathnames, so the hierarchy can be easily transported. It also avoids possible trouble with automounters or other network filesystem conventions.

    Kpathsea warns you if it finds an `ls-R' file, but the file does not contain any usable entries. The usual culprit is running plain `ls -R' instead of `ls -LR ./' or `ls -R /your/texmf/root'. Another possibility is some system directory name starting with a `.' (perhaps if you are using AFS); Kpathsea ignores everything under such directories.

    Because the database may be out-of-date for a particular run, if a file is not found in the database, by default Kpathsea goes ahead and searches the disk. If a particular path element begins with `!!', however, only the database will be searched for that element, never the disk. If the database does not exist, nothing will be searched. Because this can surprise users ("I see the font `foo.tfm' when I do an ls; why can't Dvips find it?"), it is not in any of the default search paths.

    Filename aliases

    In some circumstances, you may wish to find a file under several names. For example, suppose a TeX document was created using a DOS system and tries to read `longtabl.sty'. But now it's being run on a Unix system, and the file has its original name, `longtable.sty'. The file won't be found. You need to give the actual file `longtable.sty' an alias `longtabl.sty'.

    You can handle this by creating a file `aliases' as a companion to the `ls-R' for the hierarchy containing the file in question. (You must have an `ls-R' for the alias feature to work.)

    The format of `aliases' is simple: two whitespace-separated words per line; the first is the real name `longtable.sty', and second is the alias (`longtabl.sty'). These must be base filenames, with no directory components. `longtable.sty' must be in the sibling `ls-R'.

    Also, blank lines and lines starting with `%' or `#' are ignored in `aliases', to allow for comments.

    If a real file `longtabl.sty' exists, it is used regardless of any aliases.

    Database format

    The "database" read by Kpathsea is a line-oriented file of plain text. The format is that generated by GNU (and most other) ls programs given the `-R' option, as follows.

    For example, here's the first few lines of `ls-R' (which totals about 30K bytes) on my system:

    bibtex
    dvips
    fonts
    ls-R
    metafont
    metapost
    tex
    web2c
    
    ./bibtex:
    bib
    bst
    doc
    
    ./bibtex/bib:
    asi.bib
    btxdoc.bib
    ...
    

    kpsewhich: Standalone path searching

    The Kpsewhich program exercises the path searching functionality independent of any particular application. This can also be useful as a sort of find program to locate files in your TeX hierarchies, perhaps in administrative scripts. It is used heavily in the distributed `MakeTeX...' scripts.

    Synopsis:

    kpsewhich option... filename...
    

    The options and filename(s) to look up can be intermixed. Options can start with either `-' or `--', and any unambiguous abbreviation is accepted.

    Path searching options

    Kpsewhich looks up each non-option argument on the command line as a filename, and returns the first file found. There is no option to return all the files with a particular name (you can run the Unix `find' utility for that, see section `Invoking find' in GNU find utilities).

    Various options alter the path searching behavior:

    `--dpi=num'
    Set the resolution to num; this only affects `gf' and `pk' lookups. `-D' is a synonym, for compatibility with Dvips. Default is 600.
    `--format=name'
    Set the format for lookup to name. By default, the format is guessed from the filename. In fact, the recognized filename extensions and the allowable names (including any leading `.') are the same. You can also specify an integer for name; this is the only way to specify formats that don't have an associated suffix, such as MetaPost support files and Dvips configuration files. It's also somewhat faster, since no unused formats need to be initialized. The integers appear in the output of `--help', and are of course subject to change. Here's the current list of recognized names and numbers. See section Supported file formats, for more information on each of these.
    gf(0)
    pk(1)
    bitmap font (2)
    .afm(3)
    .base(4)
    .bib(5)
    .bst(6)
    .cnf(7)
    ls-R(8)
    .fmt(9)
    .map(10)
    .mem(11)
    .mf(12)
    .pool(13)
    .mft(14)
    .mp(15)
    .pool(16)
    MetaPost support (17)
    .ocp(18)
    .ofm(19)
    .opl(20)
    .otp(21)
    .ovf(22)
    .ovp(23)
    graphic/figure (24) .eps .epsi
    .tex(25) .ltx .dtx .texi .texinfo .txi .eps .epsi
    TeX documentation (26)
    .pool(27)
    TeX sources (28)
    PostScript header/font (29) .pro
    Troff fonts (30)
    .tfm(31)
    .pfa(32) .pfb
    .vf(33)
    dvips config (34)
    .ist(35)
    
    This option and `--path' are mutually exclusive.
    `--interactive'
    After processing the command line, read additional filenames to look up from standard input.
    `-maketex=filetype'
    `-no-maketex=filetype'
    Turn on or off the `MakeTeX' script associated with filetype. The only values that make sense for filetype are `pk', `mf', `tex', and `tfm'. By default, all are off in Kpsewhich. See section `MakeTeX' scripts.
    `--mode=string'
    Set the mode name to string; this also only affects `gf' and `pk' lookups. No default: any mode will be found. See section `MakeTeX' script arguments.
    `--must-exist'
    Do everything possible to find the files, notably including searching the disk. By default, only the `ls-R' database is checked, in the interest of efficiency.
    `--path=string'
    Search along the path string (colon-separated as usual), instead of guessing the search path from the filename. `//' and all the usual expansions are supported (see section Path expansion). This option and `--format' are mutually exclusive. To output the complete directory expansion of a path, instead of doing a one-shot lookup, see `--path-expand' in the following section.
    `--progname=name'
    Set the program name to name; default is `kpsewhich'. This can affect the search paths via the `.prognam' feature in configuration files (see section Config files).

    Auxiliary tasks

    Kpsewhich provides some additional features not strictly related to path lookup:

    Standard options

    Kpsewhich accepts the standard GNU options:

    TeX support

    Although the basic features in Kpathsea can be used for any type of path searching, it came about (like all libraries) with a specific application in mind: I wrote Kpathsea specifically for TeX system programs. I had been struggling with the programs I was using (Dvips, Xdvi, and TeX itself) having slightly different notions of how to specify paths; and debugging was painful, since no code was shared.

    Therefore, Kpathsea provides some TeX-specific formats and features. Indeed, many of the supposedly generic path searching features were provided because they seemed useful in that conTeXt (font lookup, particularly).

    Kpathsea provides a standard way to search for files of any of the supported file types; glyph fonts are a bit different than all the rest. Searches are based solely on filenames, not file contents--if a GF file is named `cmr10.600pk', it will be found as a PK file.

    Supported file formats

    Kpathsea has support for a number of file types. Each file type has a list of environment and config file variables that are checked to define the search path, and most have a default suffix that plays a role in finding files (see the next section). Some also define additional suffixes, and/or a program to be run to create missing files on the fly.

    Since environment variables containing periods, such as `TEXINPUTS.latex', are not allowed on some systems, Kpathsea looks for environment variables with an underscore, e.g., `TEXINPUTS_latex' (see section Config files).

    The following table lists the above information.

    `.afm'
    (Adobe font metrics, see section `Metric files' in Dvips) AFMFONTS.
    `.base'
    (Metafont memory dump, see section `Memory dumps' in Web2c) MFBASES, TEXMFINI.
    `.bib'
    (BibTeX bibliography source, see section `bibtex invocation' in Web2c) BIBINPUTS, TEXBIB.
    `.bst'
    (BibTeX style file, see section `Basic BibTeX style files' in Web2c) BSTINPUTS.
    `.cnf'
    (Runtime configuration files, see section Config files) TEXMFCNF.
    `ls-R'
    (Filename databases, see section Filename database (ls-R)) TEXMFDBS.
    `.fmt'
    (TeX memory dump, see section `Memory dumps' in Web2c) TEXFORMATS, TEXMFINI.
    `gf'
    (generic font bitmap, see section `Glyph files' in Dvips) programFONTS, GFFONTS, GLYPHFONTS, TEXFONTS.
    `.map'
    (Fontmaps, see section Fontmap) TEXFONTMAPS.
    `.ist'
    (makeindex style files) TEXINDEXSTYLE, INDEXSTYLE.
    `.mem'
    (MetaPost memory dump, see section `Memory dumps' in Web2c) MPMEMS, TEXMFINI.
    `.mf'
    (Metafont source, see section `mf invocation' in Web2c) MFINPUTS; dynamic creation program: MakeTeXMF.
    `.mft'
    (MFT style file, see section `mft invocation' in Web2c) MFTINPUTS.
    `mf.pool'
    (Metafont program strings, see section `pooltype invocation' in Web2c) MFPOOL, TEXMFINI.
    `.mp'
    (MetaPost source, see section `mpost invocation' in Web2c) MPINPUTS.
    `mp.pool'
    (MetaPost program strings, see section `pooltype invocation' in Web2c) MPPOOL, TEXMFINI.
    `(none)'
    (MetaPost support files, used by DMP; see section `dmp invocation' in Web2c) MPSUPPORT.
    `.ocp'
    (Omega compiled process files) OCPINPUTS;
    dynamic creation program: MakeOmegaOCP.
    `.ofm'
    (Omega font metrics) OFMFONTS, TEXFONTS;
    dynamic creation program: MakeOmegaOFM.
    `.opl'
    (Omega property lists) OPLFONTS, TEXFONTS.
    `.otp'
    (Omega translation process files) OTPINPUTS.
    `.ovf'
    (Omega virtual fonts) OVFFONTS, TEXFONTS.
    `.ovp'
    (Omega virtual property lists) OVPFONTS, TEXFONTS.
    `.eps'
    (Encapsulated PostScript figures, see section `PostScript figures' in Dvips) TEXPICTS, TEXINPUTS; additional suffixes: `.epsi'.
    `pk'
    (packed bitmap fonts, see section `Glyph files' in Dvips) PROGRAMFONTS (program being `XDVI', etc.), PKFONTS, TEXPKS, GLYPHFONTS, TEXFONTS; dynamic creation program: MakeTeXPK.
    `.pro'
    (downloadable PostScript, see section `Header files' in Dvips) TEXPSHEADERS, PSHEADERS.
    `.tex'
    (TeX source, see section `tex invocation' in Web2c) TEXINPUTS; additional suffixes: `.ltx' `.dtx' `.texi' `.texinfo' `.txi' `.eps' `.epsi'; dynamic creation program: MakeTeXTeX.
    `(none)'
    (Documentation files for the TeX system) TEXDOCS.
    `tex.pool'
    (TeX program strings, see section `pooltype invocation' in Web2c) TEXPOOL, TEXMFINI.
    `(none)'
    (Source files for the TeX system) TEXSOURCES.
    `.tfm'
    (TeX font metrics, see section `Metric files' in Dvips) TFMFONTS, TEXFONTS; dynamic creation program: MakeTeXTFM.
    `(none)'
    (Troff fonts, used by DMP; see section `DMP invocation' in Web2c) TRFONTS.
    `.pfa'
    (Type 1 PostScript outline fonts, see section `Glyph files' in Dvips) T1FONTS, T1INPUTS, TEXPSHEADERS, DVIPSHEADERS; additional suffix: `.pfb'.
    `.vf'
    (virtual fonts, see section `Virtual fonts' in Dvips) VFFONTS, TEXFONTS.
    `(none)'
    (Dvips `config.*' files, such as `config.ps', see section `Config files' in Dvips) TEXCONFIG.

    If an environment variable by these names are set, the corresponding `texmf.cnf' definition won't be looked at (unless, as usual, the environment variable value has an extra `:'). See section Default expansion.

    For the font variables, the intent is that:

    File lookup

    This section describes how Kpathsea searches for most files (bitmap font searches are the exception, as described in the next section).

    Here is the search strategy for a file name:

    1. If name has a suffix, search for exactly name along the appropriate path. Example: given `foo.sty', look for `foo.sty' before `foo.sty.tex', even though it's a TeX input file.
    2. If the file format defines a default suffix, and the suffix of name is not already that default, try appending the default. Example: given `foo.bar', search for `foo.bar.tex'. But if given `foo.tex', don't bother to search for `foo.tex.tex'.
    3. If we're searching for a TFM, PK, or GF file, look for aliases of name in `texfonts.map' files (see section Fontmap). Example: given `Times-Roman', find `ptmr'.
    4. If the file format defines a program to invoke to create missing files, run it (see section `MakeTeX' scripts).
    5. Search for name itself, if we haven't done so already. Example: given `foo', search for `foo'.

    This is implemented in the routine kpse_find_file in `kpathsea/tex-file.c'. You can watch it in action with the debugging options (see section Debugging).

    Glyph lookup

    This section describes how Kpathsea searches for a bitmap font in GF or PK format (or either) given a font name (e.g., `cmr10') and a resolution (e.g., 600).

    Here is an outline of the search strategy (details in the sections below) for a file name at resolution dpi. The search stops at the first successful lookup.

    1. Look for an existing file name.dpiformat in the specified format(s).
    2. If name is an alias for a file f in the fontmap file `texfonts.map', look for f.dpi.
    3. Run an external program (typically named `MakeTeXPK') to generate the font (see section `MakeTeX' scripts)
    4. Look for fallback.dpi, where fallback is some last-resort font (typically `cmr10').

    This is implemented in kpse_find_glyph_format in `kpathsea/tex-glyph.c'.

    Basic glyph lookup

    When Kpathsea looks for a bitmap font name at resolution dpi in a format format, it first checks each directory in the search path for a file `name.dpiformat'; for example, `cmr10.600pk'. Kpathsea looks for a PK file first, then a GF file.

    If that fails, Kpathsea looks for `dpidpi/name.format'; for example, `dpi600/cmr10.pk'. This is how fonts are typically stored on filesystems (such as DOS) that permit only three-character extensions.

    If that fails, Kpathsea looks for a font with a close-enough dpi. "Close enough" is defined by the macro KPSE_BITMAP_TOLERANCE in `kpathsea/tex-glyph.h' to be dpi / 500 + 1. This is slightly more than the 0.2% minimum allowed by the DVI standard (@url{CTAN:/dviware/driv-standard/level-0}).

    Fontmap

    If a bitmap font or metric file is not found with the original name (see the previous section), Kpathsea looks through any fontmap files for an alias for the original font name. These files are named `texfonts.map' and searched for along the TEXFONTMAPS environment/config file variable. All `texfonts.map' files that are found are read; earlier definitions override later ones.

    This feature is intended to help in two respects:

    1. An alias name is limited in length only by available memory, not by your filesystem. Therefore, if you want to ask for `Times-Roman' instead of `ptmr', you can (you get `ptmr8r').
    2. A few fonts have historically had multiple names: specifically, LaTeX's "circle font" has variously been known as `circle10', `lcircle10', and `lcirc10'. Aliases can make all the names equivalent, so that it no longer matters what the name of the installed file is; TeX documents will find their favorite name.

    The format of fontmap files is straightforward:

    If an alias has an extension, it matches only those files with that extension; otherwise, it matches anything with the same root, regardless of extension. For example, an alias `foo.tfm' matches only when `foo.tfm' is being searched for; but an alias `foo' matches `foo.vf', `foo.600pk', etc.

    As an example, here is an excerpt from the `texfonts.map' in the Web2c distribution. It makes the circle fonts equivalent and includes automatically generated maps for most PostScript fonts available from various font suppliers.

    circle10        lcircle10
    circle10        lcirc10
    lcircle10       circle10
    lcircle10       lcirc10
    lcirc10         circle10
    lcirc10         lcircle10
    ...
    include adobe.map
    include apple.map
    include bitstrea.map
    ...
    

    Fontmaps are implemented in the file `kpathsea/fontmap.c'. The Fontname distribution has much more information on font naming (see section `Introduction' in Filenames for TeX fonts).

    Fallback font

    If a bitmap font cannot be found or created at the requested size, Kpathsea looks for the font at a set of fallback resolutions. You specify these resolutions as a colon-separated list (like search paths). Kpathsea looks first for a program-specific environment variable (e.g., DVIPSSIZES for Dvipsk), then the environment variable TEXSIZES, then a default specified at compilation time (the Make variable default_texsizes). You can set this list to be empty if you prefer to find fonts at their stated size or not at all.

    Finally, if the font cannot be found even at the fallback resolutions, Kpathsea looks for a fallback font, typically `cmr10'. Programs must enable this feature by assigning to the global variable kpse_fallback_font or calling kpse_init_prog (see section Calling sequence); the default is no fallback font.

    Suppressing warnings

    Kpathsea provides a way to suppress selected usually-harmless warnings; this is useful at large sites where most users are not administrators, and thus the warnings are merely a source of confusion, not a help. To do this, you set the environment variable or configuration file value TEX_HUSH to a colon-separated list of values. Here are the possibilities:

    `all'
    Suppress everything possible.
    `checksum'
    Suppress mismatched font checksum warnings.
    `lostchar'
    Suppress warnings when a character is missing from a font that a DVI or VF file tries to typeset.
    `readable'
    Suppress warnings about attempts to access a file whose permissions render it unreadable.
    `special'
    Suppresses warnings about an unimplemented or unparsable `\special' command.

    `tex-hush.c' defines the function that checks the variable value. Each driver implements its own checks where appropriate.

    Programming

    This chapter is for programmers who wish to use Kpathsea. See section Introduction, for the conditions under which you may do so.

    Programming overview

    Aside from this manual, your best source of information is the source to the programs I've modified to use Kpathsea (see section Introduction). Of those, Dviljk is probably the simplest, and hence a good place to start. Xdvik adds VF support and the complication of X resources. Dvipsk adds the complication of its own config files. Web2c is source code I also maintain, so it uses Kpathsea rather straightforwardly, but is of course complicated by the Web to C translation. Finally, Kpsewhich is a small utility program whose sole purpose is to exercise the main path-searching functionality.

    Beyond these examples, the `.h' files in the Kpathsea source describe the interfaces and functionality (and of course the `.c' files define the actual routines, which are the ultimate documentation). `pathsearch.h' declares the basic searching routine. `tex-file.h' and `tex-glyph.h' define the interfaces for looking up particular kinds of files. You may wish to use #include <kpathsea/kpathsea.h>, which includes every Kpathsea header.

    The library provides no way for an external program to register new file types: `tex-file.[ch]' must be modified to do this. For example, Kpathsea has support for looking up Dvips config files, even though no program other than Dvips will likely ever want to do so. I felt this was acceptable, since along with new file types should also come new defaults in `texmf.cnf' (and its descendant `paths.h'), since it's simplest for users if they can modify one configuration file for all kinds of paths.

    Kpathsea does not parse any formats itself; it barely opens any files. Its primary purpose is to return filenames. The GNU font utilities does contain libraries to read TFM, GF, and PK files, as do the programs above, of course.

    Calling sequence

    The typical way to use Kpathsea in your program goes something like this:

    1. Call kpse_set_progname with argv[0]; This is the only initialization that is mandatory to take full advantage of Kpathsea--specifically, for the .program feature of config files (see section Config files). If necessary, kpse_set_progname sets the global variables program_invocation_name and program_invocation_short_name. These variables are used in the error message macros defined in `kpathsea/lib.h'. It also initializes debugging options based on the environment variable KPATHSEA_DEBUG (if that is set). Finally, it sets the variables SELFAUTOLOC, SELFAUTODIR and SELFAUTOPARENT to the location, parent and grandparent directory of the executable, removing `.' and `..' path elements and resolving symbolic links. These are used in the default configuration file to allow people to invoke TeX from anywhere, specifically from a mounted CD-ROM. (You can use `--expand-var=\$SELFAUTOLOC', etc., to see the values finds.)
    2. Set debugging options. See section Debugging. If your program doesn't have a debugging option already, you can define one and set kpathsea_debug to the number that the user supplies (as in Dviljk and Web2c), or you can just omit this altogether (people can always set KPATHSEA_DEBUG). If you do have runtime debugging already, you need to merge Kpathsea's options with yours (as in Dvipsk and Xdvik).
    3. If your program has its own configuration files that can define search paths, you should assign those paths to the client_path member in the appropriate element of the kpse_format_info array. (This array is indexed by file type; see `tex-file.h'.) See `resident.c' in Dvipsk for an example.
    4. Call kpse_init_prog (see `proginit.c'). It's useful for the DVI drivers, at least, but for other programs it may be simpler to extract the parts of it that actually apply. This does not initialize any paths, it just looks for (and sets) certain environment variables and other random information. (A search path is always initialized at the first call to find a file of that type; this eliminates much useless work, e.g., initializing the BibTeX search paths in a DVI driver.)
    5. The routine to actually find a file of type format is kpse_find_format, defined in `tex-file.h'. These are macros that expand to a call to `kpse_find_file'. You can call, say, kpse_find_tfm after doing only the first of the initialization steps above--Kpathsea automatically reads the `texmf.cnf' generic config files, looks for environment variables, and does expansions at the first lookup.
    6. To find PK and/or GF bitmap fonts, the routines are kpse_find_pk, kpse_find_gf and kpse_find_glyph, defined in `tex-glyph.h'. These return a structure in addition to the resultant filename, because fonts can be found in so many ways. See the documentation in the source.
    7. To actually open a file, not just return a filename, call kpse_open_file. This function takes the name to look up and a Kpathsea file format as arguments, and returns the usual FILE *. It always assumes the file must exist, and thus will search the disk if necessary (unless the search path specified `!!', etc.). In other words, if you are looking up a VF or some other file that need not exist, don't use this.

    Kpathsea also provides many utility routines. Some are generic: hash tables, memory allocation, string concatenation and copying, string lists, reading input lines of arbitrary length, etc. Others are filename-related: default path, tilde, and variable expansion, stat calls, etc. (Perhaps someday I'll move the former to a separate library.)

    The `c-*.h' header files can also help your program adapt to many different systems. You will almost certainly want to use Autoconf for configuring your software if you use Kpathsea; I strongly recommend using Autoconf regardless. It is available from @url{ftp://prep.ai.mit.edu/pub/gnu/}.

    Programming with config files

    You can (and probably should) use the same texmf.cnf configuration file that Kpathsea uses for your program. This helps installers by keeping all configuration in one place.

    To retrieve a value var from config files, the best way is to call kpse_var_value on the string var. This will look first for an environment variable var, then a config file value. The result will be the value found or `NULL'. This function is declared in `kpathsea/variable.h'. For an example, see the shell_escape code in `web2c/lib/texmfmp.c'.

    The routine to do variable expansion in the context of a search path (as opposed to simply retrieving a value) is kpse_var_expand, also declared in `kpathsea/variable.h'. It's generally only necessary to set the search path structure components as explained in the previous section, rather than using this yourself.

    If for some reason you want to retrieve a value only from a config file, not automatically looking for a corresponding environment variable, call kpse_cnf_get (declared in `kpathsea/cnf.h') with the string var.

    No initialization calls are needed.

    Index

    !

  • !! in path specifications
  • $

  • $ expansion
  • -

  • -1 debugging value
  • /

  • / may not be /
  • /, trailing in home directory
  • //
  • 4

  • 4allTeX Live CD-ROM
  • 8

  • 8.3 filenames, using
  • :

  • : may not be :
  • :: expansion
  • @

  • @var@ substitutions
  • \

  • \, line continuation in `texmf.cnf'
  • \openin
  • \special, suppressing warnings about
  • a

  • absolute filenames
  • ac_include, Autoconf extension
  • access warnings
  • Acorn TeX implementations
  • AFMFONTS
  • AFS
  • AIX shells and configure
  • aliases for fonts
  • aliases, for filenames
  • all
  • alphabetical order, not
  • Amiga support
  • Amiga TeX implementations
  • Andrew File System, installing with
  • announcement mailing list, announcement mailing list
  • append-only directories and MakeTeXPK
  • appendonlydir
  • architecture-(in)dependent files, installing only
  • architectures, compiling multiple
  • arguments to `MakeTeX'
  • argv[0]
  • ash, losing with configure
  • autoconf, recommended
  • automounter, and configuration
  • automounter, and `ls-R'
  • auxiliary tasks
  • b

  • Babel, Babel
  • Bach, Johann Sebastian
  • backbone of CTAN
  • backslash-newline
  • base dpi
  • bash, recommended for running configure
  • basic glyph lookup
  • BIBINPUTS
  • binary mode, for file transfers
  • blank lines, in `texmf.cnf'
  • brace expansion
  • BSD universe
  • bsh, ok with configure
  • BSTINPUTS
  • bug address
  • bug checklist
  • bug mailing list
  • bugs, reporting
  • c

  • cache of fonts, loca
  • calling sequence
  • CC
  • cc warnings
  • cc, compiling with
  • CD-ROM distributions
  • CFLAGS
  • checklist for bug reports
  • checksum
  • circle fonts
  • clean Make target
  • client_path in kpse_format_info
  • code sharing
  • color printers, configuring
  • comments, in fontmap files
  • comments, in `texmf.cnf'
  • comments, making
  • common features in glyph lookup
  • common problems
  • compilation
  • compilation value, source for path
  • compiler bugs
  • compiler bugs, finding
  • compiler options, additional
  • compiler options, specifying
  • compiler, changing
  • conditions for use
  • config files
  • config files, for Kpathsea-using programs
  • config files, programming with
  • configuration
  • configuration bugs
  • configuration compiler options
  • configuration file, source for path
  • configuration files as shell scripts.
  • configuration of `MakeTeX' scripts
  • configuration of optional features
  • configure options
  • configure options for `MakeTeX' scripts
  • context diff
  • continuation character
  • core dumps, reporting
  • CPPFLAGS
  • crashes, reporting
  • CTAN, defined
  • custom installation
  • d

  • database search
  • database, for filenames
  • database, format of
  • DC fonts, and dynamic source creation
  • debugger
  • debugging
  • debugging options, in Kpathsea-using program
  • debugging output
  • debugging with `-g', disabling
  • DEC shells and configure
  • default expansion
  • default path features
  • default paths, changing
  • default paths, how they're made
  • default_texsizes
  • DEFS
  • depot
  • destination directory for MakeTeXPK
  • directories, changing default installation
  • directories, making append-only
  • directory structure, for TeX files
  • disabling `MakeTeX' scripts
  • disk search
  • disk searching, avoiding
  • disk space, needed
  • disk usage, reducing
  • distclean Make target
  • distributions, compiling simultaneously
  • distributions, not compiling
  • distributions, on CD-ROM
  • distributions, on tape
  • distributions, via ftp
  • DOS compatible names
  • DOS support
  • DOS TeX implementations
  • dosnames
  • dot files
  • doubled colons
  • DVI drivers
  • DVILJMAKEPK
  • DVILJSIZES
  • DVIPSFONTS
  • DVIPSHEADERS
  • DVIPSMAKEPK
  • DVIPSSIZES
  • dynamic creation of files
  • dynamic linking problems with OpenWin libraries
  • e

  • email CTAN access
  • enabling `MakeTeX' scripts
  • environment variable, source for path
  • environment variables for TeX
  • environment variables in paths
  • environment variables, old
  • epoch, seconds since
  • error message macros
  • excessive startup time
  • expanding symlinks
  • expansion, default
  • expansion, path element
  • expansion, search path
  • expansion, subdirectory
  • expansion, tilde
  • expansion, variable
  • explicitly relative filenames
  • externally-built filename database
  • extra colons
  • extraclean Make target
  • f

  • failed MakeTeX... script invocation
  • fallback font
  • fallback resolutions
  • fallback resolutions, overriding
  • FAQ, comp.sys.sun.admin
  • FAQ, Kpathsea
  • Farwell, Matthew
  • features, of default paths
  • file formats, supported
  • file lookup
  • file types, registering new
  • filename aliases
  • filename database
  • filename database generation
  • filenames, absolute or explicitly relative
  • files, unable to find
  • filesystem search
  • floating directories
  • font alias files
  • font generation failures
  • font of last resort
  • font set, infinite
  • fontmap files
  • fontnames, arbitrary length
  • fonts, being created
  • fopen, redefined
  • format of external database
  • Free Software Foundation
  • FreeBSD shells and configure
  • FSF Source Code CD-ROM
  • ftp retrieval
  • fundamental purpose of Kpathsea
  • g

  • gcc, compiling with
  • gdb, recommended
  • generation of filename database
  • get_applicationShellWidgetClass
  • get_wmShellWidgetClass
  • GFFONTS
  • globally writable directories
  • glyph lookup
  • glyph lookup bitmap tolerance
  • GLYPHFONTS, GLYPHFONTS
  • GNU C compiler bugs
  • GNU General Public License
  • Gopher CTAN access
  • group-writable directories
  • GUTenberg
  • h

  • hash table buckets, printing
  • hash table routines
  • hash_summary_only variable for debugging
  • help, mailing list for general TeX
  • history of Kpathsea
  • home directories in paths
  • HOME, as ~ expansion
  • i

  • identifiers, characters valid in
  • illegal pointer combination warnings
  • include fontmap directive
  • INDEXSTYLE
  • input lines, reading
  • install-data Make target
  • install-exec Make target
  • installation
  • installation testing
  • installation, architecture-(in)dependent files only
  • installation, changing default directories
  • installation, customized
  • installation, getting executables instead of
  • installation, simple
  • installing files
  • interactive query
  • interface, not frozen
  • introduction
  • k

  • `kdebug:'
  • Knuth, Donald E.
  • Knuth, Donald E., archive of programs by
  • Knuth, Donald E., original author
  • Korn shell, losing with configure
  • Kpathsea config file, source for path
  • Kpathsea version number
  • kpathsea_debug, kpathsea_debug
  • KPATHSEA_DEBUG, KPATHSEA_DEBUG
  • kpathsea_debug variable
  • KPATHSEA_DPI
  • KPSE_BITMAP_TOLERANCE
  • kpse_cnf_get
  • KPSE_DEBUG_EXPAND (16)
  • KPSE_DEBUG_FOPEN (4)
  • KPSE_DEBUG_HASH (2)
  • KPSE_DEBUG_PATHS (8)
  • KPSE_DEBUG_SEARCH (32)
  • KPSE_DEBUG_STAT (1)
  • kpse_fallback_font
  • kpse_find_*
  • kpse_find_file
  • kpse_find_glyph_format
  • kpse_format_info
  • kpse_format_info_type
  • kpse_init_prog
  • kpse_init_prog, and MAKETEX_MODE
  • kpse_make_specs
  • kpse_open_file
  • kpse_set_progname
  • kpse_var_expand
  • kpsewhich
  • Kpsewhich, and debugging
  • ksh, losing with configure
  • l

  • LaserJet drive
  • last-resort font
  • LaTeX help mailing list
  • LDFLAGS
  • leading colons
  • leaf directories wrongly guessed
  • leaf directory trick
  • libraries, changing
  • libraries, specifying additional
  • LIBS
  • license for using the library
  • lines, reading arbitrary-length
  • Linux File System Standard
  • Linux shells and configure
  • Linux, using Web2c
  • lndir for building symlink trees
  • loader options
  • loader options, final
  • loader options, initial
  • local cache of fonts
  • log file
  • logging successful searches
  • lostchar
  • m

  • Macintosh TeX implementations
  • MacKenzie, David, MacKenzie, David
  • mag Metafont variable
  • magic characters
  • magstep for MakeTeXPK
  • mailing lists
  • maintainer-clean Make target
  • Make arguments, additional
  • make, running
  • `MakeTeX' script configuration
  • `MakeTeX' script names
  • `MakeTeX' scripts
  • MAKETEX_BASE_DPI
  • MAKETEX_MAG
  • MAKETEX_MODE, MAKETEX_MODE
  • MakeTeXMF
  • MakeTeXPK
  • MakeTeXPK , initial runs
  • MAKETEXPK environment variable
  • MakeTeXTeX
  • MakeTeXTFM
  • memory allocation routines
  • Metafont failures
  • Metafont installation
  • Metafont making too-large fonts
  • Metafont mode name for MakeTeXPK
  • Metafont using the wrong resolution
  • MFBASES
  • MFINPUTS
  • MFPOOL
  • MFTINPUTS
  • mirrors, FTP
  • mismatched checksum warnings
  • MISSFONT_LOG
  • missing character warnings
  • mode directory, omitting
  • mode Metafont variable
  • Morgan, Tim
  • mostlyclean Make target
  • MPINPUTS
  • MPMEMS
  • MPPOOL
  • MPSUPPORT
  • MT_FEATURES
  • mtp_destdir
  • multiple architectures, compiling on
  • multiple architectures, directories for
  • multiple architectures, installing on
  • multiple TeX hierarchies
  • must exist
  • n

  • names for `MakeTeX' scripts
  • NetBSD shells and configure
  • Neumann, Gustaf
  • newsgroup for TeX
  • NeXT, lacking X11
  • NFS and `ls-R'
  • NFS CTAN access
  • nomode
  • non-English typesetting
  • non-Unix operating systems
  • Northwest Computing Support Center
  • NTG
  • null pointers, dereferencing
  • numeric debugging values
  • o

  • obtaining TeX
  • obtaining TeX on tape
  • obtaining Web2c by ftp
  • obtaining Web2c on CD-ROM
  • OCPINPUTS
  • OFMFONTS
  • online Metafont display, spurious
  • OpenWin libraries, dynamic linking problems
  • optimization caveat
  • optimization, enabling
  • options for debugging
  • options to configure
  • OS/2 support
  • other TeX distributions
  • OTPINPUTS
  • overview of path searching
  • overview of programming with Kpathsea
  • OVFFONTS
  • OVPFONTS
  • p

  • patches, Sun OpenWin
  • path expansion
  • path searching
  • path searching options
  • path searching, overview
  • path searching, standalone
  • path sources
  • paths, changing default, paths, changing default
  • paths, device name included in
  • pc Pascal compiler
  • PCL driver
  • PDF generation
  • permission denied
  • PKFONTS
  • pointer combination warnings
  • PostScript driver
  • PostScript fonts, additional
  • precompiled executables, instead of installation
  • precompiled Unix binaries
  • preprocessor options
  • preprocessor options, additional
  • Prime Time TeXcetera CD-ROM
  • printer configuration files
  • privacy, semblance of
  • problems, common
  • program-varying paths
  • program_invocation_name
  • program_invocation_short_name
  • programming overview
  • programming with config files
  • programming with Kpathsea
  • programs using the library
  • proof mode
  • PSHEADERS
  • pxp Pascal preprocessor
  • q

  • quoting variable values
  • r

  • readable
  • reading arbitrary-length lines
  • recording successful searches
  • relative filenames
  • relative filenames in `ls-R'
  • reporting bugs
  • resolution, setting
  • resolution, wrong
  • resolutions, last-resort
  • retrieving TeX
  • right-hand side of variable assignments
  • Rokicki, Tom
  • root user
  • runtime configuration files
  • runtime debugging
  • s

  • Sauter fonts, and dynamic source creation
  • scripts for file creation
  • search path, defined
  • search paths, changing default
  • searching for files
  • searching for glyphs
  • searching overview
  • searching the database
  • searching the disk
  • security considerations
  • SELFAUTODIR
  • SELFAUTOLOC
  • SELFAUTOPARENT
  • sending patches
  • setgid scripts
  • sh5, ok with configure
  • shar, recommended
  • shared library, making
  • shell scripts as configuration files
  • shell variables
  • shell_escape, example for code
  • shells and configure
  • simple installation
  • site overrides for MakeTeX...
  • size of distribution archives
  • skeleton TeX directory
  • slow startup time
  • Solaris BSD compatibility, not
  • sources for search paths
  • special
  • specification for MakeTeXPK
  • st_nlink
  • stack trace
  • standalone path searching
  • standard error and debugging output
  • standard options
  • startup time, excessive
  • static linking
  • static linking and dlsym
  • string routines
  • strip
  • subdirectory searching
  • suggestions, making
  • Sun 2
  • Sun OpenWin patches
  • supplier directory, omitting
  • support organization
  • supported file formats
  • suppressing warnings
  • symbolic link trees, for multiple architectures
  • symbolic links not found
  • symbolic links, and `ls-R'
  • symlinks, resolving
  • system C compiler bugs
  • system dependencies
  • system V universe
  • t

  • T1FONTS
  • T1INPUTS
  • tape distribution
  • TDS
  • testing, post-installation
  • tests, simple
  • teTeX
  • TeX directory structure
  • TeX distributions besides Web2c
  • TeX environment variables
  • TeX failures
  • TeX file lookup
  • TeX glyph lookup
  • TeX help mailing list
  • TeX hierarchy, one
  • TeX Live CD-ROM
  • TeX support
  • TeX Users Group
  • TEX_HUSH, TEX_HUSH
  • TEXBIB
  • TEXCONFIG
  • TEXDOCS
  • TEXFONTMAPS
  • TEXFONTS, TEXFONTS, TEXFONTS, TEXFONTS
  • TEXFORMATS
  • TEXINDEXSTYLE
  • TEXINPUTS, TEXINPUTS
  • TEXMF
  • TEXMFCNF, TEXMFCNF
  • TEXMFDBS, TEXMFDBS
  • TEXMFINI, TEXMFINI, TEXMFINI
  • TEXMFLOG
  • TEXMFOUTPUT
  • TEXPICTS
  • TEXPKS
  • TEXPOOL
  • TEXPSHEADERS, TEXPSHEADERS
  • TEXSIZES
  • TEXSOURCES
  • TFMFONTS
  • tilde expansion
  • time system call
  • tolerance for glyph lookup
  • total disk space
  • trailing `/' in home directory
  • trailing colons
  • TRFONTS
  • trick for detecting leaf directories
  • trojan horse attack
  • TUG
  • typeface directory, omitting
  • u

  • UKTUG
  • Ultrix shells and configure
  • unable to find files
  • unable to generate fonts
  • uname
  • universe, BSD vs. system V
  • UNIX_ST_LINK
  • unknown special warnings
  • unreadable file warnings
  • unreadable files
  • unusable `ls-R' warning
  • usage patterns, finding
  • USE_VARTEXFONTS
  • Usenet TeX newsgroup
  • v

  • varfonts
  • variable expansion
  • VARTEXFONTS
  • VAX 11/750
  • version number, of Kpathsea
  • version numbers, determining
  • VF files, not found
  • VFFONTS
  • VMS support
  • VMS TeX implementations
  • Vojta, Paul
  • w

  • Walnut Creek TeX CD-ROM
  • Walsh, Norman
  • warning about unusable `ls-R'
  • warnings, file access
  • warnings, pointer combinations
  • warnings, suppressing
  • whitespace, in fontmap files
  • whitespace, not ignored on continuation lines
  • Windows TeX implementations
  • World Wide Web CTAN access
  • x

  • X11 previewer
  • X11, lacking on NeXT
  • XCFLAGS
  • XCPPFLAGS
  • XDEFS
  • XDVIFONTS
  • XDVIMAKEPK
  • XDVISIZES
  • XLDFLAGS
  • XLOADLIBES
  • XMAKEARGS
  • Xmu library problems
  • XtStrings
  • z

  • zuhn, david
  • {

  • { expansion
  • ~

  • ~ expansion

  • This document was generated on 14 January 1998 using the texi2html translator version 1.51.