sync with TeXLive rev. 40422
[luatex.git] / source / texk / kpathsea / doc / kpathsea.info
blob61b1f7b294b7a6dad15bbf994cc36b7cb1fb1792
1 This is kpathsea.info, produced by makeinfo version 6.1 from
2 kpathsea.texi.
4 This file documents the Kpathsea library for path searching.
6    Copyright (C) 1996-2016 Karl Berry & Olaf Weber.
8    Permission is granted to make and distribute verbatim copies of this
9 manual provided the copyright notice and this permission notice are
10 preserved on all copies.
12    Permission is granted to copy and distribute modified versions of
13 this manual under the conditions for verbatim copying, provided that the
14 entire resulting derived work is distributed under the terms of a
15 permission notice identical to this one.
17    Permission is granted to copy and distribute translations of this
18 manual into another language, under the above conditions for modified
19 versions, except that this permission notice may be stated in a
20 translation approved by the TeX Users Group.
21 INFO-DIR-SECTION TeX
22 START-INFO-DIR-ENTRY
23 * Kpathsea: (kpathsea).                       File lookup along search paths.
24 * kpsewhich: (kpathsea)Invoking kpsewhich.    TeX file searching.
25 * mktexfmt: (kpathsea)mktex scripts.          Format (fmt/base/mem) generation.
26 * mktexlsr: (kpathsea)Filename database.      Update ls-R.
27 * mktexmf: (kpathsea)mktex scripts.           MF source generation.
28 * mktexpk: (kpathsea)mktex scripts.           PK bitmap generation.
29 * mktextex: (kpathsea)mktex scripts.          TeX source generation.
30 * mktextfm: (kpathsea)mktex scripts.          TeX font metric generation.
31 END-INFO-DIR-ENTRY
33 \x1f
34 File: kpathsea.info,  Node: Top,  Next: Introduction,  Up: (dir)
36 Kpathsea library
37 ****************
39 This manual documents the Kpathsea library for path searching.  It
40 corresponds to version 6.2.2, released in Aprile 2016.
42 * Menu:
44 * Introduction::             Overview and history.
46 * unixtex.ftp::              Obtaining TeX software.
47 * Security::                 Who can write what files, etc.
48 * TeX directory structure::  Managing the horde of TeX input files.
50 * Path searching::           How filename lookups work.
51 * TeX support::              Special support for TeX-related file lookups.
53 * Programming::              How to use Kpathsea features in your program.
55 * Reporting bugs::           Where and how to report bugs.
56 * Index::                    General index.
58 \x1f
59 File: kpathsea.info,  Node: Introduction,  Next: unixtex.ftp,  Prev: Top,  Up: Top
61 1 Introduction
62 **************
64 This manual corresponds to version 6.2.2 of the Kpathsea library,
65 released in Aprile 2016.
67    The library's fundamental purpose is to return a filename from a list
68 of directories specified by the user, similar to what shells do when
69 looking up program names to execute.
71    The following software, all of which is maintained in parallel, uses
72 this library:
74    * Dviljk (see the 'dvilj' man page)
75    * Dvipsk (*note (dvips)::)
76    * GNU font utilities (*note (fontu)::)
77    * Web2c (*note (web2c)::)
78    * Xdvik (see the 'xdvi' man page)
80 Other software that we do not maintain also uses it.
82    Kpathsea is now maintained as part of the TeX Live distribution
83 (<http://tug.org/texlive>).  For information on configuration, building,
84 installing, and more, *note (tlbuild)::.
86    The library is still actively maintained.  If you have comments or
87 suggestions, please send along (*note Reporting bugs::).
89    The Kpathsea library is distributed under the GNU Library General
90 Public License (LGPL). In short, this means if you write a program using
91 the library, you must (offer to) distribute the source to the library,
92 along with any changes you have made, and allow anyone to modify the
93 library source and distribute their modifications.  It does not mean you
94 have to distribute the source to your program, although we hope you
95 will.  See accompanying files for the text of the GNU licenses, or
96 <http://www.gnu.org/licenses>.
98    If you know enough about TeX to be reading this manual, then you (or
99 your institution) should consider joining the TeX Users Group (if you're
100 already a member, thanks!).  TUG produces the periodical 'TUGboat',
101 sponsors an annual meeting and publishes the proceedings, and arranges
102 courses on TeX for all levels of users throughout the world.  See
103 <http://tug.org> for information.
105 * Menu:
107 * History::
109 \x1f
110 File: kpathsea.info,  Node: History,  Up: Introduction
112 1.1 History
113 ===========
115 This section is for those people who are curious about how the library
116 came about.  If you like to read historical accounts of software, we
117 urge you to seek out the GNU Autoconf manual and the "Errors of TeX"
118 paper by Don Knuth, published in his book 'Digital Typography', among
119 other places.
121    [Karl writes.]  My first ChangeLog entry for Web2c seems to be
122 February 1990, but I may have done some work before then.  In any case,
123 Tim Morgan and I were jointly maintaining it for a time.  (I should
124 mention here that Tim had made Web2c into a real distribution long
125 before I had ever used it or even heard of it, and Tom Rokicki did the
126 original implementation.  When I started, I was using 'pxp' and 'pc' on
127 VAX 11/750's and the hot new Sun 2 machines.)
129    It must have been later in 1990 and 1991 that I started working on
130 'TeX for the Impatient'.  Dvips, Xdvi, Web2c, and the GNU fontutils
131 (which I was also writing at the time) all used different environment
132 variables, and, more importantly, had different bugs in their path
133 searching.  This became extremely painful, as I was stressing everything
134 to the limit working on the book.  I also desperately wanted to
135 implement subdirectory searching, since I couldn't stand putting
136 everything in one big directory, and also couldn't stand having to
137 explicitly specify 'cm', 'pandora', ... in a path.
139    In the first incarnation, I just hacked separately on each
140 program--that was the original subdirectory searching code in both Xdvi
141 and Dvips.  That is, I tried to go with the flow in each program, rather
142 than changing the program's calling sequences to conform to new
143 routines.
145    Then, as bugs inevitably appeared, I found I was fixing the same
146 thing three times (Web2c and fontutils were already sharing code, since
147 I maintained both of those--there was no Dvipsk or Xdvik or Dviljk at
148 this point).  After a while, I finally started sharing source files.
149 They weren't yet a library, though.  I just kept things up to date with
150 shell scripts.  (I was developing on a 386 running ISC 2.2 at the time,
151 and so didn't have symbolic links.  An awful experience.)
153    The ChangeLogs for Xdvik and Dvipsk record initial releases of those
154 distributions in May and June 1992.  I think it was because I was tired
155 of the different configuration strategies of each program, not so much
156 because of the path searching.  Autoconf was being developed by David
157 MacKenzie and others, and I was adapting it to TeX and friends.
159    I started to make a separate library that other programs could link
160 with on my birthday in April 1993, according to the ChangeLog.  I don't
161 remember exactly why I finally took the time to make it a separate
162 library; a conversation with david zuhn initiated it.  Just seemed like
163 it was time.
165    Dviljk got started in March 1994 after I bought a Laserjet 4.
166 (Kpathsea work got suspended while Norm Walsh and I, with Gustaf
167 Neumann's help, implemented a way for TeX to get at all those neat
168 builtin LJ4 fonts ... such a treat to have something to typeset in
169 besides Palatino!)
171    By spring of 1995, I had implemented just about all the
172 path-searching features in Kpathsea that I plan to, driven beyond my
173 initial goals by Thomas Esser and others.  I then started to integrate
174 Web2c with Kpathsea.  After the release of a stable Web2c, I hope to be
175 able to stop development, and turn most of my attention back to making
176 fonts for GNU. (Always assuming Micros**t hasn't completely obliterated
177 Unix by then, or that software patents haven't stopped software
178 development by anybody smaller than a company with a
179 million-dollar-a-year legal budget.  Which is actually what I think is
180 likely to happen, but that's another story...)
182    [Olaf writes.]  At the end of 1997, Unix is still alive and kicking,
183 individuals still develop software, and Web2c development still
184 continues.  Karl had been looking for some time for someone to take up
185 part of the burden, and I volunteered.
187    [Karl writes again.]  Indeed, time goes on.  As of 2006 or so, Olaf's
188 available time for Kpathsea became rather reduced, and I started taking
189 overall care of it again, although I did not do any significant new
190 development.  In 2009, Taco Hoekwater made a major rearrangement to make
191 the library suitable for use within the MetaPost library (*note
192 Programming overview::).  Also, for some years now, Peter Breitenlohner
193 has made many improvements to the infrastructure and kept up-to-date
194 with respect to the overall TeX Live build, where Kpathsea is now
195 maintained.
197 \x1f
198 File: kpathsea.info,  Node: unixtex.ftp,  Next: Security,  Prev: Introduction,  Up: Top
200 2 'unixtex.ftp': Obtaining TeX
201 ******************************
203 This is <ftp://ftp.tug.org/tex/unixtex.ftp>, last updated 13 June 2010.
204 Also available as <http://www.tug.org/unixtex.ftp>.  Email
205 <tex-k@tug.org> with comments or questions.
207    The principal free TeX distribution for Unix-like systems is TeX
208 Live, on the web at <http://tug.org/texlive>.  The pages there describe
209 many ways to acquire and build TeX, over the Internet or on physical
210 media, both the sources and precompiled binaries for many systems,
211 either standalone or as part of various operating system distributions.
213    Web2C, Kpathsea, Dvips, and Dviljk are no longer released as a
214 separate packages.  Their sources are now maintained as part of TeX
215 Live.
217    The host ftp.cs.stanford.edu is the original source for the files for
218 which Donald Knuth is directly responsible: 'tex.web', 'plain.tex', etc.
219 However, unless you want to undertake the very significant project of
220 building your TeX installation from scratch, it is far more reliable and
221 less work to retrieve these files as part of a larger package
223    In any case, the Stanford ftp site is not the canonical source for
224 anything except what was created as part of Knuth's original TeX, so do
225 not rely on any other files available there being up-to-date.  The best
226 place to check for up-to-date files is CTAN (the Comprehensive TeX
227 Archive Network), <http://www.ctan.org>.
229 \x1f
230 File: kpathsea.info,  Node: Security,  Next: TeX directory structure,  Prev: unixtex.ftp,  Up: Top
232 3 Security
233 **********
235 None of the programs in the TeX system require any special system
236 privileges, so there's no first-level security concern of people gaining
237 illegitimate root access.
239    A TeX document, however, can write to arbitrary files, e.g.,
240 '~/.rhosts', and thus an unwitting user who runs TeX on a random
241 document is vulnerable to a trojan horse attack.  This loophole is
242 closed by default, but you can be permissive if you so desire in
243 'texmf.cnf'.  *Note (web2c)tex invocation::.  MetaPost has the same
244 issue.
246    Dvips, Xdvi, and TeX can also execute shell commands under some
247 circumstances.  To disable this, see the '-R' option in *note
248 (dvips)Option details::, the xdvi man page, and *note (web2c)tex
249 invocation::, respectively.
251    Another security issue arises because it's very useful--almost
252 necessary--to make arbitrary fonts on user demand with 'mktexpk' and
253 friends.  Where do these files get installed?  By default, the 'mktexpk'
254 distributed with Kpathsea assumes a world-writable '/var/tmp' directory;
255 this is a simple and convenient approach, but it may not suit your
256 situation because it means that a local cache of fonts is created on
257 every machine.
259    To avoid this duplication, many people consider a shared, globally
260 writable font tree desirable, in spite of the potential security
261 problems.  To do this you should change the value of 'VARTEXFONTS' in
262 'texmf.cnf' to refer to some globally known directory.  *Note mktex
263 configuration::.
265    The first restriction you can apply is to make newly-created
266 directories under 'texmf' be append-only with an option in 'mktex.cnf'.
267 *Note mktex configuration::.
269    Another approach is to establish a group (or user) for TeX files,
270 make the 'texmf' tree writable only to that group (or user), and make
271 'mktexpk' et al. setgid to that group (or setuid to that user).  Then
272 users must invoke the scripts to install things.  (If you're worried
273 about the inevitable security holes in scripts, then you could write a C
274 wrapper to exec the script.)
276    The 'mktex...' scripts install files with the same read and write
277 permissions as the directory they are installed in.  The executable,
278 sgid, suid, and sticky bits are always cleared.
280    Any directories created by the 'mktex...' scripts have the same
281 permissions as their parent directory, unless the 'appendonlydir'
282 feature is used, in which case the sticky bit is always set.
284 \x1f
285 File: kpathsea.info,  Node: TeX directory structure,  Next: Path searching,  Prev: Security,  Up: Top
287 4 TeX directory structure
288 *************************
290 This section describes the default installation hierarchy of the
291 distribution.  It conforms to both the GNU coding standards and the TeX
292 directory structure (TDS) standard.  For rationale and further
293 explanation, please see those documents.  The GNU document is available
294 from <http://www.gnu.org/prep/standards>.  The TDS document is available
295 from <http://www.mirror.ctan.org/tds> (*note unixtex.ftp::).
297    In short, here is a skeleton of the default directory structure,
298 extracted from the TDS document:
300      PREFIX/      installation root ('/usr/local' by default)
301       bin/         executables
302       man/         man pages
303       include/     C header files
304       info/        GNU info files
305       lib/         libraries ('libkpathsea.*')
306       share/       architecture-independent files
307        texmf/      TDS root
308         bibtex/     BibTeX input files
309          bib/        BibTeX databases
310           base/       base distribution (e.g., 'xampl.bib')
311           misc/       single-file databases
312           PKG/       name of a package
313          bst/        BibTeX style files
314           base/       base distribution (e.g., 'plain.bst', 'acm.bst')
315           misc/       single-file styles
316           PKG/       name of a package
317         doc/         additional documentation
318         dvips/       '.pro', '.ps', 'psfonts.map'
319         fonts/       font-related files
320          TYPE/         file type (e.g., 'tfm', 'pk')
321           MODE/          type of output device (types 'pk' and 'gf' only)
322            SUPPLIER/       name of a font supplier (e.g., 'public')
323             TYPEFACE/        name of a typeface (e.g., 'cm')
324              dpiNNN/           font resolution (types 'pk' and 'gf' only)
325         metafont/    Metafont (non-font) input files
326          base/        base distribution (e.g., 'plain.mf')
327          misc/        single-file packages (e.g., 'modes.mf')
328          PKG/           name of a package (e.g., 'mfpic')
329         metapost/    MetaPost input files
330          base/        base distribution (e.g., 'plain.mp')
331          misc/        single-file packages
332          PKG/           name of a package
333          support/     support files for MetaPost-related utilities (e.g., 'trfonts.map')
334         mft/         'MFT' inputs (e.g., 'plain.mft')
335         tex/         TeX input files
336          FORMAT/         name of a format (e.g., 'plain')
337           base/        base distribution for FORMAT (e.g., 'plain.tex')
338           misc/        single-file packages (e.g., 'webmac.tex')
339           local/       local additions to or local configuration files for FORMAT
340           PKG/           name of a package (e.g., 'graphics', 'mfnfss')
341          generic/     format-independent packages
342           hyphen/      hyphenation patterns (e.g., 'hyphen.tex')
343           images/      image input files (e.g., Encapsulated PostScript)
344           misc/        single-file format-independent packages (e.g., 'null.tex').
345           PKG/           name of a package (e.g., 'babel')
346         web2c/        implementation-dependent files ('.pool', '.fmt', 'texmf.cnf', etc.)
348    Some concrete examples for most file types:
350      /usr/local/bin/tex
351      /usr/local/man/man1/xdvi.1
352      /usr/local/info/kpathsea.info
353      /usr/local/lib/libkpathsea.a
354      /usr/local/share/texmf/bibtex/bst/base/plain.bst
355      /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmr10.600pk
356      /usr/local/share/texmf/fonts/source/public/pandora/pnr10.mf
357      /usr/local/share/texmf/fonts/tfm/public/cm/cmr10.tfm
358      /usr/local/share/texmf/fonts/type1/adobe/utopia/putr.pfa
359      /usr/local/share/texmf/metafont/base/plain.mf
360      /usr/local/share/texmf/metapost/base/plain.mp
361      /usr/local/share/texmf/tex/plain/base/plain.tex
362      /usr/local/share/texmf/tex/generic/hyphen/hyphen.tex
363      /usr/local/share/texmf/web2c/tex.pool
364      /usr/local/share/texmf/web2c/tex.fmt
365      /usr/local/share/texmf/web2c/texmf.cnf
367 \x1f
368 File: kpathsea.info,  Node: Path searching,  Next: TeX support,  Prev: TeX directory structure,  Up: Top
370 5 Path searching
371 ****************
373 This chapter describes the generic path searching mechanism Kpathsea
374 provides.  For information about searching for particular file types
375 (e.g., TeX fonts), see the next chapter.
377 * Menu:
379 * Searching overview::          Basic scheme for searching.
380 * Path sources::                Where search paths can be defined.
381 * Path expansion::              Special constructs in search paths.
382 * Filename database::           Using an externally-built list to search.
383 * Invoking kpsewhich::          Standalone path lookup.
385 \x1f
386 File: kpathsea.info,  Node: Searching overview,  Next: Path sources,  Up: Path searching
388 5.1 Searching overview
389 ======================
391 A "search path" is a colon-separated list of "path elements", which are
392 directory names with a few extra frills.  A search path can come from (a
393 combination of) many sources; see below.  To look up a file 'foo' along
394 a path '.:/dir', Kpathsea checks each element of the path in turn: first
395 './foo', then '/dir/foo', returning the first match (or possibly all
396 matches).
398    The "colon" and "slash" mentioned here aren't necessarily ':' and '/'
399 on non-Unix systems.  Kpathsea tries to adapt to other operating
400 systems' conventions.
402    To check a particular path element E, Kpathsea first sees if a
403 prebuilt database (*note Filename database::) applies to E, i.e., if the
404 database is in a directory that is a prefix of E.  If so, the path
405 specification is matched against the contents of the database.
407    If the database does not exist, or does not apply to this path
408 element, or contains no matches, the filesystem is searched (if this was
409 not forbidden by the specification with '!!' and if the file being
410 searched for must exist).  Kpathsea constructs the list of directories
411 that correspond to this path element, and then checks in each for the
412 file being searched for.  (To help speed future lookups of files in the
413 same directory, the directory in which a file is found is floated to the
414 top of the directory list.)
416    The "file must exist" condition comes into play with VF files and
417 input files read by the TeX '\openin' command.  These files might very
418 well not exist (consider 'cmr10.vf'), and so it would be wrong to search
419 the disk for them.  Therefore, if you fail to update 'ls-R' when you
420 install a new VF file, it will not be found.
422    Each path element is checked in turn: first the database, then the
423 disk.  If a match is found, the search stops and the result is returned.
424 This avoids possibly-expensive processing of path specifications that
425 are never needed on a particular run.  (Unless the search explicitly
426 requested all matches.)
428    Although the simplest and most common path element is a directory
429 name, Kpathsea supports additional features in search paths: layered
430 default values, environment variable names, config file values, users'
431 home directories, and recursive subdirectory searching.  Thus, we say
432 that Kpathsea "expands" a path element, meaning transforming all the
433 magic specifications into the basic directory name or names.  This
434 process is described in the sections below.  It happens in the same
435 order as the sections.
437    Exception to all of the above: If the filename being searched for is
438 absolute or explicitly relative, i.e., starts with '/' or './' or '../',
439 Kpathsea simply checks if that file exists.
441    Ordinarily, if Kpathsea tries to access a file or directory that
442 cannot be read, it gives a warning.  This is so you will be alerted to
443 directories or files that accidentally lack any read permission (for
444 example, a 'lost+found' directory).  If you prefer not to see these
445 warnings, include the value 'readable' in the 'TEX_HUSH' environment
446 variable or config file value.
448    This generic path searching algorithm is implemented in
449 'kpathsea/pathsearch.c'.  It is employed by a higher-level algorithm
450 when searching for a file of a particular type (*note File lookup::, and
451 *note Glyph lookup::).
453 \x1f
454 File: kpathsea.info,  Node: Path sources,  Next: Path expansion,  Prev: Searching overview,  Up: Path searching
456 5.2 Path sources
457 ================
459 A search path can come from many sources.  In the order in which
460 Kpathsea uses them:
462   1. A user-set environment variable, e.g., 'TEXINPUTS'.  Environment
463      variables with an underscore and the program name appended
464      override; for example, 'TEXINPUTS_latex' overrides 'TEXINPUTS' if
465      the program being run is named 'latex'.
467   2. A program-specific configuration file, e.g., an 'S /a:/b' line in
468      Dvips' 'config.ps' (*note (dvips)Config files::).
470   3. A line in a Kpathsea configuration file 'texmf.cnf', e.g.,
471      'TEXINPUTS=/c:/d' (see below).
473   4. The compile-time default (specified in 'kpathsea/paths.h').
475    You can see each of these values for a given search path by using the
476 debugging options (*note Debugging::).
478    These sources may be combined via default expansion (*note Default
479 expansion::).
481 * Menu:
483 * Config files::        Kpathsea's runtime config files (texmf.cnf).
485 \x1f
486 File: kpathsea.info,  Node: Config files,  Up: Path sources
488 5.2.1 Config files
489 ------------------
491 As mentioned above, Kpathsea reads "runtime configuration files" named
492 'texmf.cnf' for search path and other definitions.  The search path used
493 to look for these configuration files is named 'TEXMFCNF', and is
494 constructed in the usual way, as described above, except that
495 configuration files cannot be used to define the path, naturally; also,
496 an 'ls-R' database is not used to search for them.
498    Kpathsea reads _all_ 'texmf.cnf' files in the search path, not just
499 the first one found; definitions in earlier files override those in
500 later files.  Thus, if the search path is '.:$TEXMF', values from
501 './texmf.cnf' override those from '$TEXMF/texmf.cnf'.
503    If Kpathsea cannot find any 'texmf.cnf' file, it reports a warning
504 including all the directories it checked.  If you don't want to see this
505 warning, set the environment variable 'KPATHSEA_WARNING' to the single
506 character '0' (zero, not oh).
508    While (or instead of) reading this description, you may find it
509 helpful to look at the distributed 'texmf.cnf', which uses or at least
510 mentions most features.  The format of 'texmf.cnf' files follows:
512    * Comments start with '%', either at the beginning of a line or
513      preceded by whitespace, and continue to the end of the line.  That
514      is, as with most shells, a '%' in the "middle" of a value does not
515      start a comment.  Examples:
517           % this is a comment
518           var = a%b  % but the value of var will be "a%b".
520    * Blank lines are ignored.
522    * A '\' at the end of a line acts as a continuation character, i.e.,
523      the next line is appended.  Whitespace at the beginning of
524      continuation lines is not ignored.
526    * Each remaining line must look like
528           VARIABLE [. PROGNAME] [=] VALUE
530      where the '=' and surrounding whitespace is optional.
532    * The VARIABLE name may contain any character other than whitespace,
533      '=', or '.', but sticking to 'A-Za-z_' is safest.
535    * If '.PROGNAME' is present, the definition only applies if the
536      program that is running is named (i.e., the last component of
537      'argv[0]' is) PROGNAME or 'PROGNAME.{exe,bat,cmd,...}'.  Most
538      notably, this allows different flavors of TeX to have different
539      search paths.
541    * VALUE may contain any characters except '%' and '@'.  (These
542      restrictions are only necessary because of the processing done on
543      'texmf.cnf' at build time, so you can stick those characters in
544      after installation if you have to.)  The '$VAR.PROG' feature is not
545      available on the right-hand side; instead, you must use an
546      additional variable (see below for example).  A ';' in VALUE is
547      translated to ':' if running under Unix; this is useful to write a
548      single 'texmf.cnf' which can be used under both Unix and Windows.
550    * All definitions are read before anything is expanded, so you can
551      use variables before they are defined (like Make, unlike most other
552      programs).
554 Here is a configuration file fragment illustrating most of these points:
556      % TeX input files -- i.e., anything to be found by \input or \openin ...
557      latex209_inputs = .:$TEXMF/tex/latex209//:$TEXMF/tex//
558      latex2e_inputs = .:$TEXMF/tex/latex//:$TEXMF/tex//
559      TEXINPUTS = .:$TEXMF/tex//
560      TEXINPUTS.latex209 = $latex209_inputs
561      TEXINPUTS.latex2e = $latex2e_inputs
562      TEXINPUTS.latex = $latex2e_inputs
564    This format has obvious similarities to Bourne shell scripts--change
565 the comment character to '#', disallow spaces around the '=', and get
566 rid of the '.NAME' convention, and it could be run through the shell.
567 However, there seemed little advantage in this, since all the
568 information would have to passed back to Kpathsea and parsed there
569 anyway, since the 'sh' process couldn't affect its parent's environment.
571    The implementation of all this is in 'kpathsea/cnf.c'.
573 \x1f
574 File: kpathsea.info,  Node: Path expansion,  Next: Filename database,  Prev: Path sources,  Up: Path searching
576 5.3 Path expansion
577 ==================
579 Kpathsea recognizes certain special characters and constructions in
580 search paths, similar to that in shells.  As a general example:
581 '~$USER/{foo,bar}//baz' expands to all subdirectories under directories
582 'foo' and 'bar' in $USER's home directory that contain a directory or
583 file 'baz'.  These expansions are explained in the sections below.
585 * Menu:
587 * Default expansion::           a: or :a or a::b expands to a default.
588 * Variable expansion::          $foo and ${foo} expand to environment values.
589 * Tilde expansion::             ~ and ~user expand to home directories.
590 * Brace expansion::             a{foo,bar}b expands to afoob abarb.
591 * KPSE_DOT expansion::          . is replaced with $KPSE_DOT if it is defined.
592 * Subdirectory expansion::      a// and a//b recursively expand to subdirs.
594 \x1f
595 File: kpathsea.info,  Node: Default expansion,  Next: Variable expansion,  Up: Path expansion
597 5.3.1 Default expansion
598 -----------------------
600 If the highest-priority search path (*note Path sources::) contains an
601 "extra colon" (i.e., leading, trailing, or doubled), Kpathsea inserts at
602 that point the next-highest-priority search path that is defined.  If
603 that inserted path has an extra colon, the same happens with the
604 next-highest.  (An extra colon in the compile-time default value has
605 unpredictable results, so installers beware.)
607    For example, given an environment variable setting
609      setenv TEXINPUTS /home/karl:
611 and a 'TEXINPUTS' value from 'texmf.cnf' of
613      .:$TEXMF//tex
615 then the final value used for searching will be:
617      /home/karl:.:$TEXMF//tex
619    Put another way, default expansion works on "formats" (search paths),
620 and not directly on environment variables.  Example, showing the
621 trailing ':' ignored in the first case and expanded in the second:
623      $ env TTFONTS=/tmp: kpsewhich --expand-path '$TTFONTS'
624      /tmp
625      $ env TTFONTS=/tmp: kpsewhich --show-path=.ttf
626      /tmp:.:/home/olaf/texmf/fonts/truetype//:...
628    Since Kpathsea looks for multiple configuration files, it would be
629 natural to expect that (for example) an extra colon in './texmf.cnf'
630 would expand to the path in '$TEXMF/texmf.cnf'.  Or, with Dvips'
631 configuration files, that an extra colon in 'config.$PRINTER' would
632 expand to the path in 'config.ps'.  This doesn't happen.  It's not clear
633 this would be desirable in all cases, and trying to devise a way to
634 specify the path to which the extra colon should expand seemed truly
635 baroque.
637    Technicality: Since it would be useless to insert the default value
638 in more than one place, Kpathsea changes only one extra ':' and leaves
639 any others in place (they will eventually be ignored).  Kpathsea checks
640 first for a leading ':', then a trailing ':', then a doubled ':'.
642    You can trace this by debugging "paths" (*note Debugging::).  Default
643 expansion is implemented in the source file 'kpathsea/kdefault.c'.
645 \x1f
646 File: kpathsea.info,  Node: Variable expansion,  Next: Tilde expansion,  Prev: Default expansion,  Up: Path expansion
648 5.3.2 Variable expansion
649 ------------------------
651 '$foo' or '${foo}' in a path element is replaced by (1) the value of an
652 environment variable 'foo' (if defined); (2) the value of 'foo' from
653 'texmf.cnf' (if defined); (3) the empty string.
655    If the character after the '$' is alphanumeric or '_', the variable
656 name consists of all consecutive such characters.  If the character
657 after the '$' is a '{', the variable name consists of everything up to
658 the next '}' (braces may not be nested around variable names).
659 Otherwise, Kpathsea gives a warning and ignores the '$' and its
660 following character.
662    You must quote the $'s and braces as necessary for your shell.
663 _Shell_ variable values cannot be seen by Kpathsea, i.e., ones defined
664 by 'set' in C shells and without 'export' in Bourne shells.
666    For example, given
667      setenv tex /home/texmf
668      setenv TEXINPUTS .:$tex:${tex}prev
669 the final 'TEXINPUTS' path is the three directories:
670      .:/home/texmf:/home/texmfprev
672    The '.PROGNAME' suffix on variables and '_PROGNAME' on environment
673 variable names are not implemented for general variable expansions.
674 These are only recognized when search paths are initialized (*note Path
675 sources::).
677    Variable expansion is implemented in the source file
678 'kpathsea/variable.c'.
680 \x1f
681 File: kpathsea.info,  Node: Tilde expansion,  Next: Brace expansion,  Prev: Variable expansion,  Up: Path expansion
683 5.3.3 Tilde expansion
684 ---------------------
686 A leading '~' in a path element is replaced by the value of the
687 environment variable 'HOME', or '.' if 'HOME' is not set.  On Windows,
688 the environment variable 'USERPROFILE' is checked instead of 'HOME'.
690    A leading '~USER' in a path element is replaced by USER's home
691 directory from the system 'passwd' database.
693    For example,
694      setenv TEXINPUTS ~/mymacros:
696 will prepend a directory 'mymacros' in your home directory to the
697 default path.
699    As a special case, if a home directory ends in '/', the trailing
700 slash is dropped, to avoid inadvertently creating a '//' construct in
701 the path.  For example, if the home directory of the user 'root' is '/',
702 the path element '~root/mymacros' expands to just '/mymacros', not
703 '//mymacros'.
705    Tilde expansion is implemented in the source file 'kpathsea/tilde.c'.
707 \x1f
708 File: kpathsea.info,  Node: Brace expansion,  Next: KPSE_DOT expansion,  Prev: Tilde expansion,  Up: Path expansion
710 5.3.4 Brace expansion
711 ---------------------
713 'x{A,B}y' expands to 'xAy:xBy'.  For example:
715      foo/{1,2}/baz
717 expands to 'foo/1/baz:foo/2/baz'.  ':' is the path separator on the
718 current system; e.g., on a DOS system, it's ';'.
720    Braces can be nested; for example, 'x{A,B{1,2}}y' expands to
721 'xAy:xB1y:xB2y'.
723    Multiple non-nested braces are expanded from right to left; for
724 example, 'x{A,B}{1,2}y' expands to 'x{A,B}1y:x{A,B}2y', which expands to
725 'xA1y:xB1y:xA2y:xB2y'.
727    This feature can be used to implement multiple TeX hierarchies, by
728 assigning a brace list to '$TEXMF', as mentioned in 'texmf.in'.
730    You can also use the path separator instead of the comma.  The last
731 example could have been written 'x{A:B}{1:2}y'.
733    Brace expansion is implemented in the source file
734 'kpathsea/expand.c'.
736 \x1f
737 File: kpathsea.info,  Node: KPSE_DOT expansion,  Next: Subdirectory expansion,  Prev: Brace expansion,  Up: Path expansion
739 5.3.5 'KPSE_DOT' expansion
740 --------------------------
742 When 'KPSE_DOT' is defined in the environment, it names a directory that
743 should be considered the current directory for the purpose of looking up
744 files in the search paths.  This feature is needed by the 'mktex...'
745 scripts *note mktex scripts::, because these change the working
746 directory.  You should not ever define it yourself.
748 \x1f
749 File: kpathsea.info,  Node: Subdirectory expansion,  Prev: KPSE_DOT expansion,  Up: Path expansion
751 5.3.6 Subdirectory expansion
752 ----------------------------
754 Two or more consecutive slashes in a path element following a directory
755 D is replaced by all subdirectories of D: first those subdirectories
756 directly under D, then the subsubdirectories under those, and so on.  At
757 each level, the order in which the directories are searched is
758 unspecified.  (It's "directory order", and definitely not alphabetical.)
760    If you specify any filename components after the '//', only
761 subdirectories which match those components are included.  For example,
762 '/a//b' would expand into directories '/a/1/b', '/a/2/b', '/a/1/1/b',
763 and so on, but not '/a/b/c' or '/a/1'.
765    You can include multiple '//' constructs in the path.
767    '//' at the beginning of a path is ignored; you didn't really want to
768 search every directory on the system, did you?
770    I should mention one related implementation trick, which I took from
771 GNU find.  Matthew Farwell suggested it, and David MacKenzie implemented
774    The trick is that in every real Unix implementation (as opposed to
775 the POSIX specification), a directory which contains no subdirectories
776 will have exactly two links (namely, one for '.' and one for '..').
777 That is to say, the 'st_nlink' field in the 'stat' structure will be
778 two.  Thus, we don't have to stat everything in the bottom-level (leaf)
779 directories--we can just check 'st_nlink', notice it's two, and do no
780 more work.
782    But if you have a directory that contains a single subdirectory and
783 500 regular files, 'st_nlink' will be 3, and Kpathsea has to stat every
784 one of those 501 entries.  Therein lies slowness.
786    You can disable the trick by undefining 'ST_NLINK_TRICK' in
787 'kpathsea/config.h'.  (It is undefined by default except under Unix.)
789    Unfortunately, in some cases files in leaf directories are 'stat''d:
790 if the path specification is, say, '$TEXMF/fonts//pk//', then files in a
791 subdirectory '.../pk', even if it is a leaf, are checked.  The reason
792 cannot be explained without reference to the implementation, so read
793 'kpathsea/elt-dirs.c' (search for 'may descend') if you are curious.
794 And if you can find a way to _solve_ the problem, please let me know.
796    Subdirectory expansion is implemented in the source file
797 'kpathsea/elt-dirs.c'.
799 \x1f
800 File: kpathsea.info,  Node: Filename database,  Next: Invoking kpsewhich,  Prev: Path expansion,  Up: Path searching
802 5.4 Filename database ('ls-R')
803 ==============================
805 Kpathsea goes to some lengths to minimize disk accesses for searches
806 (*note Subdirectory expansion::).  Nevertheless, in practice searching
807 each possible directory in typical TeX installations takes an
808 excessively long time.
810    Therefore, Kpathsea can use an externally-built "filename database"
811 file named 'ls-R' that maps files to directories, thus avoiding the need
812 to exhaustively search the disk.
814    A second database file 'aliases' allows you to give additional names
815 to the files listed in 'ls-R'.  This can be helpful to adapt to "8.3"
816 filename conventions in source files.
818    The 'ls-R' and 'aliases' features are implemented in the source file
819 'kpathsea/db.c'.
821 * Menu:
823 * ls-R::                        The main filename database.
824 * Filename aliases::            Aliases for those names.
825 * Database format::             Syntax details of the database file.
827 \x1f
828 File: kpathsea.info,  Node: ls-R,  Next: Filename aliases,  Up: Filename database
830 5.4.1 'ls-R'
831 ------------
833 As mentioned above, you must name the main filename database 'ls-R'.
834 You can put one at the root of each TeX installation hierarchy you wish
835 to search ('$TEXMF' by default); most sites have only one hierarchy.
836 Kpathsea looks for 'ls-R' files along the 'TEXMFDBS' path, so that
837 should presumably match the list of hierarchies.
839    The recommended way to create and maintain 'ls-R' is to run the
840 'mktexlsr' script, which is installed in '$(bindir)' ('/usr/local/bin'
841 by default).  That script goes to some trouble to follow symbolic links
842 as necessary, etc.  It's also invoked by the distributed 'mktex...'
843 scripts.
845    At its simplest, though, you can build 'ls-R' with the command
846      cd /YOUR/TEXMF/ROOT && ls -LAR ./ >ls-R
848 presuming your 'ls' produces the right output format (see the section
849 below).  GNU 'ls', for example, outputs in this format.  Also presuming
850 your 'ls' hasn't been aliased in a system file (e.g., '/etc/profile') to
851 something problematic, e.g., 'ls --color=tty'.  In that case, you will
852 have to disable the alias before generating 'ls-R'.  For the precise
853 definition of the file format, see *note Database format::.
855    Regardless of whether you use the supplied script or your own, you
856 will almost certainly want to invoke it via 'cron', so when you make
857 changes in the installed files (say if you install a new LaTeX package),
858 'ls-R' will be automatically updated.
860    The '-A' option to 'ls' includes files beginning with '.' (except for
861 '.' and '..'), such as the file '.tex' included with the LaTeX tools
862 package.  (On the other hand, _directories_ whose names begin with '.'
863 are always ignored.)
865    If your system does not support symbolic links, omit the '-L'.
867    'ls -LAR /YOUR/TEXMF/ROOT' will also work.  But using './' avoids
868 embedding absolute pathnames, so the hierarchy can be easily
869 transported.  It also avoids possible trouble with automounters or other
870 network filesystem conventions.
872    Kpathsea warns you if it finds an 'ls-R' file, but the file does not
873 contain any usable entries.  The usual culprit is running plain 'ls -R'
874 instead of 'ls -LR ./' or 'ls -R /YOUR/TEXMF/ROOT'.  Another possibility
875 is some system directory name starting with a '.' (perhaps if you are
876 using AFS); Kpathsea ignores everything under such directories.
878    Because the database may be out-of-date for a particular run, if a
879 file is not found in the database, by default Kpathsea goes ahead and
880 searches the disk.  If a particular path element begins with '!!',
881 however, _only_ the database will be searched for that element, never
882 the disk.  If the database does not exist, nothing will be searched.
883 Because this can surprise users ("I see the font 'foo.tfm' when I do an
884 'ls'; why can't Dvips find it?"), it is not in any of the default search
885 paths.
887 \x1f
888 File: kpathsea.info,  Node: Filename aliases,  Next: Database format,  Prev: ls-R,  Up: Filename database
890 5.4.2 Filename aliases
891 ----------------------
893 In some circumstances, you may wish to find a file under several names.
894 For example, suppose a TeX document was created using a DOS system and
895 tries to read 'longtabl.sty'.  But now it's being run on a Unix system,
896 and the file has its original name, 'longtable.sty'.  The file won't be
897 found.  You need to give the actual file 'longtable.sty' an alias
898 'longtabl.sty'.
900    You can handle this by creating a file 'aliases' as a companion to
901 the 'ls-R' for the hierarchy containing the file in question.  (You must
902 have an 'ls-R' for the alias feature to work.)
904    The format of 'aliases' is simple: two whitespace-separated words per
905 line; the first is the real name 'longtable.sty', and second is the
906 alias ('longtabl.sty').  These must be base filenames, with no directory
907 components.  'longtable.sty' must be in the sibling 'ls-R'.
909    Also, blank lines and lines starting with '%' or '#' are ignored in
910 'aliases', to allow for comments.
912    If a real file 'longtabl.sty' exists, it is used regardless of any
913 aliases.
915 \x1f
916 File: kpathsea.info,  Node: Database format,  Prev: Filename aliases,  Up: Filename database
918 5.4.3 Database format
919 ---------------------
921 The "database" read by Kpathsea is a line-oriented file of plain text.
922 The format is that generated by GNU (and most other) 'ls' programs given
923 the '-R' option, as follows.
925    * Blank lines are ignored.
927    * If a line begins with '/' or './' or '../' and ends with a colon,
928      it's the name of a directory.  ('../' lines aren't useful, however,
929      and should not be generated.)
931    * All other lines define entries in the most recently seen directory.
932      /'s in such lines will produce possibly-strange results.
934    * Files with no preceding directory line are ignored.
936    For example, here's the first few lines of 'ls-R' (which totals about
937 30K bytes) on my system:
939      bibtex
940      dvips
941      fonts
942      ls-R
943      metafont
944      metapost
945      tex
946      web2c
948      ./bibtex:
949      bib
950      bst
951      doc
953      ./bibtex/bib:
954      asi.bib
955      btxdoc.bib
956      ...
958 \x1f
959 File: kpathsea.info,  Node: Invoking kpsewhich,  Prev: Filename database,  Up: Path searching
961 5.5 'kpsewhich': Standalone path searching
962 ==========================================
964 The Kpsewhich program exercises the path searching functionality
965 independent of any particular application.  This can also be useful as a
966 sort of 'find' program to locate files in your TeX hierarchies, perhaps
967 in administrative scripts.  It is used heavily in the distributed
968 'mktex...' scripts.
970    Synopsis:
972      kpsewhich OPTION... FILENAME...
974    The options and filename(s) to look up can be intermixed.  Options
975 can start with either '-' or '--', and any unambiguous abbreviation is
976 accepted.
978 * Menu:
980 * Path searching options::      Changing the mode, resolution, etc.
981 * Specially-recognized files::  Default formats for texmf.cnf, etc.
982 * Auxiliary tasks::             Path and variable expansion, etc.
983 * Standard options::            '--help' and '--version'.
985 \x1f
986 File: kpathsea.info,  Node: Path searching options,  Next: Specially-recognized files,  Up: Invoking kpsewhich
988 5.5.1 Path searching options
989 ----------------------------
991 Kpsewhich looks up each non-option argument on the command line as a
992 filename, and returns the first file found.
994    Various options alter the path searching behavior:
996 '--all'
997      Report all matches found, one per line.  By default, if there is
998      more than one match, just one will be reported (chosen effectively
999      at random).
1001 '--dpi=NUM'
1002      Set the resolution to NUM; this only affects 'gf' and 'pk' lookups.
1003      '-D' is a synonym, for compatibility with Dvips.  Default is 600.
1005 '--engine=NAME'
1006      Set the engine name to NAME.  By default it is not set.  The engine
1007      name is used in some search paths to allow files with the same name
1008      but used by different engines to coexist.
1010      In particular, since the memory dump files ('.fmt'/'.base'/'.mem')
1011      are now stored in subdirectories named for the engine ('tex',
1012      'pdftex', 'xetex', etc.), you must specify an engine name in order
1013      to find them.  For example, 'cont-en.fmt' typically exists for both
1014      'pdftex' and 'xetex'.  With the default path settings, you can use
1015      '--engine=/' to look for any dump file, regardless of engine; if a
1016      dump file exists for more than one engine, it's indeterminate which
1017      one is returned.  (The '/' ends up specifying a normal recursive
1018      search along the path where the dumps are stored, namely
1019      '$TEXMF/web2c{/$engine,}'.)
1021 '--format=NAME'
1022      Set the format for lookup to NAME.  By default, the format is
1023      guessed from the filename, with 'tex' being used if nothing else
1024      fits.  The recognized filename extensions (including any leading
1025      '.') are also allowable NAMEs.
1027      All formats also have a name, which is the only way to specify
1028      formats with no associated suffix.  For example, for Dvips
1029      configuration files you can use '--format="dvips config"'.  (The
1030      quotes are for the sake of the shell.)
1032      Here's the current list of recognized names and the associated
1033      suffixes.  *Note Supported file formats::, for more information on
1034      each of these.
1036      The strings in parentheses are abbreviations recognized only by
1037      'kpsewhich' (not the underlying library calls).  They are provided
1038      when it would otherwise require an argument containing a space to
1039      specify the format, to simplify quoting of calls from shells.
1041           gf: gf
1042           pk: pk
1043           bitmap font (bitmapfont):
1044           tfm: .tfm
1045           afm: .afm
1046           base: .base
1047           bib: .bib
1048           bst: .bst
1049           cnf: .cnf
1050           ls-R: ls-R ls-r
1051           fmt: .fmt
1052           map: .map
1053           mem: .mem
1054           mf: .mf
1055           mfpool: .pool
1056           mft: .mft
1057           mp: .mp
1058           mppool: .pool
1059           MetaPost support (mpsupport):
1060           ocp: .ocp
1061           ofm: .ofm .tfm
1062           opl: .opl  .pl
1063           otp: .otp
1064           ovf: .ovf .vf
1065           ovp: .ovp  .vpl
1066           graphic/figure:  .eps .epsi
1067           tex: .tex  .sty .cls .fd .aux .bbl .def .clo .ldf
1068           TeX system documentation (doc):
1069           texpool: .pool
1070           TeX system sources (source):  .dtx .ins
1071           PostScript header:  .pro
1072           Troff fonts (trofffont):
1073           type1 fonts: .pfa .pfb
1074           vf: .vf
1075           dvips config (dvipsconfig):
1076           ist: .ist
1077           truetype fonts: .ttf .ttc .TTF .TTC .dfont
1078           type42 fonts: .t42 .T42
1079           web2c files (web2c):
1080           other text files (othertext):
1081           other binary files (otherbin):
1082           misc fonts (miscfont):
1083           web: .web  .ch
1084           cweb: .w .web  .ch
1085           enc files: .enc
1086           cmap files (cmap):
1087           subfont definition files: .sfd
1088           opentype fonts: .otf
1089           pdftex config (pdftexconfig):
1090           lig files: .lig
1091           texmfscripts:
1092           lua: .lua .luatex .luc .luctex .texlua .texluc .tlu
1093           font feature files: .fea
1094           cid maps: .cid .cidmap
1095           mlbib: .mlbib .bib
1096           mlbst: .mlbst .bst
1097           clua: .dll .so
1098           ris: .ris
1099           bltxml: .bltxml
1101      This option and '--path' are mutually exclusive.
1103 '--interactive'
1104      After processing the command line, read additional filenames to
1105      look up from standard input.
1107 '--mktex=FILETYPE'
1108 '--no-mktex=FILETYPE'
1109      Turn on or off the 'mktex' script associated with FILETYPE.  Usual
1110      values for FILETYPE are 'pk', 'mf', 'tex', and 'tfm'.  By default,
1111      all are off in Kpsewhich, even if they are enabled for TeX.  This
1112      option implies setting '--must-exist'.  *Note mktex scripts::.
1114 '--mode=STRING'
1115      Set the mode name to STRING; this also only affects 'gf' and 'pk'
1116      lookups.  No default: any mode will be found.  *Note mktex script
1117      arguments::.
1119 '--must-exist'
1120      Do everything possible to find the files, notably including
1121      searching the disk and running the 'mktex' scripts.  By default,
1122      only the 'ls-R' database is checked, in the interest of efficiency.
1124 '--path=STRING'
1125      Search along the path STRING (colon-separated as usual), instead of
1126      guessing the search path from the filename.  '//' and all the usual
1127      expansions are supported (*note Path expansion::).  This option and
1128      '--format' are mutually exclusive.  To output the complete
1129      directory expansion of a path, instead of doing a one-shot lookup,
1130      see '--expand-path' and '--show-path' in the following section.
1132 '--progname=NAME'
1133      Set the program name to NAME; default is 'kpsewhich'.  This can
1134      affect the search paths via the '.PROGNAM' feature in configuration
1135      files (*note Config files::).
1137 '--subdir=STRING'
1138      Report only those matches whose directory part _ends_ with STRING
1139      (compared literally, except case is ignored on a case-insensitive
1140      operating system).  For example, suppose there are two matches for
1141      a given name:
1143           kpsewhich foo.sty
1144           => /some/where/foo.sty
1145           /another/place/foo.sty
1147      Then we can narrow the result to what we are interested in with
1148      '--subdir':
1150           kpsewhich --subdir=where foo.sty
1151           => /some/where/foo.sty
1153           kpsewhich --subdir=place foo.sty
1154           => /another/place/foo.sty
1156      The string to match must be at the end of the directory part of the
1157      match, and it is taken literally, with no pattern matching:
1159           kpsewhich --subdir=another foo.sty
1160           =>
1162      The string to match may cross directory components:
1164           kpsewhich --subdir=some/where foo.sty
1165           => /some/where/foo.sty
1167      '--subdir' implies '--all'; if there is more than one match, they
1168      will all be reported (in our example, both 'where' and 'place' end
1169      in 'e'):
1171           kpsewhich --subdir=e
1172           => /some/where/foo.sty
1173           /another/place/foo.sty
1175      Because of the above rules, the presence of a leading '/' is
1176      important, since it "anchors" the match to a full component name:
1178           kpsewhich --subdir=/lace foo.sty
1179           =>
1181      However, a trailing '/' is immaterial (and ignored), since the
1182      match always takes place at the end of the directory part:
1184           kpsewhich --subdir=lace/ foo.sty
1185           => /another/place/foo.sty
1187      The purpose of these rules is to make it convenient to find results
1188      only within a particular area of the tree.  For instance, a given
1189      script named 'foo.lua' might exist within both
1190      'texmf-dist/scripts/pkg1/' and 'texmf-dist/scripts/pkg2/'.  By
1191      specifying, say, '--subdir=/pkg1', you can be sure of getting the
1192      one you are interested in.
1194      We only match at the end because a site might happen to install TeX
1195      in '/some/coincidental/pkg1/path/', and we wouldn't want to match
1196      'texmf-dist/scripts/pkg2/' that when searching for '/pkg1'.
1198 \x1f
1199 File: kpathsea.info,  Node: Specially-recognized files,  Next: Auxiliary tasks,  Prev: Path searching options,  Up: Invoking kpsewhich
1201 5.5.2 Specially-recognized files for 'kpsewhich'
1202 ------------------------------------------------
1204 'kpsewhich' recognizes a few special filenames on the command line and
1205 defaults to using the 'known' file formats for them, merely to save the
1206 time and trouble of specifying the format.  This is only a feature of
1207 'kpsewhich'; when using the Kpathsea library itself, none of these
1208 special filenames are recognized, and it's still up to the caller to
1209 specify the desired format.
1211    Here is the list of special filenames to 'kpsewhich', along with
1212 their corresponding format:
1214 'config.ps'
1215      'dvips config'
1217 'dvipdfmx.cfg'
1218      'other text files'
1220 'fmtutil.cnf'
1221      'web2c files'
1223 'glyphlist.txt'
1224      'map'
1226 'mktex.cnf'
1227      'web2c files'
1229 'pdfglyphlist.txt'
1230      'map'
1232 'pdftex.cfg'
1233      'pdftex config' (although 'pdftex.cfg' is not used any more; look
1234      for the file 'pdftexconfig.tex' instead.)
1236 'texmf.cnf'
1237      'cnf'
1239 'XDvi'
1240      'other text files'
1242    A user-specified format will override the above defaults.
1244    Another useful configuration file in this regard is 'tcfmgr.map',
1245 found in 'texmf/texconfig/tcfmgr.map', which records various information
1246 about the above configuration files (among others).
1248 \x1f
1249 File: kpathsea.info,  Node: Auxiliary tasks,  Next: Standard options,  Prev: Specially-recognized files,  Up: Invoking kpsewhich
1251 5.5.3 Auxiliary tasks
1252 ---------------------
1254 Kpsewhich provides some features in addition to path lookup as such:
1256 '--debug=NUM'
1257      Set debugging options to NUM.  *Note Debugging::.
1259 '--expand-braces=STRING'
1260      Output variable and brace expansion of STRING.  *Note Path
1261      expansion::.
1263 '--expand-path=STRING'
1264      Output the complete expansion of STRING, with each element
1265      separated by the usual path separator on the current system (';' on
1266      Windows, ':' otherwise).  This may be useful to construct a custom
1267      search path for a format not otherwise supported.  To retrieve the
1268      search path for a format that is already supported, see
1269      '--show-path'.
1271      Nonexistent directories are culled from the output:
1273           $ kpsewhich --expand-path '/tmp'
1274           => /tmp
1275           $ kpsewhich --expand-path '/nonesuch'
1276           =>
1278      For one-shot uses of an arbitrary (not built in to Kpathsea) path,
1279      see '--path' (*note Path searching options::)
1281 '--expand-var=STRING'
1282      Output the variable and tilde expansion of STRING the 'mktex...'
1283      scripts run 'kpsewhich --expand-var='$TEXMF'' to find the root of
1284      the TeX system hierarchy.  *Note Path expansion::.
1286 '--help-formats'
1287      Output information about each supported format (*note Supported
1288      file formats::), including the names and abbreviations, variables
1289      looked for, and the original path.
1291 '--safe-in-name=NAME'
1292 '--safe-out-name=NAME'
1293      Exit successfully if NAME is safe to open for reading or writing,
1294      respectively, else unsuccessfully.  No output is written.  These
1295      tests take account of the related Kpathsea configuration settings
1296      (*note Calling sequence::).
1298 '--show-path=NAME'
1299      Show the path that would be used for file lookups of file type
1300      NAME.  Either a filename extension ('pk', '.vf', etc.)  or an
1301      integer can be used, just as with '--format', described in the
1302      previous section.
1304 '--var-value=VARIABLE'
1305      Outputs the value of VARIABLE (a simple identifier like 'TEXMF',
1306      with no '$' or other constructs), expanding '$' (*note Variable
1307      expansion:: and '~' (*note Tilde expansion::) constructs, but not
1308      performing other expansions.
1310 \x1f
1311 File: kpathsea.info,  Node: Standard options,  Prev: Auxiliary tasks,  Up: Invoking kpsewhich
1313 5.5.4 Standard options
1314 ----------------------
1316 Kpsewhich accepts the standard GNU options:
1318    * '--help' prints a help message on standard output and exits
1319      successfully.
1321    * '--version' prints the Kpathsea version number and exits
1322      successfully.
1324 \x1f
1325 File: kpathsea.info,  Node: TeX support,  Next: Programming,  Prev: Path searching,  Up: Top
1327 6 TeX support
1328 *************
1330 Although the basic features in Kpathsea can be used for any type of path
1331 searching, it came about (like all libraries) with a specific
1332 application in mind: I wrote Kpathsea specifically for TeX system
1333 programs.  I had been struggling with the programs I was using (Dvips,
1334 Xdvi, and TeX itself) having slightly different notions of how to
1335 specify paths; and debugging was painful, since no code was shared.
1337    Therefore, Kpathsea provides some TeX-specific formats and features.
1338 Indeed, many of the supposedly generic path searching features were
1339 provided because they seemed useful in that conTeXt (font lookup,
1340 particularly).
1342    Kpathsea provides a standard way to search for files of any of the
1343 supported file types; glyph fonts are a bit different than all the rest.
1344 Searches are based solely on filenames, not file contents--if a GF file
1345 is named 'cmr10.600pk', it will be found as a PK file.
1347 * Menu:
1349 * Supported file formats::      File types Kpathsea knows about.
1350 * File lookup::                 Searching for most kinds of files.
1351 * Glyph lookup::                Searching for bitmap fonts.
1352 * Suppressing warnings::        Avoiding warnings via TEX_HUSH.
1353 * mktex scripts::               Generating files at runtime.
1355 \x1f
1356 File: kpathsea.info,  Node: Supported file formats,  Next: File lookup,  Up: TeX support
1358 6.1 Supported file formats
1359 ==========================
1361 Kpathsea has support for a number of file types.  Each file type has a
1362 list of environment and config file variables that are checked to define
1363 the search path, and most have a default suffix that plays a role in
1364 finding files (see the next section).  Some also define additional
1365 suffixes, and/or a program to be run to create missing files on the fly.
1367    Since environment variables containing periods, such as
1368 'TEXINPUTS.latex', are not allowed on some systems, Kpathsea looks for
1369 environment variables with an underscore, e.g., 'TEXINPUTS_latex' (*note
1370 Config files::).
1372    The following table lists the above information.  You can also get
1373 the list by giving the '--help-formats' option to 'kpsewhich' (*note
1374 Auxiliary tasks::).
1376 'afm'
1377      (Adobe font metrics, *note (dvips)Metric files::) 'AFMFONTS';
1378      suffix '.afm'.
1380 'base'
1381      (Metafont memory dump, *note (web2c)Memory dumps::) 'MFBASES',
1382      'TEXMFINI'; suffix '.base'.
1384 'bib'
1385      (BibTeX bibliography source, *note (web2c)bibtex invocation::)
1386      'BIBINPUTS', 'TEXBIB'; suffix '.bib'.
1388 'bltxml'
1389      (BibLaTeXML bibliography files for Biber,
1390      <http://ctan.org/pkg/biber>) 'BLTXMLINPUTS' suffix '.bltxml'.
1392 'bst'
1393      (BibTeX style, *note Basic BibTeX style files: (web2c)Basic BibTeX
1394      style files.) 'BSTINPUTS'; suffix '.bst'.
1396 'clua'
1397      (dynamic libraries for Lua, <http://ctan.org/pkg/luatex>)
1398      'CLUAINPUTS' suffixes '.dll' and '.so'.
1400 'cmap'
1401      (character map files) 'CMAPFONTS'; suffix '.cmap'.
1403 'cnf'
1404      (Runtime configuration files, *note Config files::) 'TEXMFCNF';
1405      suffix '.cnf'.
1407 'cweb'
1408      (CWEB input files) 'CWEBINPUTS'; suffixes '.w', '.web'; additional
1409      suffix '.ch'.
1411 'dvips config'
1412      (Dvips 'config.*' files, such as 'config.ps', *note (dvips)Config
1413      files::) 'TEXCONFIG'.
1415 'enc files'
1416      (encoding vectors) 'ENCFONTS'; suffix '.enc'.
1418 'fmt'
1419      (TeX memory dump, *note (web2c)Memory dumps::) 'TEXFORMATS',
1420      'TEXMFINI'; suffix '.fmt'.
1422 'font cid map'
1423      (CJK mapping) 'FONTCIDMAPS' suffix '.cid'.
1425 'font feature files'
1426      (primarily for OpenType font features) 'FONTFEATURES' suffix
1427      '.fea'.
1429 'gf'
1430      (generic font bitmap, *note (dvips)Glyph files::) 'PROGRAMFONTS',
1431      'GFFONTS', 'GLYPHFONTS', 'TEXFONTS'; suffix 'gf'.
1433 'graphic/figure'
1434      (Encapsulated PostScript figures, *note (dvips)PostScript
1435      figures::) 'TEXPICTS', 'TEXINPUTS'; additional suffixes: '.eps',
1436      '.epsi'.
1438 'ist'
1439      (makeindex style files) 'TEXINDEXSTYLE', 'INDEXSTYLE'; suffix
1440      '.ist'.
1442 'lig files'
1443      (ligature definition files) 'LIGFONTS'; suffix '.lig'.
1445 'ls-R'
1446      (Filename databases, *note Filename database::) 'TEXMFDBS'.
1448 'map'
1449      (Fontmaps, *note Fontmap::) 'TEXFONTMAPS'; suffix '.map'.
1451 'mem'
1452      (MetaPost memory dump, *note (web2c)Memory dumps::) 'MPMEMS',
1453      'TEXMFINI'; suffix '.mem'.
1455 'MetaPost support'
1456      (MetaPost support files, used by DMP; *note (web2c)dmp
1457      invocation::) 'MPSUPPORT'.
1459 'mf'
1460      (Metafont source, *note (web2c)mf invocation::) 'MFINPUTS'; suffix
1461      '.mf'; dynamic creation program: 'mktexmf'.
1463 'mfpool'
1464      (Metafont program strings, *note (web2c)pooltype invocation::)
1465      'MFPOOL', 'TEXMFINI'; suffix '.pool'.
1467 'mft'
1468      ('MFT' style file, *note (web2c)mft invocation::) 'MFTINPUTS';
1469      suffix '.mft'.
1471 'misc fonts'
1472      (font-related files that don't fit the other categories)
1473      'MISCFONTS'
1475 'mlbib'
1476      (MlBibTeX bibliography source) 'MLBIBINPUTS', 'BIBINPUTS',
1477      'TEXBIB'; suffixes '.mlbib', '.mlbib'.
1479 'mlbst'
1480      (MlBibTeX style) 'MLBSTINPUTS', 'BSTINPUTS'; suffixes '.mlbst',
1481      '.bst'.
1483 'mp'
1484      (MetaPost source, *note (web2c)mpost invocation::) 'MPINPUTS';
1485      suffix '.mp'.
1487 'mppool'
1488      (MetaPost program strings, *note (web2c)pooltype invocation::)
1489      'MPPOOL', 'TEXMFINI'; suffix '.pool'.
1491 'ocp'
1492      (Omega compiled process files) 'OCPINPUTS';
1493      suffix '.ocp'; dynamic creation program: 'MakeOmegaOCP'.
1495 'ofm'
1496      (Omega font metrics) 'OFMFONTS', 'TEXFONTS';
1497      suffixes '.ofm', '.tfm'; dynamic creation program: 'MakeOmegaOFM'.
1499 'opentype fonts'
1500      (OpenType fonts) 'OPENTYPEFONTS'.
1502 'opl'
1503      (Omega property lists) 'OPLFONTS', 'TEXFONTS'; suffix '.opl'.
1505 'otp'
1506      (Omega translation process files) 'OTPINPUTS'; suffix '.otp'.
1508 'ovf'
1509      (Omega virtual fonts) 'OVFFONTS', 'TEXFONTS'; suffix '.ovf'.
1511 'ovp'
1512      (Omega virtual property lists) 'OVPFONTS', 'TEXFONTS'; suffix
1513      '.ovp'.
1515 'pdftex config'
1516      (PDFTeX-specific configuration files) 'PDFTEXCONFIG'.
1518 'pk'
1519      (packed bitmap fonts, *note (dvips)Glyph files::) 'PROGRAMFONTS'
1520      (PROGRAM being 'XDVI', etc.), 'PKFONTS', 'TEXPKS', 'GLYPHFONTS',
1521      'TEXFONTS'; suffix 'pk'; dynamic creation program: 'mktexpk'.
1523 'PostScript header'
1524      (downloadable PostScript, *note (dvips)Header files::)
1525      'TEXPSHEADERS', 'PSHEADERS'; additional suffix '.pro'.
1527 'ris'
1528      (RIS bibliography files, primarily for Biber,
1529      <http://ctan.org/pkg/biber>) 'RISINPUTS' suffix '.ris'.
1531 'subfont definition files'
1532      (subfont definition files) 'SFDFONTS' suffix '.sfd'.
1534 'tex'
1535      (TeX source, *note (web2c)tex invocation::) 'TEXINPUTS'; suffix
1536      '.tex'; additional suffixes: none, because such a list cannot be
1537      complete; dynamic creation program: 'mktextex'.
1539 'TeX system documentation'
1540      (Documentation files for the TeX system) 'TEXDOCS'.
1542 'TeX system sources'
1543      (Source files for the TeX system) 'TEXSOURCES'.
1545 'texmfscripts'
1546      (Architecture-independent executables distributed in the texmf
1547      trees) 'TEXMFSCRIPTS'.
1549 'texpool'
1550      (TeX program strings, *note (web2c)pooltype invocation::)
1551      'TEXPOOL', 'TEXMFINI'; suffix '.pool'.
1553 'tfm'
1554      (TeX font metrics, *note (dvips)Metric files::) 'TFMFONTS',
1555      'TEXFONTS'; suffix '.tfm'; dynamic creation program: 'mktextfm'.
1557 'Troff fonts'
1558      (Troff fonts, used by DMP; *note (web2c)DMP invocation::)
1559      'TRFONTS'.
1561 'truetype fonts'
1562      (TrueType outline fonts) 'TTFONTS'; suffixes '.ttf' and '.TTF',
1563      '.ttc' and '.TTC', '.dfont'.
1565 'type1 fonts'
1566      (Type 1 PostScript outline fonts, *note (dvips)Glyph files::)
1567      'T1FONTS', 'T1INPUTS', 'TEXPSHEADERS', 'DVIPSHEADERS'; suffixes
1568      '.pfa', '.pfb'.
1570 'type42 fonts'
1571      (Type 42 PostScript outline fonts) 'T42FONTS'.
1573 'vf'
1574      (virtual fonts, *note (dvips)Virtual fonts::) 'VFFONTS',
1575      'TEXFONTS'; suffix '.vf'.
1577 'web'
1578      (WEB input files) 'WEBINPUTS'; suffix '.web'; additional suffix
1579      '.ch'.
1581 'web2c files'
1582      (files specific to the web2c implementation) 'WEB2C'.
1584    There are two special cases, because the paths and environment
1585 variables always depend on the name of the program: the variable name is
1586 constructed by converting the program name to upper case, and then
1587 appending 'INPUTS'.  Assuming the program is called 'foo', this gives us
1588 the following table.
1590 'other text files'
1591      (text files used by 'foo') 'FOOINPUTS'.
1593 'other binary files'
1594      (binary files used by 'foo') 'FOOINPUTS'.
1596    If an environment variable by these names are set, the corresponding
1597 'texmf.cnf' definition won't be looked at (unless, as usual, the
1598 environment variable value has an extra ':').  *Note Default
1599 expansion::.
1601    For the font variables, the intent is that:
1602    * 'TEXFONTS' is the default for everything.
1604    * 'GLYPHFONTS' is the default for bitmap (or, more precisely,
1605      non-metric) files.
1607    * Each font format has a variable of its own.
1609    * Each program has its own font override path as well; e.g.,
1610      'DVIPSFONTS' for Dvipsk.  Again, this is for bitmaps, not metrics.
1612 \x1f
1613 File: kpathsea.info,  Node: File lookup,  Next: Glyph lookup,  Prev: Supported file formats,  Up: TeX support
1615 6.2 File lookup
1616 ===============
1618 This section describes how Kpathsea searches for most files (bitmap font
1619 searches are the exception, as described in the next section).
1621    Here is the search strategy for a file NAME:
1623   1. If the file format defines default suffixes, and the suffix of NAME
1624      name is not already a known suffix for that format, try the name
1625      with each default appended, and use alternative names found in the
1626      fontmaps if necessary.  Example: given 'foo.bar', look for
1627      'foo.bar.tex'.
1629   2. Search for NAME, and if necessary for alternative names found in
1630      the fontmaps.  Example: given 'foo.bar', we also look for
1631      'foo.bar'.
1633   3. If the file format defines a program to invoke to create missing
1634      files, run it (*note mktex scripts::).
1636    The order in which we search for "suffixed" name (item 1) or the
1637 "as-is" name (item 2) is controlled by the 'try_std_extension_first'
1638 configuration value.  The default set in 'texmf.cnf' is true, since
1639 common suffixes are already recognized: 'babel.sty' will only look for
1640 'babel.sty', not 'babel.sty.tex', regardless of this setting.
1642    When the suffix is unknown (e.g., 'foo.bar'), both names are always
1643 tried; the difference is the order in which they are tried.
1645    'try_std_extension_first' only affects names being looked up which
1646 *already* have an extension.  A name without an extension (e.g., 'tex
1647 story') will always have an extension added first.
1649    This algorithm is implemented in the function 'kpathsea_find_file' in
1650 the source file 'kpathsea/tex-file.c'.  You can watch it in action with
1651 the debugging options (*note Debugging::).
1653 \x1f
1654 File: kpathsea.info,  Node: Glyph lookup,  Next: Suppressing warnings,  Prev: File lookup,  Up: TeX support
1656 6.3 Glyph lookup
1657 ================
1659 This section describes how Kpathsea searches for a bitmap font in GF or
1660 PK format (or either) given a font name (e.g., 'cmr10') and a resolution
1661 (e.g., 600).
1663    Here is an outline of the search strategy (details in the sections
1664 below) for a file NAME at resolution DPI.  The search stops at the first
1665 successful lookup.
1667   1. Look for an existing file NAME.DPIFORMAT in the specified
1668      format(s).
1670   2. If NAME is an alias for a file F in the fontmap file
1671      'texfonts.map', look for F.DPI.
1673   3. Run an external program (typically named 'mktexpk') to generate the
1674      font (*note mktex scripts::)
1676   4. Look for FALLBACK.DPI, where FALLBACK is some last-resort font
1677      (typically 'cmr10').
1679    This is implemented in 'kpathsea_find_glyph' in
1680 'kpathsea/tex-glyph.c'.
1682 * Menu:
1684 * Basic glyph lookup::          Features common to all glyph lookups.
1685 * Fontmap::                     Aliases for fonts.
1686 * Fallback font::               Resolutions and fonts of last resort.
1688 \x1f
1689 File: kpathsea.info,  Node: Basic glyph lookup,  Next: Fontmap,  Up: Glyph lookup
1691 6.3.1 Basic glyph lookup
1692 ------------------------
1694 When Kpathsea looks for a bitmap font NAME at resolution DPI in a format
1695 FORMAT, it first checks each directory in the search path for a file
1696 'NAME.DPIFORMAT'; for example, 'cmr10.600pk'.  Kpathsea looks for a PK
1697 file first, then a GF file.
1699    If that fails, Kpathsea looks for 'dpiDPI/NAME.FORMAT'; for example,
1700 'dpi600/cmr10.pk'.  This is how fonts are typically stored on
1701 filesystems (such as DOS) that permit only three-character extensions.
1703    If that fails, Kpathsea looks for a font with a close-enough DPI.
1704 "Close enough" is defined by the macro 'KPSE_BITMAP_TOLERANCE' in
1705 'kpathsea/tex-glyph.h' to be 'DPI / 500 + 1'.  This is slightly more
1706 than the 0.2% minimum allowed by the DVI standard
1707 (<CTAN:/dviware/driv-standard/level-0>).
1709 \x1f
1710 File: kpathsea.info,  Node: Fontmap,  Next: Fallback font,  Prev: Basic glyph lookup,  Up: Glyph lookup
1712 6.3.2 Fontmap
1713 -------------
1715 If a bitmap font or metric file is not found with the original name (see
1716 the previous section), Kpathsea looks through any "fontmap" files for an
1717 "alias" for the original font name.  These files are named
1718 'texfonts.map' and searched for along the 'TEXFONTMAPS'
1719 environment/config file variable.  All 'texfonts.map' files that are
1720 found are read; earlier definitions override later ones.
1722    This feature is intended to help in two respects:
1724   1. An alias name is limited in length only by available memory, not by
1725      your filesystem.  Therefore, if you want to ask for 'Times-Roman'
1726      instead of 'ptmr', you can (you get 'ptmr8r').
1728   2. A few fonts have historically had multiple names: specifically,
1729      LaTeX's "circle font" has variously been known as 'circle10',
1730      'lcircle10', and 'lcirc10'.  Aliases can make all the names
1731      equivalent, so that it no longer matters what the name of the
1732      installed file is; TeX documents will find their favorite name.
1734    The format of fontmap files is straightforward:
1736    * Comments start with '%' and continue to the end of the line.
1737    * Blank lines are ignored.
1738    * Each nonblank line is broken up into a series of "words": a
1739      sequence of non-whitespace characters.
1740    * If the first word is 'include', the second word is used as a
1741      filename, and it is searched for and read.
1742    * Otherwise, the first word on each line is the true filename;
1743    * the second word is the alias;
1744    * subsequent words are ignored.
1746    If an alias has an extension, it matches only those files with that
1747 extension; otherwise, it matches anything with the same root, regardless
1748 of extension.  For example, an alias 'foo.tfm' matches only when
1749 'foo.tfm' is being searched for; but an alias 'foo' matches 'foo.vf',
1750 'foo.600pk', etc.
1752    As an example, here is an excerpt from the 'texfonts.map' in the
1753 Web2c distribution.  It makes the old and new names of the LaTeX circle
1754 fonts equivalent.
1756      circle10        lcircle10
1757      circle10        lcirc10
1758      lcircle10       circle10
1759      lcircle10       lcirc10
1760      lcirc10         circle10
1761      lcirc10         lcircle10
1762      ...
1764    Fontmaps are implemented in the file 'kpathsea/fontmap.c'.  The
1765 Fontname distribution has much more information on font naming (*note
1766 (fontname)::).
1768 \x1f
1769 File: kpathsea.info,  Node: Fallback font,  Prev: Fontmap,  Up: Glyph lookup
1771 6.3.3 Fallback font
1772 -------------------
1774 If a bitmap font cannot be found or created at the requested size,
1775 Kpathsea looks for the font at a set of "fallback resolutions".  You
1776 specify these resolutions as a colon-separated list (like search paths).
1777 Kpathsea looks first for a program-specific environment variable (e.g.,
1778 'DVIPSSIZES' for Dvipsk), then the environment variable 'TEXSIZES', then
1779 a default specified at compilation time (the Make variable
1780 'default_texsizes').  You can set this list to be empty if you prefer to
1781 find fonts at their stated size or not at all.
1783    Finally, if the font cannot be found even at the fallback
1784 resolutions, Kpathsea looks for a fallback font, typically 'cmr10'.
1785 Programs must enable this feature by calling 'kpathsea_init_prog' (*note
1786 Calling sequence::); the default is no fallback font.
1788 \x1f
1789 File: kpathsea.info,  Node: Suppressing warnings,  Next: mktex scripts,  Prev: Glyph lookup,  Up: TeX support
1791 6.4 Suppressing warnings
1792 ========================
1794 Kpathsea provides a way to suppress selected usually-harmless warnings;
1795 this is useful at large sites where most users are not administrators,
1796 and thus the warnings are merely a source of confusion, not a help.  To
1797 do this, you set the environment variable or configuration file value
1798 'TEX_HUSH' to a colon-separated list of values.  Here are the
1799 possibilities:
1801 'all'
1802      Suppress everything possible.
1804 'checksum'
1805      Suppress mismatched font checksum warnings.
1807 'lostchar'
1808      Suppress warnings when a character is missing from a font that a
1809      DVI or VF file tries to typeset.
1811 'none'
1812      Don't suppress any warnings.
1814 'readable'
1815      Suppress warnings about attempts to access a file whose permissions
1816      render it unreadable.
1818 'special'
1819      Suppresses warnings about an unimplemented or unparsable '\special'
1820      command.
1822 'tex-hush.c' defines the function that checks the variable value.  Each
1823 driver implements its own checks where appropriate.
1825 \x1f
1826 File: kpathsea.info,  Node: mktex scripts,  Prev: Suppressing warnings,  Up: TeX support
1828 6.5 'mktex' scripts
1829 ===================
1831 If Kpathsea cannot otherwise find a file, for some file types it is
1832 configured by default to invoke an external program to create it
1833 dynamically (*note mktex configuration::).  These are collectively known
1834 as "'mktex' scripts", since most of them are named 'mktex...'.
1836    For example, this is useful for fonts (bitmaps, TFM's, and
1837 arbitrarily-sizable Metafont sources such as the Sauter and EC fonts),
1838 since any given document can use fonts never before referenced.
1839 Building all fonts in advance is therefore impractical, if not
1840 impossible.
1842    It is also useful for the TeX '.fmt' (and Metafont '.base' and
1843 Metapost '.mem' files, *note (Web2c)Memory dumps::), where
1844 pre-generating every format consumes a lot of both time and space.
1846    The script is passed the name of the file to create and possibly
1847 other arguments, as explained below.  It must echo the full pathname of
1848 the file it created (and nothing else) to standard output; it can write
1849 diagnostics to standard error.
1851 * Menu:
1853 * config: mktex configuration.
1854 * names: mktex script names.
1855 * args: mktex script arguments.
1857 \x1f
1858 File: kpathsea.info,  Node: mktex configuration,  Next: mktex script names,  Up: mktex scripts
1860 6.5.1 'mktex' configuration
1861 ---------------------------
1863 The list of file types and program names that can run an external
1864 program to create missing files is listed in the next section.  In the
1865 absence of 'configure' options specifying otherwise, everything but
1866 'mktextex' will be enabled by default.  The 'configure' options to
1867 change the defaults are:
1869      --without-mktexfmt-default
1870      --without-mktexmf-default
1871      --without-mktexocp-default
1872      --without-mktexofm-default
1873      --without-mktexpk-default
1874      --without-mktextfm-default
1875      --with-mktextex-default
1877    The 'configure' setting is overridden if the environment variable or
1878 configuration file value named for the script is set; e.g., 'MKTEXPK'
1879 (*note mktex script arguments::).
1881    'mktexfmt' reads a file 'fmtutil.cnf', typically located in
1882 'texmf/web2c/' to glean its configuration information.  The rest of the
1883 files and features in this section are primarily intended for the font
1884 generation scripts.
1886    As distributed, all the scripts source a file 'texmf/web2c/mktex.cnf'
1887 if it exists, so you can override various defaults.  See 'mktex.opt',
1888 for instance, which defines the default mode, resolution, some special
1889 directory names, etc.  If you prefer not to change the distributed
1890 scripts, you can simply create 'mktex.cnf' with the appropriate
1891 definitions (you do not need to create it if you have nothing to put in
1892 it).  'mktex.cnf' has no special syntax; it's an arbitrary Bourne shell
1893 script.  The distribution contains a sample 'mktex.cnf' for you to copy
1894 and modify as you please (it is not installed anywhere).
1896    In addition, you can configure a number of features with the
1897 'MT_FEATURES' variable, which you can define:
1899    * in 'mktex.opt', as just mentioned;
1901    * by editing the file 'mktex.opt', either before 'make install' (in
1902      the source hierarchy) or after (in the installed hierarchy);
1904    * or in the environment.
1906    If none of the options below are enabled, 'mktexpk', 'mktextfm', and
1907 'mktexmf' follow the following procedure to decide where fonts should be
1908 installed.  Find the tree where the font's sources are, and test the
1909 permissions of the 'fonts' directory of that tree to determine whether
1910 it is writable.  If it is, put the files in the tree in appropriate
1911 locations.  If it isn't writable, see whether the tree is a system tree
1912 (named in 'SYSTEXMF').  If so, the 'VARTEXFONTS' tree is used.  In all
1913 other cases the working directory is used.
1915    The 'appendonlydir' option is enabled by default.
1917 'appendonlydir'
1918      Tell 'mktexdir' to create directories append-only, i.e., set their
1919      sticky bit (*note (coreutils)Mode Structure::).  This feature is
1920      silently ignored on non-Unix platforms (e.g.  Windows/NT and
1921      MS-DOS) which don't support similar functionality.  This feature is
1922      enabled by default.
1924 'dosnames'
1925      Use 8.3 names; e.g., 'dpi600/cmr10.pk' instead of 'cmr10.600pk'.
1926      Note that this feature only affects filenames that would otherwise
1927      clash with other TeX-related filenames; 'mktex' scripts do nothing
1928      about filenames which exceed the 8+3 MS-DOS limits but remain
1929      unique when truncated (by the OS) to these limits, and nether do
1930      the scripts care about possible clashes with files which aren't
1931      related with TeX. For example, 'cmr10.600pk' would clash with
1932      'cmr10.600gf' and is therefore changed when 'dosnames' is in
1933      effect, but 'mf.pool' and 'mp.base' don't clash with any
1934      TeX-related files and are therefore unchanged.
1936      This feature is turned on by default on MS-DOS. If you do not wish
1937      'dosnames' to be set on an MS-DOS platform, you need to set the
1938      'MT_FEATURES' environment variable to a value that doesn't include
1939      'dosnames'.  You can also change the default setting by editing
1940      'mktex.opt', but only if you use the 'mktex' shell scripts; the
1941      emulation programs don't consult 'mktex.opt'.
1943 'fontmaps'
1944      Instead of deriving the location of a font in the destination tree
1945      from the location of the sources, the aliases and directory names
1946      from the Fontname distribution are used.  (*note Introduction:
1947      (fontname)Top.).
1949 'nomfdrivers'
1950      Let mktexpk and mktextfm create metafont driver files in a
1951      temporary directory.  These will be used for just one metafont run
1952      and not installed permanently.
1954 'nomode'
1955      Omit the directory level for the mode name; this is fine as long as
1956      you generate fonts for only one mode.
1958 'stripsupplier'
1959      Omit the font supplier name directory level.
1961 'striptypeface'
1962      Omit the font typeface name directory level.
1964 'strip'
1965      Omit the font supplier and typeface name directory levels.  This
1966      feature is deprecated in favour of 'stripsupplier' and
1967      'striptypeface'.
1969 'varfonts'
1970      When this option is enabled, fonts that would otherwise be written
1971      in system texmf tree go to the 'VARTEXFONTS' tree instead.  The
1972      default value in 'kpathsea/Makefile.in' is '/var/tmp/texfonts'.
1973      The 'Linux File System Standard' recommends '/var/tex/fonts'.
1975      The 'varfonts' setting in 'MT_FEATURES' is overridden by the
1976      'USE_VARTEXFONTS' environment variable: if set to '1', the feature
1977      is enabled, and if set to '0', the feature is disabled.
1979 'texmfvar'
1980      Force generated files that would go into a system tree (as defined
1981      by 'SYSTEXMF') into 'TEXMFVAR'.  Starting with teTeX-3.0, the
1982      variable 'TEXMFVAR' is always set.  The 'varfonts' feature takes
1983      precedence if also set.
1985      The 'texmfvar' setting in 'MT_FEATURES' is overridden by the
1986      'USE_TEXMFVAR' environment variable: if set to '1', the feature is
1987      enabled, and if set to '0', the feature is disabled.
1989 \x1f
1990 File: kpathsea.info,  Node: mktex script names,  Next: mktex script arguments,  Prev: mktex configuration,  Up: mktex scripts
1992 6.5.2 'mktex' script names
1993 --------------------------
1995 The following table shows the default name of the script for each of the
1996 file types which support runtime generation.
1998 'mktexfmt'
1999      ('.fmt', '.base', '.mem') TeX/Metafont/MetaPost formats.  This
2000      script is also named 'fmtutil', and reads 'fmtutil.cnf' for
2001      configuration information.
2003 'mktexmf'
2004      ('.mf') Metafont input files.
2006 'mkocp'
2007      ('.ocp') Omega compiled process files.
2009 'mkofm'
2010      ('.ofm') Omega font metric files.
2012 'mktexpk'
2013      ('pk') Glyph fonts.
2015 'mktextex'
2016      ('.tex') TeX input files (disabled by default).
2018 'mktextfm'
2019      ('.tfm') TFM files.
2021 These names can be overridden by an environment variable specific to the
2022 program--for example, 'DVIPSMAKEPK' for Dvipsk.
2024    If a 'mktex...' script fails, the invocation is appended to a file
2025 'missfont.log' (by default) in the current directory.  You can then
2026 execute the log file to create the missing files after fixing the
2027 problem.
2029    If the current directory is not writable and the environment variable
2030 or configuration file value 'TEXMFOUTPUT' is set, its value is used.
2031 Otherwise, nothing is written.  The name 'missfont.log' is overridden by
2032 the 'MISSFONT_LOG' environment variable or configuration file value.
2034 \x1f
2035 File: kpathsea.info,  Node: mktex script arguments,  Prev: mktex script names,  Up: mktex scripts
2037 6.5.3 'mktex' script arguments
2038 ------------------------------
2040 The first argument to a 'mktex' script is always the name of the file to
2041 be created.
2043    In the default 'mktexpk' implementation, additional arguments may
2044 also be passed:
2046 '--dpi NUM'
2047      Sets the resolution of the generated font to NUM.
2048 '--mfmode NAME'
2049      Sets the Metafont mode to NAME.
2050 '--bdpi NUM'
2051      Sets the "base dpi" for the font.  This must match the mode being
2052      used.
2053 '--mag STRING'
2054      A "magstep" string suitable for the Metafont 'mag' variable.  This
2055      must match the combination of BDPI and DPI being used.
2056 '--destdir STRING'
2057      A directory name.  If the directory is absolute, it is used as-is.
2058      Otherwise, it is appended to the root destination directory set in
2059      the script.
2061 \x1f
2062 File: kpathsea.info,  Node: Programming,  Next: Reporting bugs,  Prev: TeX support,  Up: Top
2064 7 Programming
2065 *************
2067 This chapter is for programmers who wish to use Kpathsea.  *Note
2068 Introduction::, for the conditions under which you may do so.
2070 * Menu:
2072 * Overview: Programming overview.         Introduction.
2073 * Calling sequence::                      Specifics of what to call.
2074 * Program-specific files::                How to handle these.
2075 * Config: Programming with config files.  Getting info from texmf.cnf.
2077 \x1f
2078 File: kpathsea.info,  Node: Programming overview,  Next: Calling sequence,  Up: Programming
2080 7.1 Programming overview
2081 ========================
2083 Aside from this manual, your best source of information is the source to
2084 the programs that use Kpathsea (*note Introduction::).  Of those, Dviljk
2085 is probably the simplest, and hence a good place to start.  Xdvik adds
2086 VF support and the complication of X resources.  Dvipsk adds the
2087 complication of its own config files.  Web2c is source code I also
2088 maintain, so it uses Kpathsea rather straightforwardly, but is of course
2089 complicated by the Web to C translation.  Finally, Kpsewhich is a small
2090 utility program whose sole purpose is to exercise the main
2091 path-searching functionality.
2093    When looking at these program sources, you should know that previous
2094 versions of the library had a different programming interface, to
2095 support re-entrancy.  In that interface the library function names were
2096 prefixed with 'kpse_' instead of 'kpathsea_', and they did not need an
2097 instance variable as first argument.  This change was made in 2009.
2098 Some of the programs mentioned above may still be using the previous
2099 interface.
2101    Beyond these examples, the '.h' files in the Kpathsea source describe
2102 the interfaces and functionality (and of course the '.c' files define
2103 the actual routines, which are the ultimate documentation).
2104 'pathsearch.h' declares the basic searching routine.  'tex-file.h' and
2105 'tex-glyph.h' define the interfaces for looking up particular kinds of
2106 files.  In view of the way the headers depend on each other, it is
2107 recommended to use '#include <kpathsea/kpathsea.h>', which includes
2108 every Kpathsea header.
2110    If you want to include only specific headers, you should still
2111 consider including 'kpathsea/config.h' before including any other
2112 Kpathsea header, as it provides symbols used in the other headers.  Note
2113 that 'kpathsea/config.h' includes 'kpathsea/c-auto.h', which is
2114 generated by Autoconf.
2116    The library provides no way for an external program to register new
2117 file types: 'tex-file.[ch]' must be modified to do this.  For example,
2118 Kpathsea has support for looking up Dvips config files, even though no
2119 program other than Dvips will likely ever want to do so.  I felt this
2120 was acceptable, since along with new file types should also come new
2121 defaults in 'texmf.cnf' (and its descendant 'paths.h'), since it's
2122 simplest for users if they can modify one configuration file for all
2123 kinds of paths.
2125    Kpathsea does not parse any formats itself; it barely opens any
2126 files.  Its primary purpose is to return filenames.  The GNU font
2127 utilities does contain libraries to read TFM, GF, and PK files, as do
2128 the programs above, of course.
2130 \x1f
2131 File: kpathsea.info,  Node: Calling sequence,  Next: Program-specific files,  Prev: Programming overview,  Up: Programming
2133 7.2 Calling sequence
2134 ====================
2136 The typical way to use Kpathsea in your program goes something like
2137 this:
2139   1. Call 'kpathsea_new' to create a new library instance.  This
2140      variable must be passed as the first argument to all the following
2141      library functions.  The rest of this manual will be using 'kpse' as
2142      a placeholder for the name of this variable.
2144   2. Call 'kpathsea_set_program_name' with 'argv[0]' as the second
2145      argument; the third argument is a string or 'NULL'.  The third
2146      argument is used by Kpathsea as the program name for the '.PROGRAM'
2147      feature of config files (*note Config files::).  If the third
2148      argument is 'NULL', the value of the second argument is used.  This
2149      function must be called before any other use of the Kpathsea
2150      library.
2152      'kpathsea_set_program_name' always sets the variables
2153      'kpse->invocation_name' and 'kpse->invocation_short_name'.  These
2154      variables are used in the error message macros defined in
2155      'kpathsea/lib.h'.  It sets the variable 'kpse->program_name' to the
2156      program name it uses.
2158      It also initializes debugging options based on the environment
2159      variable 'KPATHSEA_DEBUG' (if that is set).
2161      Finally, it sets the environment variables 'SELFAUTOLOC',
2162      'SELFAUTODIR' and 'SELFAUTOPARENT' to the location, parent and
2163      grandparent directory of the executable, removing '.' and '..' path
2164      elements and resolving symbolic links.  These are used in the
2165      default configuration file to allow people to invoke TeX from
2166      anywhere.  You can use 'kpsewhich --expand-var=\$SELFAUTOLOC',
2167      etc., to see the values.
2169   3. Set debugging options.  *Note Debugging::.  If your program doesn't
2170      have a debugging option already, you can define one and set
2171      'kpse->debug' to the number that the user supplies (as in Dviljk
2172      and Web2c), or you can just omit this altogether (people can always
2173      set 'KPATHSEA_DEBUG').  If you do have runtime debugging already,
2174      you need to merge Kpathsea's options with yours (as in Dvipsk and
2175      Xdvik).
2177   4. If your program has its own configuration files that can define
2178      search paths, you should assign those paths to the 'client_path'
2179      member in the appropriate element of the 'kpse->format_info' array.
2180      (This array is indexed by file type; see 'tex-file.h'.)  See
2181      'resident.c' in Dvipsk for an example.
2183   5. Call 'kpathsea_init_prog' (see 'proginit.c').  It's useful for the
2184      DVI drivers, at least, but for other programs it may be simpler to
2185      extract the parts of it that actually apply.  This does not
2186      initialize any paths, it just looks for (and sets) certain
2187      environment variables and other random information.  (A search path
2188      is always initialized at the first call to find a file of that
2189      type; this eliminates much useless work, e.g., initializing the
2190      BibTeX search paths in a DVI driver.)
2192   6. The routine to actually find a file of type FORMAT is
2193      'kpathsea_find_file'.  You can call 'kpathsea_find_file' after
2194      doing only the first and second of the initialization steps
2195      above--Kpathsea automatically reads the 'texmf.cnf' generic config
2196      files, looks for environment variables, and does expansions at the
2197      first lookup.
2199   7. To find PK and/or GF bitmap fonts, the routine is
2200      'kpathsea_find_glyph', defined in 'tex-glyph.h'.  This returns a
2201      structure in addition to the resultant filename, because fonts can
2202      be found in so many ways.  See the documentation in the source.
2204   8. To actually open a file, not just return a filename, call
2205      'kpathsea_open_file'.  This function takes the name to look up and
2206      a Kpathsea file format as arguments, and returns the usual 'FILE
2207      *'.  It always assumes the file must exist, and thus will search
2208      the disk if necessary (unless the search path specified '!!',
2209      etc.).  In other words, if you are looking up a VF or some other
2210      file that need not exist, don't use this.
2212   9. TeX can write output files, via the '\openout' primitive; this
2213      opens a security hole vulnerable to Trojan horse attack: an
2214      unwitting user could run a TeX program that overwrites, say,
2215      '~/.rhosts'.  Analogous security holes exist for many other
2216      programs.  To alleviate this, there is a configuration variable
2217      'openout_any', which selects one of three levels of security.  When
2218      it is set to 'a' (for "any"), no restrictions are imposed.  When it
2219      is set to 'r' (for "restricted"), filenames beginning with '.' are
2220      disallowed (except '.tex' because LaTeX needs it).  When it is set
2221      to 'p' (for "paranoid") additional restrictions are imposed: an
2222      absolute filename must refer to a file in (a subdirectory) of
2223      'TEXMFOUTPUT', and any attempt to go up a directory level is
2224      forbidden (that is, paths may not contain a '..' component).  The
2225      paranoid setting is the default.  (For backwards compatibility, 'y'
2226      and '1' are synonyms of 'a', while 'n' and '0' are synonyms for
2227      'r'.)  The function 'kpathsea_out_name_ok', with a filename as
2228      second argument, returns 'true' if that filename is acceptable to
2229      be opend for output or 'false' otherwise.
2231   10. Similarly, the function 'kpathsea_in_name_ok', with a filename as
2232      second argument, returns 'true' if that filename is acceptable to
2233      be opend for input or 'false' otherwise, depending on the value of
2234      the configuration variable 'openin_any' (with 'a' as default).
2236   11. To close the kpathsea library instance you are using, call
2237      'kpathsea_finish'.  This function closes any open log files and
2238      frees the memory used by the instance.
2240    Kpathsea also provides many utility routines.  Some are generic: hash
2241 tables, memory allocation, string concatenation and copying, string
2242 lists, reading input lines of arbitrary length, etc.  Others are
2243 filename-related: default path, tilde, and variable expansion, 'stat'
2244 calls, etc.  (Perhaps someday I'll move the former to a separate
2245 library.)
2247    The 'c-*.h' header files can also help your program adapt to many
2248 different systems.  You will almost certainly want to use Autoconf and
2249 probably Automake for configuring and building your software if you use
2250 Kpathsea; I strongly recommend using Autoconf and Automake regardless.
2251 They are available from <http://www.gnu.org/software>.
2253 \x1f
2254 File: kpathsea.info,  Node: Program-specific files,  Next: Programming with config files,  Prev: Calling sequence,  Up: Programming
2256 7.3 Program-specific files
2257 ==========================
2259 Many programs will need to find some configuration files.  Kpathsea
2260 contains some support to make it easy to place them in their own
2261 directories.  The Standard TeX directory structure (*note Introduction:
2262 (tds)Top.), specifies that such files should go into a subdirectory
2263 named after the program, like 'texmf/ttf2pk'.
2265    Two formats, 'kpse_program_text_format' and
2266 'kpse_program_binary_format', use '.:$TEXMF/PROGRAM//' as their
2267 compiled-in search path.  To override this default, you can use the
2268 variable 'PROGRAMINPUTS' in the environment and/or 'texmf.cnf'.  That is
2269 to say, the name of the variable is constructed by converting the name
2270 of the program to upper case, and appending 'INPUTS'.
2272    The only difference between these two formats is whether
2273 'kpathsea_open_file' will open the files it finds in text or binary
2274 mode.
2276 \x1f
2277 File: kpathsea.info,  Node: Programming with config files,  Prev: Program-specific files,  Up: Programming
2279 7.4 Programming with config files
2280 =================================
2282 You can (and probably should) use the same 'texmf.cnf' configuration
2283 file that Kpathsea uses for your program.  This helps installers by
2284 keeping all configuration in one place.
2286    To retrieve a value VAR from config files, the best way is to call
2287 'kpathsea_var_value' on the string 'VAR'.  This will look first for an
2288 environment variable VAR, then a config file value.  The result will be
2289 the value found or 'NULL'.  This function is declared in
2290 'kpathsea/variable.h'.  For an example, see the 'shell_escape' code in
2291 'web2c/lib/texmfmp.c'.
2293    The routine to do variable expansion in the context of a search path
2294 (as opposed to simply retrieving a value) is 'kpathsea_var_expand', also
2295 declared in 'kpathsea/variable.h'.  It's generally only necessary to set
2296 the search path structure components as explained in the previous
2297 section, rather than using this yourself.
2299    If for some reason you want to retrieve a value _only_ from a config
2300 file, not automatically looking for a corresponding environment
2301 variable, call 'kpathsea_cnf_get' (declared in 'kpathsea/cnf.h') with
2302 the string VAR.
2304    No initialization calls are needed.
2306 \x1f
2307 File: kpathsea.info,  Node: Reporting bugs,  Next: Index,  Prev: Programming,  Up: Top
2309 8 Reporting bugs
2310 ****************
2312 If you have problems or suggestions, please report them to
2313 <tex-k@tug.org> using the bug checklist below.
2315    Please report bugs in the documentation; not only factual errors or
2316 inconsistent behavior, but unclear or incomplete explanations, typos,
2317 wrong fonts, ...
2319 * Menu:
2321 * Bug checklist::       What to include in a good bug report.
2322 * Mailing lists::       Joining the bugs or announcements mailing lists.
2323 * Debugging::           Analyzing runtime problems.
2324 * Logging::             Recording searches.
2325 * Common problems::     When things go wrong.
2327 \x1f
2328 File: kpathsea.info,  Node: Bug checklist,  Next: Mailing lists,  Up: Reporting bugs
2330 8.1 Bug checklist
2331 =================
2333 Before reporting a bug, please check below to be sure it isn't already
2334 known (*note Common problems::).
2336    Bug reports should be sent via electronic mail to <tex-k@tug.org>.
2338    The general principle is that a good bug report includes all the
2339 information necessary for reproduction.  Therefore, to enable
2340 investigation, your report should include the following:
2342    * The version number(s) of the program(s) involved, and of Kpathsea
2343      itself.  You can get the former by giving a sole option '--version'
2344      to the program, and the latter by running 'kpsewhich --version'.
2345      The 'NEWS' and 'ChangeLog' files also contain the version number.
2347    * The hardware, operating system (including version), compiler, and
2348      'make' program you are using (the output of 'uname -a' is a start
2349      on the first two, though incomplete).
2351    * Any options you gave to 'configure'.  This is recorded in the
2352      'config.status' files.
2354      If you are reporting a bug in 'configure' itself, it's probably
2355      system-dependent, and it will be unlikely the maintainers can do
2356      anything useful if you merely report that thus-and-such is broken.
2357      Therefore, you need to do some additional work: for some bugs, you
2358      can look in the file 'config.log' where the test that failed should
2359      appear, along with the compiler invocation and source program in
2360      question.  You can then compile it yourself by hand, and discover
2361      why the test failed.  Other 'configure' bugs do not involve the
2362      compiler; in that case, the only recourse is to inspect the
2363      'configure' shell script itself, or the Autoconf macros that
2364      generated 'configure'.
2366    * The log of all debugging output, if the bug is in path searching.
2367      You can get this by setting the environment variable
2368      'KPATHSEA_DEBUG' to '-1' before running the program.  Please look
2369      at the log yourself to make sure the behavior is really a bug
2370      before reporting it; perhaps "old" environment variable settings
2371      are causing files not to be found, for example.
2373    * The contents of any input files necessary to reproduce the bug.
2374      For bugs in DVI-reading programs, for example, this generally means
2375      a DVI file (and any EPS or other files it uses)--TeX source files
2376      are helpful, but the DVI file is required, because that's the
2377      actual program input.
2379    * If you are sending a patch (do so if you can!), please do so in the
2380      form of a context diff ('diff -c') against the original
2381      distribution source.  Any other form of diff is either not as
2382      complete or harder for me to understand.  Please also include a
2383      'ChangeLog' entry.
2385    * If the bug involved is an actual crash (i.e., core dump), it is
2386      easy and useful to include a stack trace from a debugger (I
2387      recommend the GNU debugger GDB (<http://www.gnu.org/software/gdb>).
2388      If the cause is apparent (a 'NULL' value being dereferenced, for
2389      example), please send the details along.  If the program involved
2390      is TeX or Metafont, and the crash is happening at apparently-sound
2391      code, however, the bug may well be in the compiler, rather than in
2392      the program or the library (*note TeX or Metafont failing: TeX or
2393      Metafont failing.).
2395    * Any additional information that will be helpful in reproducing,
2396      diagnosing, or fixing the bug.
2398 \x1f
2399 File: kpathsea.info,  Node: Mailing lists,  Next: Debugging,  Prev: Bug checklist,  Up: Reporting bugs
2401 8.2 Mailing lists
2402 =================
2404 Web2c and Kpathsea in general are discussed on the mailing list
2405 <tex-k@tug.org>.  You can subscribe and peruse the archives on the web
2406 <http://lists.tug.org/tex-k>.
2408    You do not need to join to submit a report, nor will it affect
2409 whether you get a response.  Be aware that large data files are
2410 sometimes included in bug reports.  If this is a problem for you, do not
2411 join the list.
2413    If you are looking for general TeX help, such as how to install a
2414 full TeX system or how to use LaTeX, please see
2415 <http://tug.org/begin.html>.
2417 \x1f
2418 File: kpathsea.info,  Node: Debugging,  Next: Logging,  Prev: Mailing lists,  Up: Reporting bugs
2420 8.3 Debugging
2421 =============
2423 Kpathsea provides a number of runtime debugging options, detailed below
2424 by their names and corresponding numeric values.  When the files you
2425 expect aren't being found, the thing to do is enable these options and
2426 examine the output.
2428    You can set these with some runtime argument (e.g., '-d') to the
2429 program; in that case, you should use the numeric values described in
2430 the program's documentation (which, for Dvipsk and Xdvik, are different
2431 than those below).  It's best to give the '-d' (or whatever) option
2432 first, for maximal output.  Dvipsk and Xdvik have additional
2433 program-specific debugging options as well.
2435    You can also set the environment variable 'KPATHSEA_DEBUG'; in this
2436 case, you should use the numbers below.  If you run the program under a
2437 debugger and set the instance variable 'kpse->debug', also use the
2438 numbers below.
2440    In any case, by far the simplest value to use is '-1', which will
2441 turn on all debugging output.  This is usually better than guessing
2442 which particular values will yield the output you need.
2444    Debugging output always goes to standard error, so you can redirect
2445 it easily.  For example, in Bourne-compatible shells:
2446      dvips -d -1 ... 2>/tmp/debug
2448    It is sometimes helpful to run the standalone Kpsewhich utility
2449 (*note Invoking kpsewhich::), instead of the original program.
2451    In any case, you cannot use the names below; you must always use
2452 somebody's numbers.  (Sorry.)  To set more than one option, just sum the
2453 corresponding numbers.
2455 'KPSE_DEBUG_STAT (1)'
2456      Report 'stat'(2) calls.  This is useful for verifying that your
2457      directory structure is not forcing Kpathsea to do many additional
2458      file tests (*note Slow path searching::, and *note Subdirectory
2459      expansion::).  If you are using an up-to-date 'ls-R' database
2460      (*note Filename database::), this should produce no output unless a
2461      nonexistent file that must exist is searched for.
2463 'KPSE_DEBUG_HASH (2)'
2464      Report lookups in all hash tables: 'ls-R' and 'aliases' (*note
2465      Filename database::); font aliases (*note Fontmap::); and config
2466      file values (*note Config files::).  Useful when expected values
2467      are not being found, e.g.., file searches are looking at the disk
2468      instead of using 'ls-R'.
2470 'KPSE_DEBUG_FOPEN (4)'
2471      Report file openings and closings.  Especially useful when your
2472      system's file table is full, for seeing which files have been
2473      opened but never closed.  In case you want to set breakpoints in a
2474      debugger: this works by redefining 'fopen' ('fclose') to be
2475      'kpse_fopen_trace' ('kpse_fclose_trace').
2477 'KPSE_DEBUG_PATHS (8)'
2478      Report general path information for each file type Kpathsea is
2479      asked to search.  This is useful when you are trying to track down
2480      how a particular path got defined--from 'texmf.cnf', 'config.ps',
2481      an environment variable, the compile-time default, etc.  This is
2482      the contents of the 'kpse_format_info_type' structure defined in
2483      'tex-file.h'.
2485 'KPSE_DEBUG_EXPAND (16)'
2486      Report the directory list corresponding to each path element
2487      Kpathsea searches.  This is only relevant when Kpathsea searches
2488      the disk, since 'ls-R' searches don't look through directory lists
2489      in this way.
2491 'KPSE_DEBUG_SEARCH (32)'
2492      Report on each file search: the name of the file searched for, the
2493      path searched in, whether or not the file must exist (when drivers
2494      search for 'cmr10.vf', it need not exist), and whether or not we
2495      are collecting all occurrences of the file in the path (as with,
2496      e.g., 'texmf.cnf' and 'texfonts.map'), or just the first (as with
2497      most lookups).  This can help you correlate what Kpathsea is doing
2498      with what is in your input file.
2500 'KPSE_DEBUG_VARS (64)'
2501      Report the value of each variable Kpathsea looks up.  This is
2502      useful for verifying that variables do indeed obtain their correct
2503      values.
2505 'GSFTOPK_DEBUG (128)'
2506      Activates debugging printout specific to 'gsftopk' program.
2508 'MAKETEX_DEBUG (512)'
2509      If you use the optional 'mktex' programs instead of the traditional
2510      shell scripts, this will report the name of the site file
2511      ('mktex.cnf' by default) which is read, directories created by
2512      'mktexdir', the full path of the 'ls-R' database built by
2513      'mktexlsr', font map searches, 'MT_FEATURES' in effect, parameters
2514      from 'mktexnam', filenames added by 'mktexupd', and some subsidiary
2515      commands run by the programs.
2517 'MAKETEX_FINE_DEBUG (1024)'
2518      When the optional 'mktex' programs are used, this will print
2519      additional debugging info from functions internal to these
2520      programs.
2522    Debugging output from Kpathsea is always written to standard error,
2523 and begins with the string 'kdebug:'.  (Except for hash table buckets,
2524 which just start with the number, but you can only get that output
2525 running under a debugger.  See comments at the 'hash_summary_only'
2526 variable in 'kpathsea/db.c'.)
2528 \x1f
2529 File: kpathsea.info,  Node: Logging,  Next: Common problems,  Prev: Debugging,  Up: Reporting bugs
2531 8.4 Logging
2532 ===========
2534 Kpathsea can record the time and filename found for each successful
2535 search.  This may be useful in finding good candidates for deletion when
2536 your filesystem is full, or in discovering usage patterns at your site.
2538    To do this, define the environment or config file variable
2539 'TEXMFLOG'.  The value is the name of the file to append the information
2540 to.  The file is created if it doesn't exist, and appended to if it
2541 does.
2543    Each successful search turns into one line in the log file: two words
2544 separated by a space.  The first word is the time of the search, as the
2545 integer number of seconds since "the epoch", i.e., UTC midnight 1
2546 January 1970 (more precisely, the result of the 'time' system call).
2547 The second word is the filename.
2549    For example, after 'setenv TEXMFLOG /tmp/log', running Dvips on
2550 'story.dvi' appends the following lines:
2552      774455887 /usr/local/share/texmf/dvips/config.ps
2553      774455887 /usr/local/share/texmf/dvips/psfonts.map
2554      774455888 /usr/local/share/texmf/dvips/texc.pro
2555      774455888 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmbx10.600pk
2556      774455889 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmsl10.600pk
2557      774455889 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmr10.600pk
2558      774455889 /usr/local/share/texmf/dvips/texc.pro
2560 Only filenames that are absolute are recorded, to preserve some
2561 semblance of privacy.
2563    In addition to this Kpathsea-specific logging, 'pdftex' provides an
2564 option '-recorder' to write the names of all files accessed during a run
2565 to the file 'BASEFILE.fls'.
2567    Finally, most systems provide a general tool to output each system
2568 call, thus including opening and closing files.  It might be named
2569 'strace', 'truss', 'struss', or something else.
2571 \x1f
2572 File: kpathsea.info,  Node: Common problems,  Prev: Logging,  Up: Reporting bugs
2574 8.5 Common problems
2575 ===================
2577 Here are some common problems with configuration, compilation, linking,
2578 execution, ...
2580 * Menu:
2582 * Unable to find files::        If your program can't find fonts (or whatever).
2583 * Slow path searching::         If it takes forever to find anything.
2584 * Unable to generate fonts::    If mktexpk fails.
2585 * TeX or Metafont failing::     Likely compiler bugs.
2587 \x1f
2588 File: kpathsea.info,  Node: Unable to find files,  Next: Slow path searching,  Up: Common problems
2590 8.5.1 Unable to find files
2591 --------------------------
2593 If a program complains it cannot find fonts (or other input files), any
2594 of several things might be wrong.  In any case, you may find the
2595 debugging options helpful.  *Note Debugging::.
2597    * Perhaps you simply haven't installed all the necessary files; the
2598      basic fonts and input files are distributed separately from the
2599      programs.  *Note unixtex.ftp::.
2601    * You have (perhaps unknowingly) told Kpathsea to use search paths
2602      that don't reflect where the files actually are.  One common cause
2603      is having environment variables set from a previous installation,
2604      thus overriding what you carefully set in 'texmf.cnf' (*note
2605      Supported file formats::).  System '/etc/profile' or other files
2606      such may be the culprit.
2608    * Your files reside in a directory that is only pointed to via a
2609      symbolic link, in a leaf directory and is not listed in 'ls-R'.
2611      Unfortunately, Kpathsea's subdirectory searching has an
2612      irremediable deficiency: If a directory D being searched for
2613      subdirectories contains plain files and symbolic links to other
2614      directories, but no true subdirectories, D will be considered a
2615      leaf directory, i.e., the symbolic links will not be followed.
2616      *Note Subdirectory expansion::.
2618      You can work around this problem by creating an empty dummy
2619      subdirectory in D.  Then D will no longer be a leaf, and the
2620      symlinks will be followed.
2622      The directory immediately followed by the '//' in the path
2623      specification, however, is always searched for subdirectories, even
2624      if it is a leaf.  Presumably you would not have asked for the
2625      directory to be searched for subdirectories if you didn't want it
2626      to be.
2628    * If the fonts (or whatever) don't already exist, 'mktexpk' (or
2629      'mktexmf' or 'mktextfm') will try to create them.  If these rather
2630      complicated shell scripts fail, you'll eventually get an error
2631      message saying something like 'Can't find font FONTNAME'.  The best
2632      solution is to fix (or at least report) the bug in 'mktexpk'; the
2633      workaround is to generate the necessary fonts by hand with
2634      Metafont, or to grab them from a CTAN site (*note unixtex.ftp::).
2636    * There is a bug in the library.  *Note Reporting bugs::.
2638 \x1f
2639 File: kpathsea.info,  Node: Slow path searching,  Next: Unable to generate fonts,  Prev: Unable to find files,  Up: Common problems
2641 8.5.2 Slow path searching
2642 -------------------------
2644 If your program takes an excessively long time to find fonts or other
2645 input files, but does eventually succeed, here are some possible
2646 culprits:
2648    * Most likely, you just have a lot of directories to search, and that
2649      takes a noticeable time.  The solution is to create and maintain a
2650      separate 'ls-R' file that lists all the files in your main TeX
2651      hierarchy.  *Note Filename database::.  Kpathsea always uses 'ls-R'
2652      if it's present; there's no need to recompile or reconfigure any of
2653      the programs.
2655    * Your recursively-searched directories (e.g.,
2656      '/usr/local/share/texmf/fonts//'), contain a mixture of files and
2657      directories.  This prevents Kpathsea from using a useful
2658      optimization (*note Subdirectory expansion::).
2660      It is best to have only directories (and perhaps a 'README') in the
2661      upper levels of the directory structure, and it's very important to
2662      have _only_ files, and no subdirectories, in the leaf directories
2663      where the dozens of TFM, PK, or whatever files reside.
2665    In any case, you may find the debugging options helpful in
2666 determining precisely when the disk or network is being pounded.  *Note
2667 Debugging::.
2669 \x1f
2670 File: kpathsea.info,  Node: Unable to generate fonts,  Next: TeX or Metafont failing,  Prev: Slow path searching,  Up: Common problems
2672 8.5.3 Unable to generate fonts
2673 ------------------------------
2675 Metafont outputs fonts in bitmap format, tuned for a particular device
2676 at a particular resolution, in order to allow for the highest-possible
2677 quality of output.  Some DVI-to-whatever programs, such as Dvips, try to
2678 generate these on the fly when they are needed, but this generation may
2679 fail in several cases.
2681    If 'mktexpk' runs, but fails with this error:
2682      mktexpk: Can't guess mode for NNN dpi devices.
2683      mktexpk: Use a config file to specify the mode, or update me.
2684    you need to ensure the resolution and mode match; just specifying the
2685 resolution, as in '-D 360', is not enough.
2687    You can specify the mode name with the '-mode' option on the Dvips
2688 command line, or in a Dvips configuration file (*note (dvips)Config
2689 files::), such as 'config.ps' in your document directory, '~/.dvipsrc'
2690 in your home directory, or in a system directory (again named
2691 'config.ps').  (Other drivers use other files, naturally.)
2693    For example, if you need 360dpi fonts, you could include this in a
2694 configuration file:
2695      D 360
2696      M lqmed
2698    If Metafont runs, but generates fonts at the wrong resolution or for
2699 the wrong device, most likely 'mktexpk''s built-in guess for the mode is
2700 wrong, and you should override it as above.
2702    See <http://ctan.org/pkg/modes> for a list of resolutions and mode
2703 names for most devices (additional submissions are welcome).
2705    If Metafont runs but generates fonts at a resolution of 2602dpi (and
2706 prints out the name of each character as well as just a character
2707 number, and maybe tries to display the characters), then your Metafont
2708 base file probably hasn't been made properly.  (It's using the default
2709 'proof' mode, instead of an actual device mode.)  To make a proper
2710 'plain.base', assuming the local mode definitions are contained in a
2711 file 'modes.mf', run the following command (assuming Unix):
2713      inimf "plain; input modes; dump"
2715 Then copy the 'plain.base' file from the current directory to where the
2716 base files are stored on your system ('/usr/local/share/texmf/web2c' by
2717 default), and make a link (either hard or soft) from 'plain.base' to
2718 'mf.base' in that directory.  *Note (web2c)inimf invocation::.
2720    If 'mf' is a command not found at all by 'mktexpk', then you need to
2721 install Metafont (*note unixtex.ftp::).
2723 \x1f
2724 File: kpathsea.info,  Node: TeX or Metafont failing,  Prev: Unable to generate fonts,  Up: Common problems
2726 8.5.4 TeX or Metafont failing
2727 -----------------------------
2729 If TeX or Metafont get a segmentation fault or otherwise fail while
2730 running a normal input file, the problem is usually a compiler bug
2731 (unlikely as that may sound).  Even if the trip and trap tests are
2732 passed, problems may lurk.  Optimization occasionally causes trouble in
2733 programs other than TeX and Metafont themselves, too.
2735    Insufficient swap space may also cause core dumps or other erratic
2736 behavior.
2738    For a workaround, if you enabled any optimization flags, it's best to
2739 omit optimization entirely.  In any case, the way to find the facts is
2740 to run the program under the debugger and see where it's failing.
2742    Also, if you have trouble with a system C compiler, I advise trying
2743 the GNU C compiler.  And vice versa, unfortunately; but in that case I
2744 also recommend reporting a bug to the GCC mailing list; see *note
2745 (gcc)Bugs::.
2747    To report compiler bugs effectively requires perseverance and
2748 perspicacity: you must find the miscompiled line, and that usually
2749 involves delving backwards in time from the point of error, checking
2750 through TeX's (or whatever program's) data structures.  Things are not
2751 helped by all-too-common bugs in the debugger itself.  Good luck.
2753 \x1f
2754 File: kpathsea.info,  Node: Index,  Prev: Reporting bugs,  Up: Top
2756 Index
2757 *****
2759 \0\b[index\0\b]
2760 * Menu:
2762 * !! in path specifications:             ls-R.                (line  51)
2763 * $ expansion:                           Variable expansion.  (line   6)
2764 * --all:                                 Path searching options.
2765                                                               (line  12)
2766 * --color=tty:                           ls-R.                (line  21)
2767 * --debug=NUM:                           Auxiliary tasks.     (line   9)
2768 * --dpi=NUM:                             Path searching options.
2769                                                               (line  17)
2770 * --engine=NAME:                         Path searching options.
2771                                                               (line  21)
2772 * --expand-braces=STRING:                Auxiliary tasks.     (line  12)
2773 * --expand-path=STRING:                  Auxiliary tasks.     (line  16)
2774 * --expand-var=STRING:                   Auxiliary tasks.     (line  34)
2775 * --format=NAME:                         Path searching options.
2776                                                               (line  37)
2777 * --help:                                Standard options.    (line   8)
2778 * --help-formats:                        Auxiliary tasks.     (line  39)
2779 * --interactive:                         Path searching options.
2780                                                               (line 119)
2781 * --mktex=FILETYPE:                      Path searching options.
2782                                                               (line 124)
2783 * --mode=STRING:                         Path searching options.
2784                                                               (line 130)
2785 * --must-exist:                          Path searching options.
2786                                                               (line 135)
2787 * --no-mktex=FILETYPE:                   Path searching options.
2788                                                               (line 124)
2789 * --path=STRING:                         Path searching options.
2790                                                               (line 140)
2791 * --progname=NAME:                       Path searching options.
2792                                                               (line 148)
2793 * --safe-in-name=NAME:                   Auxiliary tasks.     (line  45)
2794 * --safe-out-name=NAME:                  Auxiliary tasks.     (line  45)
2795 * --show-path=NAME:                      Auxiliary tasks.     (line  51)
2796 * --subdir=STRING:                       Path searching options.
2797                                                               (line 153)
2798 * --var-value=VARIABLE:                  Auxiliary tasks.     (line  57)
2799 * --version:                             Standard options.    (line  11)
2800 * --with-mktextex-default:               mktex configuration. (line  12)
2801 * --without-mktexfmt-default:            mktex configuration. (line  12)
2802 * --without-mktexmf-default:             mktex configuration. (line  12)
2803 * --without-mktexocp-default:            mktex configuration. (line  12)
2804 * --without-mktexofm-default:            mktex configuration. (line  12)
2805 * --without-mktexpk-default:             mktex configuration. (line  12)
2806 * --without-mktextfm-default:            mktex configuration. (line  12)
2807 * -1 debugging value:                    Debugging.           (line  23)
2808 * -A option to ls:                       ls-R.                (line  33)
2809 * -D NUM:                                Path searching options.
2810                                                               (line  17)
2811 * -L option to ls:                       ls-R.                (line  38)
2812 * . directories, ignored:                ls-R.                (line  33)
2813 * . files:                               ls-R.                (line  33)
2814 * .2602gf:                               Unable to generate fonts.
2815                                                               (line  36)
2816 * .afm:                                  Supported file formats.
2817                                                               (line  22)
2818 * .base:                                 Supported file formats.
2819                                                               (line  26)
2820 * .bib:                                  Supported file formats.
2821                                                               (line  30)
2822 * .bltxml:                               Supported file formats.
2823                                                               (line  34)
2824 * .bst:                                  Supported file formats.
2825                                                               (line  38)
2826 * .cid:                                  Supported file formats.
2827                                                               (line  68)
2828 * .cmap:                                 Supported file formats.
2829                                                               (line  46)
2830 * .cnf:                                  Supported file formats.
2831                                                               (line  49)
2832 * .dll:                                  Supported file formats.
2833                                                               (line  42)
2834 * .enc:                                  Supported file formats.
2835                                                               (line  61)
2836 * .eps:                                  Supported file formats.
2837                                                               (line  79)
2838 * .epsi:                                 Supported file formats.
2839                                                               (line  79)
2840 * .fea:                                  Supported file formats.
2841                                                               (line  71)
2842 * .fmt:                                  Supported file formats.
2843                                                               (line  64)
2844 * .ist:                                  Supported file formats.
2845                                                               (line  84)
2846 * .lig:                                  Supported file formats.
2847                                                               (line  88)
2848 * .map:                                  Supported file formats.
2849                                                               (line  94)
2850 * .mem:                                  Supported file formats.
2851                                                               (line  97)
2852 * .mf:                                   Supported file formats.
2853                                                               (line 105)
2854 * .mft:                                  Supported file formats.
2855                                                               (line 113)
2856 * .mlbib:                                Supported file formats.
2857                                                               (line 121)
2858 * .mlbst:                                Supported file formats.
2859                                                               (line 125)
2860 * .mp:                                   Supported file formats.
2861                                                               (line 129)
2862 * .ocp:                                  Supported file formats.
2863                                                               (line 137)
2864 * .ofm:                                  Supported file formats.
2865                                                               (line 141)
2866 * .opl:                                  Supported file formats.
2867                                                               (line 148)
2868 * .otp:                                  Supported file formats.
2869                                                               (line 151)
2870 * .ovf:                                  Supported file formats.
2871                                                               (line 154)
2872 * .ovp:                                  Supported file formats.
2873                                                               (line 157)
2874 * .pfa:                                  Supported file formats.
2875                                                               (line 211)
2876 * .pfb:                                  Supported file formats.
2877                                                               (line 211)
2878 * .pk:                                   Supported file formats.
2879                                                               (line 164)
2880 * .pool:                                 Supported file formats.
2881                                                               (line 109)
2882 * .pool <1>:                             Supported file formats.
2883                                                               (line 133)
2884 * .pool <2>:                             Supported file formats.
2885                                                               (line 195)
2886 * .pro:                                  Supported file formats.
2887                                                               (line 169)
2888 * .rhosts, writable by TeX:              Security.            (line  10)
2889 * .ris:                                  Supported file formats.
2890                                                               (line 173)
2891 * .sfd:                                  Supported file formats.
2892                                                               (line 177)
2893 * .so:                                   Supported file formats.
2894                                                               (line  42)
2895 * .tex:                                  Supported file formats.
2896                                                               (line 180)
2897 * .tex file, included in ls-R:           ls-R.                (line  33)
2898 * .tfm:                                  Supported file formats.
2899                                                               (line 199)
2900 * .ttc:                                  Supported file formats.
2901                                                               (line 207)
2902 * .ttf:                                  Supported file formats.
2903                                                               (line 207)
2904 * .vf:                                   Supported file formats.
2905                                                               (line 219)
2906 * .w:                                    Supported file formats.
2907                                                               (line  53)
2908 * .web:                                  Supported file formats.
2909                                                               (line  53)
2910 * .web <1>:                              Supported file formats.
2911                                                               (line 223)
2912 * / may not be /:                        Searching overview.  (line  13)
2913 * /, trailing in home directory:         Tilde expansion.     (line  19)
2914 * //:                                    Subdirectory expansion.
2915                                                               (line   6)
2916 * /etc/profile:                          Unable to find files.
2917                                                               (line  14)
2918 * /etc/profile and aliases:              ls-R.                (line  21)
2919 * /var/tmp/texfonts:                     mktex configuration. (line 113)
2920 * 2602gf:                                Unable to generate fonts.
2921                                                               (line  36)
2922 * 8.3 filenames, using:                  mktex configuration. (line  68)
2923 * : may not be ::                        Searching overview.  (line  13)
2924 * :: expansion:                          Default expansion.   (line   6)
2925 * \, line continuation in texmf.cnf:     Config files.        (line  37)
2926 * \openin:                               Searching overview.  (line  31)
2927 * \special, suppressing warnings about:  Suppressing warnings.
2928                                                               (line  31)
2929 * { expansion:                           Brace expansion.     (line   6)
2930 * ~ expansion:                           Tilde expansion.     (line   6)
2931 * absolute filenames:                    Searching overview.  (line  52)
2932 * access warnings:                       Searching overview.  (line  56)
2933 * AFMFONTS:                              Supported file formats.
2934                                                               (line  22)
2935 * aliases for fonts:                     Fontmap.             (line   6)
2936 * aliases, for filenames:                Filename aliases.    (line   6)
2937 * all:                                   Suppressing warnings.
2938                                                               (line  13)
2939 * all matches, finding:                  Path searching options.
2940                                                               (line  12)
2941 * alphabetical order, not:               Subdirectory expansion.
2942                                                               (line   6)
2943 * announcement mailing list:             Mailing lists.       (line   6)
2944 * API, re-entrant:                       Programming overview.
2945                                                               (line  16)
2946 * append-only directories and mktexpk:   Security.            (line  36)
2947 * appendonlydir:                         mktex configuration. (line  60)
2948 * arguments to mktex:                    mktex script arguments.
2949                                                               (line   6)
2950 * argv[0]:                               Calling sequence.    (line  14)
2951 * autoconf, recommended:                 Calling sequence.    (line 117)
2952 * automounter, and ls-R:                 ls-R.                (line  40)
2953 * auxiliary tasks:                       Auxiliary tasks.     (line   6)
2954 * Bach, Johann Sebastian:                Default expansion.   (line  41)
2955 * backslash-newline:                     Config files.        (line  37)
2956 * basic glyph lookup:                    Basic glyph lookup.  (line   6)
2957 * Berry, Karl:                           History.             (line  12)
2958 * BIBINPUTS:                             Supported file formats.
2959                                                               (line  30)
2960 * BIBINPUTS <1>:                         Supported file formats.
2961                                                               (line 121)
2962 * blank lines, in texmf.cnf:             Config files.        (line  35)
2963 * BLTXMLINPUTS:                          Supported file formats.
2964                                                               (line  34)
2965 * brace expansion:                       Brace expansion.     (line   6)
2966 * Breitenlohner, Peter:                  History.             (line  78)
2967 * BSTINPUTS:                             Supported file formats.
2968                                                               (line  38)
2969 * BSTINPUTS <1>:                         Supported file formats.
2970                                                               (line 125)
2971 * bug address:                           Reporting bugs.      (line   6)
2972 * bug checklist:                         Bug checklist.       (line   6)
2973 * bug mailing list:                      Mailing lists.       (line   6)
2974 * bugs, reporting:                       Reporting bugs.      (line   6)
2975 * c-*.h:                                 Calling sequence.    (line 117)
2976 * c-auto.h:                              Programming overview.
2977                                                               (line  33)
2978 * cache of fonts, local:                 Security.            (line  22)
2979 * calling sequence:                      Calling sequence.    (line   6)
2980 * ChangeLog entry:                       Bug checklist.       (line  52)
2981 * checklist for bug reports:             Bug checklist.       (line   6)
2982 * checksum:                              Suppressing warnings.
2983                                                               (line  16)
2984 * circle fonts:                          Fontmap.             (line  19)
2985 * client_path in kpse->format_info:      Calling sequence.    (line  47)
2986 * CLUAINPUTS:                            Supported file formats.
2987                                                               (line  42)
2988 * CMAPFONTS:                             Supported file formats.
2989                                                               (line  46)
2990 * cmr10, as fallback font:               Fallback font.       (line  15)
2991 * cmr10.vf:                              Searching overview.  (line  31)
2992 * cnf.c:                                 Config files.        (line  86)
2993 * cnf.h:                                 Programming with config files.
2994                                                               (line  23)
2995 * comments, in fontmap files:            Fontmap.             (line  27)
2996 * comments, in texmf.cnf:                Config files.        (line  27)
2997 * comments, making:                      Introduction.        (line  28)
2998 * common features in glyph lookup:       Basic glyph lookup.  (line   6)
2999 * common problems:                       Common problems.     (line   6)
3000 * compilation value, source for path:    Path sources.        (line  20)
3001 * compiler bugs:                         TeX or Metafont failing.
3002                                                               (line   6)
3003 * compiler bugs, finding:                TeX or Metafont failing.
3004                                                               (line  24)
3005 * conditions for use:                    Introduction.        (line  31)
3006 * config files:                          Config files.        (line   6)
3007 * config files, for Kpathsea-using programs: Calling sequence.
3008                                                               (line  47)
3009 * config files, programming with:        Programming with config files.
3010                                                               (line   6)
3011 * config.h:                              Programming overview.
3012                                                               (line  33)
3013 * config.log:                            Bug checklist.       (line  24)
3014 * config.ps:                             Specially-recognized files.
3015                                                               (line  16)
3016 * config.ps, search path for:            Supported file formats.
3017                                                               (line  57)
3018 * config.status:                         Bug checklist.       (line  27)
3019 * configuration bugs:                    Bug checklist.       (line  27)
3020 * configuration file, source for path:   Path sources.        (line  17)
3021 * configuration files as shell scripts.: Config files.        (line  79)
3022 * configuration of mktex scripts:        mktex configuration. (line   6)
3023 * configure options for mktex scripts:   mktex configuration. (line  12)
3024 * context diff:                          Bug checklist.       (line  52)
3025 * continuation character:                Config files.        (line  37)
3026 * core dumps, reporting:                 Bug checklist.       (line  58)
3027 * crashes, reporting:                    Bug checklist.       (line  58)
3028 * CWEBINPUTS:                            Supported file formats.
3029                                                               (line  53)
3030 * database search:                       Searching overview.  (line  17)
3031 * database, for filenames:               Filename database.   (line   6)
3032 * database, format of:                   Database format.     (line   6)
3033 * debug.h:                               Debugging.           (line   6)
3034 * debugger:                              Bug checklist.       (line  58)
3035 * debugging:                             Debugging.           (line   6)
3036 * debugging options, in Kpathsea-using program: Calling sequence.
3037                                                               (line  39)
3038 * debugging output:                      Debugging.           (line  27)
3039 * default expansion:                     Default expansion.   (line   6)
3040 * default_texsizes:                      Fallback font.       (line   6)
3041 * device, wrong:                         Unable to generate fonts.
3042                                                               (line  29)
3043 * directories, making append-only:       mktex configuration. (line  61)
3044 * directory permissions:                 Security.            (line  51)
3045 * directory structure, for TeX files:    TeX directory structure.
3046                                                               (line   6)
3047 * disabling mktex scripts:               mktex configuration. (line   6)
3048 * disk search:                           Searching overview.  (line  22)
3049 * disk searching, avoiding:              ls-R.                (line  51)
3050 * disk usage, reducing:                  Logging.             (line   6)
3051 * doc files:                             Supported file formats.
3052                                                               (line 185)
3053 * DOS compatible names:                  mktex configuration. (line  68)
3054 * dosnames:                              mktex configuration. (line  67)
3055 * dot files:                             ls-R.                (line  33)
3056 * doubled colons:                        Default expansion.   (line   6)
3057 * dpiNNN directories:                    mktex configuration. (line  68)
3058 * DVILJMAKEPK:                           mktex script names.  (line  32)
3059 * DVILJSIZES:                            Fallback font.       (line   6)
3060 * dvipdfmx.cfg:                          Specially-recognized files.
3061                                                               (line  19)
3062 * DVIPSFONTS:                            Supported file formats.
3063                                                               (line 254)
3064 * DVIPSHEADERS:                          Supported file formats.
3065                                                               (line 211)
3066 * DVIPSMAKEPK:                           mktex script names.  (line  32)
3067 * DVIPSSIZES:                            Fallback font.       (line   6)
3068 * dynamic creation of files:             mktex scripts.       (line   6)
3069 * EC fonts, and dynamic source creation: mktex scripts.       (line   6)
3070 * elt-dirs.c:                            Subdirectory expansion.
3071                                                               (line  41)
3072 * elt-dirs.c <1>:                        Subdirectory expansion.
3073                                                               (line  48)
3074 * enabling mktex scripts:                mktex configuration. (line   6)
3075 * ENCFONTS:                              Supported file formats.
3076                                                               (line  61)
3077 * engine name:                           Path searching options.
3078                                                               (line  21)
3079 * environment variable, source for path: Path sources.        (line   9)
3080 * environment variables for TeX:         Supported file formats.
3081                                                               (line   6)
3082 * environment variables in paths:        Variable expansion.  (line   6)
3083 * environment variables, old:            Unable to find files.
3084                                                               (line  14)
3085 * epoch, seconds since:                  Logging.             (line  15)
3086 * error message macros:                  Calling sequence.    (line  22)
3087 * excessive startup time:                Slow path searching. (line   6)
3088 * expand.c:                              Brace expansion.     (line  26)
3089 * expanding symlinks:                    Calling sequence.    (line  31)
3090 * expansion, default:                    Default expansion.   (line   6)
3091 * expansion, path element:               Searching overview.  (line  43)
3092 * expansion, search path:                Path expansion.      (line   6)
3093 * expansion, subdirectory:               Subdirectory expansion.
3094                                                               (line   6)
3095 * expansion, tilde:                      Tilde expansion.     (line   6)
3096 * expansion, variable:                   Variable expansion.  (line   6)
3097 * explicitly relative filenames:         Searching overview.  (line  52)
3098 * extensions, filename:                  File lookup.         (line  24)
3099 * externally-built filename database:    Filename database.   (line   6)
3100 * extra colons:                          Default expansion.   (line   6)
3101 * failed mktex... script invocation:     mktex script names.  (line  35)
3102 * fallback font:                         Fallback font.       (line   6)
3103 * fallback resolutions:                  Fallback font.       (line   6)
3104 * FAQ, Kpathsea:                         Common problems.     (line   6)
3105 * Farwell, Matthew:                      Subdirectory expansion.
3106                                                               (line  22)
3107 * file formats, supported:               Supported file formats.
3108                                                               (line   6)
3109 * file lookup:                           File lookup.         (line   6)
3110 * file permissions:                      Security.            (line  47)
3111 * file types, registering new:           Programming overview.
3112                                                               (line  39)
3113 * filename aliases:                      Filename aliases.    (line   6)
3114 * filename database:                     Filename database.   (line   6)
3115 * filenames, absolute or explicitly relative: Searching overview.
3116                                                               (line  52)
3117 * files, unable to find:                 Unable to find files.
3118                                                               (line   6)
3119 * filesystem search:                     Searching overview.  (line  22)
3120 * floating directories:                  Searching overview.  (line  22)
3121 * fmtutil:                               mktex script names.  (line  10)
3122 * fmtutil.cnf:                           Specially-recognized files.
3123                                                               (line  22)
3124 * fmtutils.cnf:                          mktex configuration. (line  24)
3125 * font alias files:                      Fontmap.             (line   6)
3126 * font generation failures:              Unable to generate fonts.
3127                                                               (line   6)
3128 * font of last resort:                   Fallback font.       (line   6)
3129 * font set, infinite:                    mktex scripts.       (line   6)
3130 * FONTCIDMAPS:                           Supported file formats.
3131                                                               (line  68)
3132 * FONTFEATURES:                          Supported file formats.
3133                                                               (line  71)
3134 * fontmap files:                         Fontmap.             (line   6)
3135 * fontmaps:                              mktex configuration. (line  86)
3136 * fontmaps <1>:                          mktex configuration. (line  87)
3137 * fontname:                              mktex configuration. (line  87)
3138 * fontnames, arbitrary length:           Fontmap.             (line  15)
3139 * FOOINPUTS:                             Supported file formats.
3140                                                               (line 236)
3141 * FOOINPUTS <1>:                         Supported file formats.
3142                                                               (line 239)
3143 * fopen, redefined:                      Debugging.           (line  54)
3144 * format of external database:           Database format.     (line   6)
3145 * ftp.cs.stanford.edu:                   unixtex.ftp.         (line  20)
3146 * ftp.tug.org:                           unixtex.ftp.         (line   6)
3147 * fundamental purpose of Kpathsea:       Introduction.        (line   6)
3148 * gdb, recommended:                      Bug checklist.       (line  58)
3149 * gf:                                    Supported file formats.
3150                                                               (line  75)
3151 * GFFONTS:                               Supported file formats.
3152                                                               (line  75)
3153 * globally writable directories:         Security.            (line  30)
3154 * glyph lookup:                          Glyph lookup.        (line   6)
3155 * glyph lookup bitmap tolerance:         Basic glyph lookup.  (line  15)
3156 * GLYPHFONTS:                            Supported file formats.
3157                                                               (line  75)
3158 * GLYPHFONTS <1>:                        Supported file formats.
3159                                                               (line 164)
3160 * glyphlist.txt:                         Specially-recognized files.
3161                                                               (line  25)
3162 * GNU C compiler bugs:                   TeX or Metafont failing.
3163                                                               (line  19)
3164 * GNU General Public License:            Introduction.        (line  31)
3165 * group-writable directories:            Security.            (line  40)
3166 * GSFTOPK_DEBUG (128):                   Debugging.           (line  88)
3167 * hash table buckets, printing:          Debugging.           (line 105)
3168 * hash table routines:                   Calling sequence.    (line 110)
3169 * hash_summary_only variable for debugging: Debugging.        (line 105)
3170 * history of Kpathsea:                   History.             (line   6)
3171 * Hoekwater, Taco:                       History.             (line  78)
3172 * home directories in paths:             Tilde expansion.     (line   6)
3173 * HOME, as ~ expansion:                  Tilde expansion.     (line   6)
3174 * identifiers, characters valid in:      Config files.        (line  47)
3175 * include fontmap directive:             Fontmap.             (line  30)
3176 * INDEXSTYLE:                            Supported file formats.
3177                                                               (line  84)
3178 * input lines, reading:                  Calling sequence.    (line 110)
3179 * interactive query:                     Path searching options.
3180                                                               (line 119)
3181 * interface, not frozen:                 Introduction.        (line  28)
3182 * introduction:                          Introduction.        (line   6)
3183 * kdebug::                               Debugging.           (line 105)
3184 * kdefault.c:                            Default expansion.   (line  48)
3185 * Knuth, Donald E.:                      History.             (line   6)
3186 * Knuth, Donald E., archive of programs by: unixtex.ftp.      (line  20)
3187 * Kpathsea config file, source for path: Path sources.        (line  17)
3188 * kpathsea.h:                            Programming overview.
3189                                                               (line  24)
3190 * kpathsea_cnf_get:                      Programming with config files.
3191                                                               (line  23)
3192 * KPATHSEA_DEBUG:                        Calling sequence.    (line  28)
3193 * KPATHSEA_DEBUG <1>:                    Debugging.           (line  18)
3194 * kpathsea_find_file:                    File lookup.         (line  38)
3195 * kpathsea_find_file <1>:                Calling sequence.    (line  62)
3196 * kpathsea_find_glyph:                   Glyph lookup.        (line  26)
3197 * kpathsea_finish:                       Calling sequence.    (line 106)
3198 * kpathsea_init_prog:                    Fallback font.       (line  15)
3199 * kpathsea_init_prog <1>:                Calling sequence.    (line  53)
3200 * kpathsea_in_name_ok:                   Calling sequence.    (line 101)
3201 * kpathsea_new:                          Calling sequence.    (line   9)
3202 * kpathsea_open_file:                    Calling sequence.    (line  74)
3203 * kpathsea_out_name_ok:                  Calling sequence.    (line  82)
3204 * kpathsea_set_program_name:             Calling sequence.    (line  14)
3205 * kpathsea_var_value:                    Programming with config files.
3206                                                               (line  10)
3207 * KPATHSEA_WARNING:                      Config files.        (line  18)
3208 * kpse->debug:                           Debugging.           (line   6)
3209 * kpse->debug <1>:                       Debugging.           (line  18)
3210 * kpse->debug variable:                  Calling sequence.    (line  39)
3211 * kpse->format_info:                     Calling sequence.    (line  47)
3212 * kpse->invocation_name:                 Calling sequence.    (line  22)
3213 * kpse->invocation_short_name:           Calling sequence.    (line  22)
3214 * kpse->program_name:                    Calling sequence.    (line  22)
3215 * kpsewhich:                             Invoking kpsewhich.  (line   6)
3216 * Kpsewhich, and debugging:              Debugging.           (line  31)
3217 * KPSE_BITMAP_TOLERANCE:                 Basic glyph lookup.  (line  15)
3218 * KPSE_DEBUG_EXPAND (16):                Debugging.           (line  68)
3219 * KPSE_DEBUG_FOPEN (4):                  Debugging.           (line  53)
3220 * KPSE_DEBUG_HASH (2):                   Debugging.           (line  46)
3221 * KPSE_DEBUG_PATHS (8):                  Debugging.           (line  60)
3222 * KPSE_DEBUG_SEARCH (32):                Debugging.           (line  74)
3223 * KPSE_DEBUG_STAT (1):                   Debugging.           (line  38)
3224 * KPSE_DEBUG_VARS (64):                  Debugging.           (line  83)
3225 * KPSE_DOT expansion:                    KPSE_DOT expansion.  (line   6)
3226 * kpse_format_info_type:                 Debugging.           (line  61)
3227 * last-resort font:                      Fallback font.       (line   6)
3228 * lcircle10:                             Fontmap.             (line  19)
3229 * leading colons:                        Default expansion.   (line   6)
3230 * leaf directories wrongly guessed:      Unable to find files.
3231                                                               (line  21)
3232 * leaf directory trick:                  Subdirectory expansion.
3233                                                               (line  22)
3234 * license for using the library:         Introduction.        (line  31)
3235 * LIGFONTS:                              Supported file formats.
3236                                                               (line  88)
3237 * lines, reading arbitrary-length:       Calling sequence.    (line 110)
3238 * Linux File System Standard:            mktex configuration. (line 113)
3239 * local cache of fonts:                  Security.            (line  22)
3240 * log file:                              Logging.             (line   6)
3241 * logging successful searches:           Logging.             (line   6)
3242 * lost+found directory:                  Searching overview.  (line  56)
3243 * lostchar:                              Suppressing warnings.
3244                                                               (line  19)
3245 * ls-R:                                  Supported file formats.
3246                                                               (line  91)
3247 * ls-R database file:                    ls-R.                (line   6)
3248 * ls-R, simplest build:                  ls-R.                (line  18)
3249 * MacKenzie, David:                      History.             (line  44)
3250 * MacKenzie, David <1>:                  Subdirectory expansion.
3251                                                               (line  22)
3252 * magic characters:                      Searching overview.  (line  13)
3253 * mailing lists:                         Mailing lists.       (line   6)
3254 * MAKETEX_DEBUG (512):                   Debugging.           (line  91)
3255 * MAKETEX_FINE_DEBUG (1024):             Debugging.           (line 100)
3256 * memory allocation routines:            Calling sequence.    (line 110)
3257 * metafont driver files:                 mktex configuration. (line  93)
3258 * Metafont failures:                     TeX or Metafont failing.
3259                                                               (line   6)
3260 * Metafont installation:                 Unable to generate fonts.
3261                                                               (line  51)
3262 * Metafont making too-large fonts:       Unable to generate fonts.
3263                                                               (line  36)
3264 * Metafont using the wrong device:       Unable to generate fonts.
3265                                                               (line  29)
3266 * MFBASES:                               Supported file formats.
3267                                                               (line  26)
3268 * MFINPUTS:                              Supported file formats.
3269                                                               (line 105)
3270 * MFPOOL:                                Supported file formats.
3271                                                               (line 109)
3272 * MFTINPUTS:                             Supported file formats.
3273                                                               (line 113)
3274 * MISCFONTS:                             Supported file formats.
3275                                                               (line 117)
3276 * mismatched checksum warnings:          Suppressing warnings.
3277                                                               (line  17)
3278 * missfont.log:                          mktex script names.  (line  35)
3279 * MISSFONT_LOG:                          mktex script names.  (line  40)
3280 * missing character warnings:            Suppressing warnings.
3281                                                               (line  20)
3282 * mkocp:                                 mktex script names.  (line  18)
3283 * mkofm:                                 mktex script names.  (line  21)
3284 * mktex script configuration:            mktex configuration. (line   6)
3285 * mktex script names:                    mktex script names.  (line   6)
3286 * mktex scripts:                         mktex scripts.       (line   6)
3287 * mktex.cnf:                             Specially-recognized files.
3288                                                               (line  28)
3289 * mktex.cnf <1>:                         mktex configuration. (line  29)
3290 * mktex.opt:                             mktex configuration. (line  29)
3291 * mktex.opt <1>:                         mktex configuration. (line  39)
3292 * mktexdir:                              mktex configuration. (line  61)
3293 * mktexfmt:                              mktex script names.  (line  10)
3294 * mktexmf:                               mktex script names.  (line  15)
3295 * mktexpk:                               mktex script names.  (line  24)
3296 * mktexpk can't guess mode:              Unable to generate fonts.
3297                                                               (line  12)
3298 * mktextex:                              mktex script names.  (line  27)
3299 * mktextfm:                              mktex script names.  (line  30)
3300 * MLBIBINPUTS:                           Supported file formats.
3301                                                               (line 121)
3302 * MLBSTINPUTS:                           Supported file formats.
3303                                                               (line 125)
3304 * mode directory, omitting:              mktex configuration. (line  98)
3305 * Morgan, Tim:                           History.             (line  12)
3306 * MPINPUTS:                              Supported file formats.
3307                                                               (line 129)
3308 * MPMEMS:                                Supported file formats.
3309                                                               (line  97)
3310 * MPPOOL:                                Supported file formats.
3311                                                               (line 133)
3312 * MPSUPPORT:                             Supported file formats.
3313                                                               (line 101)
3314 * MT_FEATURES:                           mktex configuration. (line  39)
3315 * multiple TeX hierarchies:              Brace expansion.     (line  20)
3316 * must exist:                            Searching overview.  (line  31)
3317 * names for mktex scripts:               mktex script names.  (line   6)
3318 * Neumann, Gustaf:                       History.             (line  56)
3319 * NFS and ls-R:                          ls-R.                (line  40)
3320 * nomfdrivers:                           mktex configuration. (line  92)
3321 * nomode:                                mktex configuration. (line  97)
3322 * none:                                  Suppressing warnings.
3323                                                               (line  23)
3324 * null pointers, dereferencing:          Bug checklist.       (line  58)
3325 * numeric debugging values:              Debugging.           (line  34)
3326 * obtaining TeX:                         unixtex.ftp.         (line   6)
3327 * OCPINPUTS:                             Supported file formats.
3328                                                               (line 137)
3329 * OFMFONTS:                              Supported file formats.
3330                                                               (line 141)
3331 * online Metafont display, spurious:     Unable to generate fonts.
3332                                                               (line  36)
3333 * OPENTYPEFONTS:                         Supported file formats.
3334                                                               (line 145)
3335 * optimization caveat:                   TeX or Metafont failing.
3336                                                               (line  15)
3337 * options for debugging:                 Debugging.           (line   6)
3338 * OTPINPUTS:                             Supported file formats.
3339                                                               (line 151)
3340 * overview of path searching:            Searching overview.  (line   6)
3341 * overview of programming with Kpathsea: Programming overview.
3342                                                               (line   6)
3343 * OVFFONTS:                              Supported file formats.
3344                                                               (line 154)
3345 * OVPFONTS:                              Supported file formats.
3346                                                               (line 157)
3347 * path expansion:                        Path expansion.      (line   6)
3348 * path searching:                        Path searching.      (line   6)
3349 * path searching options:                Path searching options.
3350                                                               (line   6)
3351 * path searching, overview:              Searching overview.  (line   6)
3352 * path searching, standalone:            Invoking kpsewhich.  (line   6)
3353 * path sources:                          Path sources.        (line   6)
3354 * pathsearch.h:                          Programming overview.
3355                                                               (line  24)
3356 * pc Pascal compiler:                    History.             (line  12)
3357 * pdfglyphlist.txt:                      Specially-recognized files.
3358                                                               (line  31)
3359 * pdftex.cfg:                            Specially-recognized files.
3360                                                               (line  34)
3361 * PDFTEXCONFIG:                          Supported file formats.
3362                                                               (line 161)
3363 * pdftexconfig.tex:                      Specially-recognized files.
3364                                                               (line  34)
3365 * permission denied:                     Searching overview.  (line  56)
3366 * permissions, directory:                Security.            (line  51)
3367 * permissions, file:                     Security.            (line  47)
3368 * PKFONTS:                               Supported file formats.
3369                                                               (line 164)
3370 * plain.base:                            Unable to generate fonts.
3371                                                               (line  46)
3372 * privacy, semblance of:                 Logging.             (line  32)
3373 * problems, common:                      Common problems.     (line   6)
3374 * proginit.h:                            Calling sequence.    (line  53)
3375 * program-varying paths:                 Supported file formats.
3376                                                               (line  12)
3377 * programming overview:                  Programming overview.
3378                                                               (line   6)
3379 * programming with config files:         Programming with config files.
3380                                                               (line   6)
3381 * programming with Kpathsea:             Calling sequence.    (line   6)
3382 * programs using the library:            Introduction.        (line  13)
3383 * proof mode:                            Unable to generate fonts.
3384                                                               (line  36)
3385 * PSHEADERS:                             Supported file formats.
3386                                                               (line 169)
3387 * pxp Pascal preprocessor:               History.             (line  12)
3388 * quoting variable values:               Variable expansion.  (line  17)
3389 * re-entrant API:                        Programming overview.
3390                                                               (line  16)
3391 * readable:                              Suppressing warnings.
3392                                                               (line  26)
3393 * reading arbitrary-length lines:        Calling sequence.    (line 110)
3394 * recording successful searches:         Logging.             (line   6)
3395 * relative filenames:                    Searching overview.  (line  52)
3396 * reporting bugs:                        Reporting bugs.      (line   6)
3397 * resident.c:                            Calling sequence.    (line  47)
3398 * resolution, setting:                   Path searching options.
3399                                                               (line  17)
3400 * resolutions, last-resort:              Fallback font.       (line   6)
3401 * retrieving TeX:                        unixtex.ftp.         (line   6)
3402 * right-hand side of variable assignments: Config files.      (line  56)
3403 * RISINPUTS:                             Supported file formats.
3404                                                               (line 173)
3405 * Rokicki, Tom:                          History.             (line  12)
3406 * root user:                             Tilde expansion.     (line  19)
3407 * runtime configuration files:           Config files.        (line   6)
3408 * runtime debugging:                     Debugging.           (line   6)
3409 * Sauter fonts, and dynamic source creation: mktex scripts.   (line   6)
3410 * scripts for file creation:             mktex scripts.       (line   6)
3411 * search path, defined:                  Searching overview.  (line   6)
3412 * searching for files:                   File lookup.         (line   6)
3413 * searching for glyphs:                  Glyph lookup.        (line   6)
3414 * searching overview:                    Searching overview.  (line   6)
3415 * searching the database:                Searching overview.  (line  17)
3416 * searching the disk:                    Searching overview.  (line  22)
3417 * security considerations:               Security.            (line   6)
3418 * SELFAUTODIR:                           Calling sequence.    (line  31)
3419 * SELFAUTOLOC:                           Calling sequence.    (line  31)
3420 * SELFAUTOPARENT:                        Calling sequence.    (line  31)
3421 * sending patches:                       Bug checklist.       (line  52)
3422 * setgid scripts:                        Security.            (line  40)
3423 * SFDFONTS:                              Supported file formats.
3424                                                               (line 177)
3425 * shell scripts as configuration files:  Config files.        (line  79)
3426 * shell variables:                       Variable expansion.  (line  17)
3427 * shell_escape, example for code:        Programming with config files.
3428                                                               (line  10)
3429 * site overrides for mktex...:           mktex configuration. (line  29)
3430 * skeleton TeX directory:                TeX directory structure.
3431                                                               (line   6)
3432 * slow startup time:                     Slow path searching. (line   6)
3433 * source files:                          Supported file formats.
3434                                                               (line 188)
3435 * sources for search paths:              Path sources.        (line   6)
3436 * special:                               Suppressing warnings.
3437                                                               (line  30)
3438 * stack trace:                           Bug checklist.       (line  58)
3439 * standalone path searching:             Invoking kpsewhich.  (line   6)
3440 * standard error and debugging output:   Debugging.           (line  27)
3441 * standard options:                      Standard options.    (line   6)
3442 * startup time, excessive:               Slow path searching. (line   6)
3443 * string routines:                       Calling sequence.    (line 110)
3444 * strip:                                 mktex configuration. (line 107)
3445 * stripsupplier:                         mktex configuration. (line 101)
3446 * striptypeface:                         mktex configuration. (line 104)
3447 * st_nlink:                              Subdirectory expansion.
3448                                                               (line  26)
3449 * ST_NLINK_TRICK:                        Subdirectory expansion.
3450                                                               (line  38)
3451 * subdirectory searching:                Subdirectory expansion.
3452                                                               (line   6)
3453 * suffixes, filename:                    File lookup.         (line  24)
3454 * suggestions, making:                   Introduction.        (line  28)
3455 * Sun 2:                                 History.             (line  12)
3456 * supplier directory, omitting:          mktex configuration. (line 102)
3457 * supplier directory, omitting <1>:      mktex configuration. (line 108)
3458 * supported file formats:                Supported file formats.
3459                                                               (line   6)
3460 * suppressing warnings:                  Suppressing warnings.
3461                                                               (line   6)
3462 * symbolic links not found:              Unable to find files.
3463                                                               (line  21)
3464 * symbolic links, and ls-R:              ls-R.                (line  38)
3465 * symlinks, resolving:                   Calling sequence.    (line  31)
3466 * system C compiler bugs:                TeX or Metafont failing.
3467                                                               (line  19)
3468 * T1FONTS:                               Supported file formats.
3469                                                               (line 211)
3470 * T1INPUTS:                              Supported file formats.
3471                                                               (line 211)
3472 * T42FONTS:                              Supported file formats.
3473                                                               (line 216)
3474 * tcfmgr.map:                            Specially-recognized files.
3475                                                               (line  46)
3476 * TDS:                                   TeX directory structure.
3477                                                               (line   6)
3478 * TeX directory structure:               TeX directory structure.
3479                                                               (line   6)
3480 * TeX environment variables:             Supported file formats.
3481                                                               (line   6)
3482 * TeX failures:                          TeX or Metafont failing.
3483                                                               (line   6)
3484 * TeX file lookup:                       File lookup.         (line   6)
3485 * TeX glyph lookup:                      Glyph lookup.        (line   6)
3486 * TeX support:                           TeX support.         (line   6)
3487 * TeX Users Group:                       Introduction.        (line  40)
3488 * tex-file.c:                            File lookup.         (line  38)
3489 * tex-file.h:                            Programming overview.
3490                                                               (line  24)
3491 * tex-glyph.c:                           Glyph lookup.        (line  26)
3492 * tex-glyph.h:                           Programming overview.
3493                                                               (line  24)
3494 * tex-k@tug.org:                         Mailing lists.       (line   6)
3495 * tex-k@tug.org (bug address):           Reporting bugs.      (line   6)
3496 * tex.web:                               unixtex.ftp.         (line  20)
3497 * TEXBIB:                                Supported file formats.
3498                                                               (line  30)
3499 * TEXBIB <1>:                            Supported file formats.
3500                                                               (line 121)
3501 * TEXCONFIG:                             Supported file formats.
3502                                                               (line  57)
3503 * TEXDOCS:                               Supported file formats.
3504                                                               (line 185)
3505 * TEXFONTMAPS:                           Supported file formats.
3506                                                               (line  94)
3507 * TEXFONTS:                              Supported file formats.
3508                                                               (line  75)
3509 * TEXFONTS <1>:                          Supported file formats.
3510                                                               (line 164)
3511 * TEXFONTS <2>:                          Supported file formats.
3512                                                               (line 199)
3513 * TEXFONTS <3>:                          Supported file formats.
3514                                                               (line 219)
3515 * texfonts.map:                          Fontmap.             (line   6)
3516 * TEXFORMATS:                            Supported file formats.
3517                                                               (line  64)
3518 * TEXINDEXSTYLE:                         Supported file formats.
3519                                                               (line  84)
3520 * TEXINPUTS:                             Supported file formats.
3521                                                               (line  79)
3522 * TEXINPUTS <1>:                         Supported file formats.
3523                                                               (line 180)
3524 * TEXMF:                                 TeX directory structure.
3525                                                               (line   6)
3526 * texmf.cnf:                             Specially-recognized files.
3527                                                               (line  38)
3528 * texmf.cnf missing, warning about:      Config files.        (line  18)
3529 * texmf.cnf, and variable expansion:     Variable expansion.  (line   6)
3530 * texmf.cnf, definition for:             Config files.        (line   6)
3531 * texmf.cnf, source for path:            Path sources.        (line  17)
3532 * TEXMFCNF:                              Config files.        (line   6)
3533 * TEXMFCNF <1>:                          Supported file formats.
3534                                                               (line  49)
3535 * TEXMFDBS:                              ls-R.                (line   6)
3536 * TEXMFDBS <1>:                          Supported file formats.
3537                                                               (line  91)
3538 * TEXMFINI:                              Supported file formats.
3539                                                               (line  26)
3540 * TEXMFINI <1>:                          Supported file formats.
3541                                                               (line  64)
3542 * TEXMFINI <2>:                          Supported file formats.
3543                                                               (line  97)
3544 * TEXMFLOG:                              Logging.             (line  10)
3545 * TEXMFOUTPUT:                           mktex script names.  (line  40)
3546 * TEXMFSCRIPTS:                          Supported file formats.
3547                                                               (line 191)
3548 * texmfvar:                              mktex configuration. (line 122)
3549 * TEXMFVAR:                              mktex configuration. (line 123)
3550 * TEXPICTS:                              Supported file formats.
3551                                                               (line  79)
3552 * TEXPKS:                                Supported file formats.
3553                                                               (line 164)
3554 * TEXPOOL:                               Supported file formats.
3555                                                               (line 195)
3556 * TEXPSHEADERS:                          Supported file formats.
3557                                                               (line 169)
3558 * TEXPSHEADERS <1>:                      Supported file formats.
3559                                                               (line 211)
3560 * TEXSIZES:                              Fallback font.       (line   6)
3561 * TEXSOURCES:                            Supported file formats.
3562                                                               (line 188)
3563 * TEX_HUSH:                              Searching overview.  (line  56)
3564 * TEX_HUSH <1>:                          Suppressing warnings.
3565                                                               (line   6)
3566 * TFMFONTS:                              Supported file formats.
3567                                                               (line 199)
3568 * tilde expansion:                       Tilde expansion.     (line   6)
3569 * tilde.c:                               Tilde expansion.     (line  25)
3570 * time system call:                      Logging.             (line  15)
3571 * tolerance for glyph lookup:            Basic glyph lookup.  (line  15)
3572 * trailing / in home directory:          Tilde expansion.     (line  19)
3573 * trailing colons:                       Default expansion.   (line   6)
3574 * TRFONTS:                               Supported file formats.
3575                                                               (line 203)
3576 * trick for detecting leaf directories:  Subdirectory expansion.
3577                                                               (line  22)
3578 * trojan horse attack:                   Security.            (line  10)
3579 * try_std_extension_first:               File lookup.         (line  24)
3580 * TTFONTS:                               Supported file formats.
3581                                                               (line 207)
3582 * tug.org:                               unixtex.ftp.         (line   6)
3583 * typeface directory, omitting:          mktex configuration. (line 105)
3584 * typeface directory, omitting <1>:      mktex configuration. (line 108)
3585 * unable to find files:                  Unable to find files.
3586                                                               (line   6)
3587 * unable to generate fonts:              Unable to generate fonts.
3588                                                               (line   6)
3589 * uname:                                 Bug checklist.       (line  20)
3590 * unixtex.ftp:                           unixtex.ftp.         (line   6)
3591 * unknown special warnings:              Suppressing warnings.
3592                                                               (line  31)
3593 * unreadable file warnings:              Suppressing warnings.
3594                                                               (line  27)
3595 * unreadable files:                      Searching overview.  (line  56)
3596 * unusable ls-R warning:                 ls-R.                (line  45)
3597 * usage patterns, finding:               Logging.             (line   6)
3598 * USERPROFILE, as ~ expansion:           Tilde expansion.     (line   6)
3599 * USE_TEXMFVAR:                          mktex configuration. (line 128)
3600 * USE_VARTEXFONTS:                       mktex configuration. (line 118)
3601 * varfonts:                              mktex configuration. (line 112)
3602 * variable expansion:                    Variable expansion.  (line   6)
3603 * variable.c:                            Variable expansion.  (line  32)
3604 * variable.h:                            Programming with config files.
3605                                                               (line  10)
3606 * VARTEXFONTS:                           mktex configuration. (line 113)
3607 * VAX 11/750:                            History.             (line  12)
3608 * version numbers, determining:          Bug checklist.       (line  15)
3609 * VF files, not found:                   Searching overview.  (line  31)
3610 * VFFONTS:                               Supported file formats.
3611                                                               (line 219)
3612 * Vojta, Paul:                           History.             (line  30)
3613 * Walsh, Norman:                         History.             (line  56)
3614 * warning about unusable ls-R:           ls-R.                (line  45)
3615 * warning, about missing texmf.cnf:      Config files.        (line  18)
3616 * warnings, file access:                 Searching overview.  (line  56)
3617 * warnings, suppressing:                 Suppressing warnings.
3618                                                               (line   6)
3619 * WEB2C:                                 Supported file formats.
3620                                                               (line 227)
3621 * Weber, Olaf:                           History.             (line  73)
3622 * WEBINPUTS:                             Supported file formats.
3623                                                               (line 223)
3624 * whitespace, in fontmap files:          Fontmap.             (line  27)
3625 * whitespace, not ignored on continuation lines: Config files.
3626                                                               (line  37)
3627 * www.tug.org:                           unixtex.ftp.         (line   6)
3628 * XDvi:                                  Specially-recognized files.
3629                                                               (line  41)
3630 * XDVIFONTS:                             Supported file formats.
3631                                                               (line 254)
3632 * XDVIMAKEPK:                            mktex script names.  (line  32)
3633 * XDVISIZES:                             Fallback font.       (line   6)
3634 * zuhn, david:                           History.             (line  50)
3637 \x1f
3638 Tag Table:
3639 Node: Top\x7f1480
3640 Node: Introduction\x7f2261
3641 Node: History\x7f4208
3642 Node: unixtex.ftp\x7f8805
3643 Node: Security\x7f10300
3644 Node: TeX directory structure\x7f12804
3645 Node: Path searching\x7f16852
3646 Node: Searching overview\x7f17510
3647 Node: Path sources\x7f20905
3648 Node: Config files\x7f21963
3649 Node: Path expansion\x7f25890
3650 Node: Default expansion\x7f26839
3651 Node: Variable expansion\x7f28909
3652 Node: Tilde expansion\x7f30310
3653 Node: Brace expansion\x7f31290
3654 Node: KPSE_DOT expansion\x7f32215
3655 Node: Subdirectory expansion\x7f32728
3656 Node: Filename database\x7f35082
3657 Node: ls-R\x7f36136
3658 Node: Filename aliases\x7f39031
3659 Node: Database format\x7f40209
3660 Node: Invoking kpsewhich\x7f41222
3661 Node: Path searching options\x7f42177
3662 Node: Specially-recognized files\x7f50097
3663 Node: Auxiliary tasks\x7f51452
3664 Node: Standard options\x7f53791
3665 Node: TeX support\x7f54147
3666 Node: Supported file formats\x7f55499
3667 Node: File lookup\x7f63164
3668 Node: Glyph lookup\x7f64913
3669 Node: Basic glyph lookup\x7f66037
3670 Node: Fontmap\x7f66917
3671 Node: Fallback font\x7f69338
3672 Node: Suppressing warnings\x7f70250
3673 Node: mktex scripts\x7f71377
3674 Node: mktex configuration\x7f72592
3675 Node: mktex script names\x7f78395
3676 Node: mktex script arguments\x7f79781
3677 Node: Programming\x7f80660
3678 Node: Programming overview\x7f81182
3679 Node: Calling sequence\x7f83879
3680 Node: Program-specific files\x7f90411
3681 Node: Programming with config files\x7f91434
3682 Node: Reporting bugs\x7f92746
3683 Node: Bug checklist\x7f93424
3684 Node: Mailing lists\x7f96896
3685 Node: Debugging\x7f97571
3686 Node: Logging\x7f102648
3687 Node: Common problems\x7f104515
3688 Node: Unable to find files\x7f104992
3689 Node: Slow path searching\x7f107402
3690 Node: Unable to generate fonts\x7f108777
3691 Node: TeX or Metafont failing\x7f111248
3692 Node: Index\x7f112601
3693 \x1f
3694 End Tag Table