annotate kpathsea/kpathsea.texi @ 4265:48897c78c52b

[project @ 2003-01-03 06:04:29 by jwe]
author jwe
date Fri, 03 Jan 2003 06:06:33 +0000
parents 6929a31e7624
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1 \input texinfo
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2 @setfilename kpathsea.info
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
3 @settitle Kpathsea: A library for path searching
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
4
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
5 @set version 3.2
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
6 @set month-year October 1997
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
7
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
8 @c Define new indices for commands, filenames, and options.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
9 @defcodeindex cm
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
10 @defcodeindex fl
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
11 @defcodeindex op
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
12
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
13 @c Put everything in one index (arbitrarily chosen to be the concept index).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
14 @syncodeindex cm cp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
15 @syncodeindex fl cp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
16 @syncodeindex fn cp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
17 @syncodeindex ky cp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
18 @syncodeindex op cp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
19 @syncodeindex pg cp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
20 @syncodeindex tp cp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
21 @syncodeindex vr cp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
22
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
23 @dircategory TeX
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
24 @direntry
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
25 * Kpathsea: (kpathsea). File lookup along search paths.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
26 * kpsewhich: (kpathsea)Invoking kpsewhich. TeX file searching.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
27 * mktexmf: (kpathsea)mktex scripts. MF source generation.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
28 * mktexpk: (kpathsea)mktex scripts. PK bitmap generation.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
29 * mktextex: (kpathsea)mktex scripts. TeX source generation.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
30 * mktextfm: (kpathsea)mktex scripts. TeX font metric generation.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
31 * mktexlsr: (kpathsea)Filename database. Update ls-R.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
32 @end direntry
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
33
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
34 @ifinfo
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
35 This file documents the Kpathsea library for path searching.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
36
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
37 Copyright (C) 1993, 94, 95, 96, 97 K. Berry & O. Weber.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
38
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
39 Permission is granted to make and distribute verbatim copies of this
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
40 manual provided the copyright notice and this permission notice are
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
41 preserved on all copies.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
42
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
43 @ignore
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
44 Permission is granted to process this file through TeX and print the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
45 results, provided the printed document carries a copying permission
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
46 notice identical to this one except for the removal of this paragraph
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
47 (this paragraph not being relevant to the printed manual).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
48 @end ignore
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
49
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
50 Permission is granted to copy and distribute modified versions of this
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
51 manual under the conditions for verbatim copying, provided that the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
52 entire resulting derived work is distributed under the terms of a
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
53 permission notice identical to this one.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
54
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
55 Permission is granted to copy and distribute translations of this manual
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
56 into another language, under the above conditions for modified versions,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
57 except that this permission notice may be stated in a translation
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
58 approved by the Free Software Foundation.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
59 @end ifinfo
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
60
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
61
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
62 @titlepage
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
63
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
64 @title Kpathsea library
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
65 @subtitle for version @value{version}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
66 @subtitle @value{month-year}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
67 @author K. Berry (@email{kb@@mail.tug.org})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
68 @author O. Weber (@email{infovore@@xs4all.nl})
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
69
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
70 @page
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
71
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
72 @vskip 0pt plus 1filll
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
73 Copyright @copyright{} 1993, 94, 95, 96, 97 K. Berry & O. Weber.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
74
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
75 Permission is granted to make and distribute verbatim copies of this
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
76 manual provided the copyright notice and this permission notice are
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
77 preserved on all copies.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
78
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
79 Permission is granted to copy and distribute modified versions of this
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
80 manual under the conditions for verbatim copying, provided that the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
81 entire resulting derived work is distributed under the terms of a
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
82 permission notice identical to this one.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
83
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
84 Permission is granted to copy and distribute translations of this manual
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
85 into another language, under the above conditions for modified versions,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
86 except that this permission notice may be stated in a translation
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
87 approved by the Free Software Foundation.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
88 @end titlepage
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
89
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
90
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
91 @ifinfo
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
92 @node Top
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
93 @top Kpathsea library
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
94
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
95 This manual documents how to install and use the Kpathsea library for
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
96 filename lookup. It corresponds to version @value{version},
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
97 released in @value{month-year}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
98
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
99 @menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
100 * Introduction:: Overview.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
101 * Installation:: Compilation, installation, and bug reporting.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
102
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
103 * Path searching:: How filename lookups work.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
104 * TeX support:: Special support for TeX-related file lookups.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
105
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
106 * Programming:: How to use Kpathsea features in your program.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
107
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
108 * Index:: General index.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
109 @end menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
110 @end ifinfo
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
111
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
112
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
113 @node Introduction
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
114 @chapter Introduction
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
115
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
116 @cindex introduction
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
117 @cindex fundamental purpose of Kpathsea
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
118
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
119 This manual corresponds to version @value{version} of the Kpathsea
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
120 library, released in @value{month-year}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
121
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
122 The library's fundamental purpose is to return a filename from a list of
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
123 directories specified by the user, similar to what shells do when
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
124 looking up program names to execute.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
125
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
126 @cindex programs using the library
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
127 The following software, all of which we maintain, uses this library:
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
128
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
129 @itemize @bullet
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
130 @item Dviljk (see the @samp{dvilj} man page)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
131 @item Dvipsk (@pxref{Top, , Introduction, dvips, Dvips: A DVI driver})
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
132 @item GNU font utilities (@pxref{Top, , Introduction, fontu, GNU font
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
133 utilities})
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
134 @item Web2c (@pxref{Top, , Introduction, web2c, Web2c: A @TeX{}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
135 implementation})
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
136 @item Xdvik (see the @samp{xdvi} man page)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
137 @end itemize
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
138
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
139 @noindent Other software that we do not maintain also uses it.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
140
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
141 @cindex interface, not frozen
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
142 @cindex comments, making
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
143 @cindex suggestions, making
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
144 We are still actively maintaining the library (and probably always will
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
145 be, despite our hopes). If you have comments or suggestions, please send
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
146 them to us (@pxref{Reporting bugs}).
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
147
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
148 @cindex conditions for use
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
149 @cindex license for using the library
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
150 @cindex GNU General Public License
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
151 We distribute the library under the GNU Library General Public License
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
152 (LGPL), with one exception (see below). In short, this means if you
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
153 write a program using the library, you must (offer to) distribute the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
154 source to the library, along with any changes you have made, and allow
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
155 anyone to modify the library source and distribute their modifications.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
156 It does not mean you have to distribute the source to your program,
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
157 although we hope you will.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
158
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
159 The exception is the part of the file @file{expand.c} which implements
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
160 brace expansion. We took this from Bash, which is covered by the GNU
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
161 General Public License (GPL). Therefore, if you wish to redistribute
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
162 the library under the LGPL, you must remove this code. (If you write a
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
163 replacement we can distribute, we hope you'll share it with us.) See the
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
164 files @file{COPYING} and @file{COPYING.LIB} for the text of the GNU licenses.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
165
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
166 @cindex @TeX{} Users Group
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
167 If you know enough about @TeX{} to be reading this manual, then you (or
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
168 your institution) should consider joining the @TeX{} Users Group (if
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
169 you're already a member, great!). TUG produces the periodical
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
170 @cite{TUGboat}, sponsors an annual meeting and publishes the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
171 proceedings, and arranges courses on @TeX{} for all levels of users
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
172 throughout the world. Anyway, here is the address:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
173
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
174 @flindex tug@@tug.org
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
175 @display
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
176 @TeX{} Users Group
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
177 P.O. Box 1239
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
178 Three Rivers, CA 93271-1239
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
179 USA
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
180 phone: 1 209 561 0112
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
181 fax: 1 209 561 4584
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
182 email: @email{tug@@tug.org}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
183 @end display
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
184
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
185 @menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
186 * History::
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
187 @end menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
188
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
189
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
190 @node History
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
191 @section History
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
192
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
193 @cindex history of Kpathsea
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
194
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
195 @cindex Knuth, Donald E.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
196 (This section is for those people who are curious about how the library
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
197 came about.) (If you like to read historical accounts of software, we
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
198 urge you to seek out the GNU Autoconf manual and the ``Errors of
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
199 @TeX{}'' paper by Don Knuth, published in @cite{Software---Practice and
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
200 Experience} 19(7), July 1989.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
201
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
202 @cindex Morgan, Tim
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
203 @cindex Rokicki, Tom
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
204 @cindex Berry, Karl
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
205 @cindex VAX 11/750
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
206 @cindex Sun 2
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
207 @pindex pxp @r{Pascal preprocessor}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
208 @pindex pc @r{Pascal compiler}
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
209 [Karl writes.] My first ChangeLog entry for Web2c seems to be February
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
210 1990, but I may have done some work before then. In any case, Tim
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
211 Morgan and I were jointly maintaining it for a time. (I should mention
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
212 here that Tim had made Web2c into a real distribution long before I had
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
213 ever used it or even heard of it, and Tom Rokicki did the original
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
214 implementation. I was using @code{pxp} and @code{pc} on VAX 11/750's
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
215 and the hot new Sun 2 machines.)
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
216
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
217 It must have been later in 1990 and 1991 that I started working on
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
218 @cite{@TeX{} for the Impatient}. Dvips, Xdvi, Web2c, and the GNU
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
219 fontutils (which I was also writing at the time) all used different
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
220 environment variables, and, more importantly, had different bugs in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
221 their path searching. This became extremely painful, as I was stressing
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
222 everything to the limit working on the book. I also desperately wanted
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
223 to implement subdirectory searching, since I couldn't stand putting
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
224 everything in one big directory, and also couldn't stand having to
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
225 explicitly specify @file{cm}, @file{pandora}, @dots{} in a path.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
226
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
227 @cindex Vojta, Paul
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
228 In the first incarnation, I just hacked separately on each
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
229 program---that was the original subdirectory searching code in both Xdvi
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
230 and Dvips, though I think Paul Vojta has completely rewritten Xdvi's
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
231 support by now. That is, I tried to go with the flow in each program,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
232 rather than changing the program's calling sequences to conform to
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
233 common routines.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
234
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
235 Then, as bugs inevitably appeared, I found I was fixing the same thing
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
236 three times (Web2c and fontutils were always sharing code, since I
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
237 maintained those---there was no Dvipsk or Xdvik or Dviljk at this
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
238 point). After a while, I finally started sharing source files. They
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
239 weren't yet a library, though. I just kept things up to date with shell
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
240 scripts. (I was developing on a 386 running ISC 2.2 at the time, and so
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
241 didn't have symbolic links. An awful experience.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
242
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
243 @cindex MacKenzie, David
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
244 The ChangeLogs for Xdvik and Dvipsk record initial releases of those
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
245 distributions in May and June 1992. I think it was because I was tired
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
246 of the different configuration strategies of each program, not so much
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
247 because of the path searching. (Autoconf was being developed by David
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
248 MacKenzie and others, and I was adapting it to @TeX{} and friends.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
249
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
250 @cindex zuhn, david
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
251 I started to make a separate library that other programs could link with
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
252 on my birthday in April 1993, according to the ChangeLog. I don't
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
253 remember exactly why I finally took the time to make it a separate
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
254 library; a conversation with david zuhn that initiated it. Just seemed
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
255 like it was time.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
256
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
257 @cindex Walsh, Norman
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
258 @cindex Neumann, Gustaf
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
259 Dviljk got started in March 1994 after I bought a Laserjet 4. (Kpathsea
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
260 work got suspended while Norm Walsh and I, with Gustaf Neumann's help,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
261 implemented a way for @TeX{} to get at all those neat builtin LJ4 fonts
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
262 @dots{} such a treat to have something to typeset in besides Palatino!)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
263
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
264 By spring of 1995, I had implemented just about all the path-searching
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
265 features in Kpathsea that I plan to, driven beyond my initial goals by
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
266 Thomas Esser and others. I then started to integrate Web2c with
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
267 Kpathsea. After the release of a stable Web2c, I hope to be able to stop
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
268 development, and turn most of my attention back to making fonts for GNU.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
269 (Always assuming Micros**t hasn't completely obliterated Unix by then,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
270 or that software patents haven't stopped software development by anybody
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
271 smaller than a company with a million-dollar-a-year legal budget. Which
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
272 is actually what I think is likely to happen, but that's another
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
273 story@dots{})
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
274
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
275 @cindex Weber, Olaf
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
276 [Olaf writes.] At the end of 1997, UNIX is still alive and kicking,
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
277 individuals still develop software, and Web2c development still
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
278 continues. Karl had been looking for some time for someone to take up
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
279 part of the burden, and I volunteered.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
280
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
281
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
282 @include install.texi
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
283 @include hier.texi
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
284 @include unixtex.texi
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
285 @include bugs.texi
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
286
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
287
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
288 @node Path searching
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
289 @chapter Path searching
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
290
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
291 @cindex path searching
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
292
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
293 This chapter describes the generic path searching mechanism Kpathsea
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
294 provides. For information about searching for particular file types
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
295 (e.g., @TeX{} fonts), see the next chapter.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
296
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
297 @menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
298 * Searching overview:: Basic scheme for searching.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
299 * Path sources:: Where search paths can be defined.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
300 * Path expansion:: Special constructs in search paths.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
301 * Filename database:: Using an externally-built list to search.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
302 * Invoking kpsewhich:: Standalone path lookup.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
303 @end menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
304
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
305
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
306 @node Searching overview
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
307 @section Searching overview
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
308
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
309 @cindex searching overview
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
310 @cindex path searching, overview
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
311 @cindex overview of path searching
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
312
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
313 @cindex search path, defined
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
314 A @dfn{search path} is a colon-separated list of @dfn{path elements},
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
315 which are directory names with a few extra frills. A search path can
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
316 come from (a combination of) many sources; see below. To look up a file
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
317 @samp{foo} along a path @samp{.:/dir}, Kpathsea checks each element of
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
318 the path in turn: first @file{./foo}, then @file{/dir/foo}, returning
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
319 the first match (or possibly all matches).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
320
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
321 @cindex magic characters
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
322 @kindex : @r{may not be :}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
323 @kindex / @r{may not be /}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
324 The ``colon'' and ``slash'' mentioned here aren't necessarily @samp{:}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
325 and @samp{/} on non-Unix systems. Kpathsea tries to adapt to other
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
326 operating systems' conventions.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
327
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
328 @cindex database search
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
329 @cindex searching the database
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
330 To check a particular path element @var{e}, Kpathsea first sees if a
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
331 prebuilt database (@pxref{Filename database}) applies to @var{e}, i.e.,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
332 if the database is in a directory that is a prefix of @var{e}. If so,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
333 the path specification is matched against the contents of the database.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
334
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
335 @cindex floating directories
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
336 @cindex filesystem search
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
337 @cindex disk search
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
338 @cindex searching the disk
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
339 If the database does not exist, or does not apply to this path element,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
340 or contains no matches, the filesystem is searched (if this was not
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
341 forbidden by the specification with @samp{!!} and if the file being
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
342 searched for must exist). Kpathsea constructs the list of directories
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
343 that correspond to this path element, and then checks in each for the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
344 file being searched for. (To help speed future lookups of files in the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
345 same directory, the directory in which a file is found is floated to the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
346 top of the directory list.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
347
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
348 @cindex must exist
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
349 @cindex VF files, not found
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
350 @flindex cmr10.vf
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
351 @findex \openin
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
352 The ``file must exist'' condition comes into play with VF files and
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
353 input files read by the @TeX{} @samp{\openin} command. These files may
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
354 not exist (consider @file{cmr10.vf}), and so it would be wrong to search
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
355 the disk for them. Therefore, if you fail to update @file{ls-R} when
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
356 you install a new VF file, it will never be found.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
357
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
358 Each path element is checked in turn: first the database, then the disk.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
359 If a match is found, the search stops and the result is returned. This
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
360 avoids possibly-expensive processing of path specifications that are
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
361 never needed on a particular run. (Unless the search explicitly
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
362 requested all matches.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
363
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
364 @cindex expansion, path element
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
365 Although the simplest and most common path element is a directory name,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
366 Kpathsea supports additional features in search paths: layered default
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
367 values, environment variable names, config file values, users' home
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
368 directories, and recursive subdirectory searching. Thus, we say that
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
369 Kpathsea @dfn{expands} a path element, meaning transforming all the
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
370 magic specifications into the basic directory name or names. This
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
371 process is described in the sections below. It happens in the same
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
372 order as the sections.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
373
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
374 @cindex absolute filenames
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
375 @cindex relative filenames
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
376 @cindex explicitly relative filenames
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
377 @cindex filenames, absolute or explicitly relative
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
378 Exception to all of the above: If the filename being searched for is
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
379 absolute or explicitly relative, i.e., starts with @samp{/} or @samp{./}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
380 or @samp{../}, Kpathsea simply checks if that file exists.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
381
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
382 @cindex permission denied
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
383 @cindex unreadable files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
384 @cindex access warnings
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
385 @cindex warnings, file access
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
386 @flindex lost+found @r{directory}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
387 @vindex TEX_HUSH
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
388 Ordinarily, if Kpathsea tries to access a file or directory that cannot
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
389 be read, it gives a warning. This is so you will be alerted to
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
390 directories or files that accidentally lack read permission (for
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
391 example, a @file{lost+found}). If you prefer not to see these warnings,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
392 include the value @samp{readable} in the @code{TEX_HUSH} environment
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
393 variable or config file value.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
394
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
395 This generic path searching algorithm is implemented in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
396 @file{kpathsea/pathsearch.c}. It is employed by a higher-level
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
397 algorithm when searching for a file of a particular type (@pxref{File
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
398 lookup}, and @ref{Glyph lookup}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
399
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
400
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
401 @node Path sources
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
402 @section Path sources
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
403
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
404 @cindex path sources
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
405 @cindex sources for search paths
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
406
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
407 A search path can come from many sources. In the order in which
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
408 Kpathsea uses them:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
409
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
410 @enumerate
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
411 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
412 @cindex environment variable, source for path
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
413 A user-set environment variable, e.g., @code{TEXINPUTS}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
414 Environment variables with an underscore and the program name appended
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
415 override; for example, @code{TEXINPUTS_latex} overrides @code{TEXINPUTS}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
416 if the program being run is named @samp{latex}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
417
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
418 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
419 A program-specific configuration file, e.g., an @samp{S /a:/b} line in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
420 Dvips' @file{config.ps} (@pxref{Config files,,, dvips, Dvips}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
421
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
422 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
423 @cindex configuration file, source for path
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
424 @cindex Kpathsea config file, source for path
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
425 @flindex texmf.cnf@r{, source for path}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
426 A line in a Kpathsea configuration file @file{texmf.cnf}, e.g.,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
427 @samp{TEXINPUTS=/c:/d} (see below).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
428
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
429 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
430 @cindex compilation value, source for path
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
431 The compile-time default (specified in @file{kpathsea/paths.h}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
432 @end enumerate
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
433
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
434 You can see each of these values for a given search path by using the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
435 debugging options (@pxref{Debugging}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
436
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
437 These sources may be combined via default expansion (@pxref{Default
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
438 expansion}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
439
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
440 @menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
441 * Config files:: Kpathsea's runtime config files (texmf.cnf).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
442 @end menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
443
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
444
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
445 @node Config files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
446 @subsection Config files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
447
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
448 @cindex config files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
449 @flindex texmf.cnf@r{, definition for}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
450
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
451 @cindex runtime configuration files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
452 @vindex TEXMFCNF
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
453 As mentioned above, Kpathsea reads @dfn{runtime configuration files}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
454 named @file{texmf.cnf} for search path and other definitions. The
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
455 search path used to look for these configuration files is named
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
456 @code{TEXMFCNF}, and is constructed in the usual way, as described
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
457 above, except that configuration files cannot be used to define the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
458 path, naturally; also, an @file{ls-R} database is not used to search for
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
459 them.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
460
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
461 Kpathsea reads @emph{all} @file{texmf.cnf} files in the search path, not
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
462 just the first one found; definitions in earlier files override those in
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
463 later files. Thus, if the search path is @samp{.:$TEXMF}, values from
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
464 @file{./texmf.cnf} override those from @file{$TEXMF/texmf.cnf}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
465
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
466 While (or instead of) reading this description, you may find it helpful
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
467 to look at the distributed @file{texmf.cnf}, which uses or at least
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
468 mentions most features. The format of @file{texmf.cnf} files follows:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
469
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
470 @itemize @bullet
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
471 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
472 @cindex comments, in @file{texmf.cnf}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
473 Comments start with @samp{%} and continue to the end of the line.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
474
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
475 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
476 @cindex blank lines, in @file{texmf.cnf}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
477 Blank lines are ignored.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
478
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
479 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
480 @cindex backslash-newline
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
481 @cindex continuation character
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
482 @cindex whitespace, not ignored on continuation lines
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
483 @kindex \@r{, line continuation in @file{texmf.cnf}}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
484 A @samp{\} at the end of a line acts as a continuation character, i.e.,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
485 the next line is appended. Whitespace at the beginning of continuation
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
486 lines is not ignored.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
487
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
488 @item Each remaining line must look like
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
489
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
490 @example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
491 @var{variable} @r{[}. @var{progname}@r{]} @r{[}=@r{]} @var{value}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
492 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
493
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
494 @noindent where the @samp{=} and surrounding whitespace is optional.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
495
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
496 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
497 @cindex identifiers, characters valid in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
498 The @var{variable} name may contain any character other than whitespace,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
499 @samp{=}, or @samp{.}, but sticking to @samp{A-Za-z_} is safest.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
500
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
501 @item If @samp{.@var{progname}} is present, the definition only
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
502 applies if the program that is running is named (i.e., the last
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
503 component of @code{argv[0]} is) @var{progname} or
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
504 @file{@var{progname}.exe}. This allows different flavors of @TeX{} to
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
505 have different search paths, for example.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
506
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
507 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
508 @cindex right-hand side of variable assignments
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
509 @var{value} may contain any characters except @samp{%} and @samp{@@}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
510 (These restrictions are only necessary because of the processing done on
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
511 @file{texmf.cnf} at build time, so you can stick those characters in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
512 after installation if you have to.) The @samp{$@var{var}.@var{prog}}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
513 feature is not available on the right-hand side; instead, you must use
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
514 an additional variable (see below for example). A @samp{;} in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
515 @var{value} is translated to @samp{:} if running under Unix; this is
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
516 useful to write a single @file{texmf.cnf} which can be used under both
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
517 Unix and NT. (If you really want @samp{;}'s in your filenames, add
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
518 @samp{-DALLOW_SEMICOLON_IN_FILENAMES} to @code{CFLAGS}.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
519
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
520 @item All definitions are read before anything is expanded, so you can
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
521 use variables before they are defined (like Make, unlike most other
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
522 programs).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
523 @end itemize
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
524
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
525 @noindent Here is a configuration file fragment illustrating most of
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
526 these points:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
527
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
528 @example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
529 % TeX input files -- i.e., anything to be found by \input or \openin ...
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
530 latex209_inputs = .:$TEXMF/tex/latex209//:$TEXMF/tex//
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
531 latex2e_inputs = .:$TEXMF/tex/latex//:$TEXMF/tex//
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
532 TEXINPUTS = .:$TEXMF/tex//
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
533 TEXINPUTS.latex209 = $latex209_inputs
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
534 TEXINPUTS.latex2e = $latex2e_inputs
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
535 TEXINPUTS.latex = $latex2e_inputs
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
536 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
537
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
538 @cindex shell scripts as configuration files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
539 @cindex configuration files as shell scripts.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
540 Although this format has obvious similarities to Bourne shell
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
541 scripts---change the comment character to @code{#}, disallow spaces
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
542 around the @code{=}, and get rid of the @code{.@var{name}} convention,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
543 and it could be run through the shell. But there seemed little
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
544 advantage to doing this, since all the information would have to passed
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
545 back to Kpathsea and parsed there anyway, since the @code{sh} process
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
546 couldn't affect its parent's environment.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
547
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
548 @flindex cnf.c
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
549 The implementation of all this is in @file{kpathsea/cnf.c}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
550
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
551
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
552 @node Path expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
553 @section Path expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
554
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
555 @cindex path expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
556 @cindex expansion, search path
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
557
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
558 Kpathsea recognizes certain special characters and constructions in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
559 search paths, similar to that in shells. As a general example:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
560 @samp{~$USER/@{foo,bar@}//baz} expands to all subdirectories under
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
561 directories @file{foo} and @file{bar} in @t{$USER}'s home directory that
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
562 contain a directory or file @file{baz}. These expansions are explained
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
563 in the sections below.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
564
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
565 @menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
566 * Default expansion:: a: or :a or a::b expands to a default.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
567 * Variable expansion:: $foo and $@{foo@} expand to environment values.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
568 * Tilde expansion:: ~ and ~user expand to home directories.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
569 * Brace expansion:: a@{foo,bar@}b expands to afoob abarb.
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
570 * KPSE_DOT expansion:: . is replaced with $KPSE_DOT if it is defined.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
571 * Subdirectory expansion:: a// and a//b recursively expand to subdirs.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
572 @end menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
573
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
574
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
575 @node Default expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
576 @subsection Default expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
577
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
578 @kindex :: @r{expansion}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
579 @cindex doubled colons
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
580 @cindex leading colons
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
581 @cindex trailing colons
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
582 @cindex extra colons
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
583 @cindex default expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
584 @cindex expansion, default
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
585
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
586 If the highest-priority search path (@pxref{Path sources}) contains an
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
587 @dfn{extra colon} (i.e., leading, trailing, or doubled), Kpathsea
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
588 inserts at that point the next-highest-priority search path that is
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
589 defined. If that inserted path has an extra colon, the same happens
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
590 with the next-highest. (An extra colon in the compile-time default
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
591 value has unpredictable results, so installers beware.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
592
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
593 For example, given an environment variable setting
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
594
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
595 @example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
596 setenv TEXINPUTS /home/karl:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
597 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
598
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
599 @noindent and a @code{TEXINPUTS} value from @file{texmf.cnf} of
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
600
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
601 @example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
602 .:$TEXMF//tex
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
603 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
604
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
605 @noindent then the final value used for searching will be:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
606
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
607 @example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
608 /home/karl:.:$TEXMF//tex
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
609 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
610
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
611 Since Kpathsea looks for multiple configuration files, it would be
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
612 natural to expect that (for example) an extra colon in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
613 @file{./texmf.cnf} would expand to the path in @file{$TEXMF/texmf.cnf}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
614 Or, with Dvips' configuration files, that an extra colon in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
615 @file{config.$PRINTER} would expand to the path in @file{config.ps}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
616 This doesn't happen. It's not clear this would be desirable in all
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
617 cases, and trying to devise a way to specify the path to which the extra
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
618 colon should expand seemed truly baroque.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
619 @cindex Bach, Johann Sebastian
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
620
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
621 Technicality: Since it would be useless to insert the default value in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
622 more than one place, Kpathsea changes only one extra @samp{:} and leaves
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
623 any others in place (they will eventually be ignored). Kpathsea checks
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
624 first for a leading @samp{:}, then a trailing @samp{:}, then a doubled
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
625 @samp{:}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
626
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
627 @flindex kdefault.c
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
628 You can trace this by debugging ``paths'' (@pxref{Debugging}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
629 Default expansion is implemented in the source file
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
630 @file{kpathsea/kdefault.c}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
631
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
632
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
633 @node Variable expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
634 @subsection Variable expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
635
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
636 @kindex $ @r{expansion}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
637 @cindex environment variables in paths
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
638 @cindex variable expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
639 @cindex expansion, variable
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
640 @flindex texmf.cnf@r{, and variable expansion}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
641
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
642 @samp{$foo} or @samp{$@{foo@}} in a path element is replaced by (1) the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
643 value of an environment variable @samp{foo} (if defined); (2) the value
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
644 of @samp{foo} from @file{texmf.cnf} (if defined); (3) the empty string.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
645
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
646 If the character after the @samp{$} is alphanumeric or @samp{_}, the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
647 variable name consists of all consecutive such characters. If the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
648 character after the @samp{$} is a @samp{@{}, the variable name consists
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
649 of everything up to the next @samp{@}} (braces may not be nested around
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
650 variable names). Otherwise, Kpathsea gives a warning and ignores the
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
651 @samp{$} and its following character.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
652
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
653 @cindex quoting variable values
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
654 @cindex shell variables
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
655 You must quote the @t{$}'s and braces as necessary for your shell.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
656 @emph{Shell} variable values cannot be seen by Kpathsea, i.e., ones
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
657 defined by @code{set} in C shells and without @code{export} in Bourne
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
658 shells.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
659
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
660 For example, given
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
661 @example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
662 setenv tex /home/texmf
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
663 setenv TEXINPUTS .:$tex:$@{tex@}prev
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
664 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
665 @noindent the final @code{TEXINPUTS} path is the three directories:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
666 @example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
667 .:/home/texmf:/home/texmfprev
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
668 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
669
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
670 The @samp{.@var{progname}} suffix on variables and
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
671 @samp{_@var{progname}} on environment variable names are not implemented
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
672 for general variable expansions. These are only recognized when search
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
673 paths are initialized (@pxref{Path sources}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
674
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
675 @flindex variable.c
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
676 Variable expansion is implemented in the source file
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
677 @file{kpathsea/variable.c}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
678
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
679
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
680 @node Tilde expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
681 @subsection Tilde expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
682
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
683 @kindex ~ @r{expansion}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
684 @cindex home directories in paths
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
685 @cindex tilde expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
686 @cindex expansion, tilde
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
687
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
688 @vindex HOME@r{, as ~ expansion}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
689 A leading @samp{~} in a path element is replaced by the value of the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
690 environment variable @code{HOME}, or @file{.} if @code{HOME} is not set.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
691
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
692 A leading @samp{~@var{user}} in a path element is replaced by
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
693 @var{user}'s home directory from the system @file{passwd} database.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
694
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
695 For example,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
696 @example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
697 setenv TEXINPUTS ~/mymacros:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
698 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
699
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
700 @noindent will prepend a directory @file{mymacros} in your home
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
701 directory to the default path.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
702
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
703 @cindex @t{root} user
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
704 @cindex trailing @samp{/} in home directory
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
705 @kindex /@r{, trailing in home directory}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
706 As a special case, if a home directory ends in @samp{/}, the trailing
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
707 slash is dropped, to avoid inadvertently creating a @samp{//} construct
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
708 in the path. For example, if the home directory of the user @samp{root}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
709 is @samp{/}, the path element @samp{~root/mymacros} expands to just
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
710 @samp{/mymacros}, not @samp{//mymacros}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
711
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
712 @flindex tilde.c
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
713 Tilde expansion is implemented in the source file @file{kpathsea/tilde.c}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
714
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
715
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
716 @node Brace expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
717 @subsection Brace expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
718
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
719 @kindex @{ @r{expansion}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
720 @cindex brace expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
721
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
722 @samp{x@{@var{a}:@var{b}@}y} expands to @samp{x@var{a}y:x@var{b}y}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
723 For example:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
724
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
725 @example
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
726 foo/@{1:2@}/baz
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
727 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
728
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
729 @noindent expands to @samp{foo/1/baz:foo/2/baz}. @samp{:} is the path
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
730 separator on the current system; e.g., on a DOS system, it's @samp{;}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
731
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
732 Braces can be nested; for example, @samp{x@{A:B@{1:2@}@}y} expands to
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
733 @samp{xAy:xB1y:xB2y}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
734
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
735 Multiple non-nested braces are expanded from right to left; for example,
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
736 @samp{x@{A:B@}@{1:2@}y} expands to @samp{x@{A:B@}1y:x@{A:B@}2y}, which
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
737 expands to @samp{xA1y:xB1y:xA2y:xB2:y}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
738
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
739 @cindex multiple @TeX{} hierarchies
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
740 This feature can be used to implement multiple @TeX{} hierarchies, by
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
741 assigning a brace list to @code{$TEXMF}, as mentioned in
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
742 @file{texmf.in}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
743
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
744 In old versions of the library you had to use a comma. While this usage
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
745 is deprecated, it is still supported for backwards compatibility with
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
746 old configurations. The last example could have been written
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
747 @samp{x@{A,B@}@{1,2@}y}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
748
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
749 @flindex expand.c
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
750 Brace expansion is implemented in the source file
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
751 @file{kpathsea/expand.c}. It is a modification of the Bash sources, and
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
752 is thus covered by the GNU General Public License, rather than the
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
753 Library General Public License that covers the rest of Kpathsea.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
754
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
755
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
756 @node KPSE_DOT expansion
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
757 @subsection @code{KPSE_DOT} expansion
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
758
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
759 @kindex KPSE_DOT @r{expansion}
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
760
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
761 When @code{KPSE_DOT} is defined in the environment, it names a directory
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
762 that should be considered the current directory for the purpose of
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
763 looking up files in the search paths. This feature is needed by the
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
764 @samp{mktex@dots{}} scripts @ref{mktex scripts}, because these
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
765 change the working directory. You should not ever define it yourself.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
766
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
767
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
768 @node Subdirectory expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
769 @subsection Subdirectory expansion
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
770
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
771 @kindex //
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
772 @cindex subdirectory searching
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
773 @cindex expansion, subdirectory
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
774
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
775 @cindex alphabetical order, not
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
776 Two or more consecutive slashes in a path element following a directory
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
777 @var{d} is replaced by all subdirectories of @var{d}: first those
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
778 subdirectories directly under @var{d}, then the subsubdirectories under
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
779 those, and so on. At each level, the order in which the directories are
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
780 searched is unspecified. (It's ``directory order'', and definitely not
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
781 alphabetical.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
782
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
783 If you specify any filename components after the @samp{//}, only
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
784 subdirectories which match those components are included. For example,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
785 @samp{/a//b} would expand into directories @file{/a/1/b}, @file{/a/2/b},
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
786 @file{/a/1/1/b}, and so on, but not @file{/a/b/c} or @file{/a/1}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
787
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
788 You can include multiple @samp{//} constructs in the path.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
789
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
790 @samp{//} at the beginning of a path is ignored; you didn't really want
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
791 to search every directory on the system, did you?
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
792
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
793 @cindex trick for detecting leaf directories
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
794 @cindex leaf directory trick
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
795 @cindex Farwell, Matthew
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
796 @cindex MacKenzie, David
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
797 I should mention one related implementation trick, which I took from GNU
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
798 find. Matthew Farwell suggested it, and David MacKenzie implemented it.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
799
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
800 @vindex st_nlink
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
801 The trick is that in every real Unix implementation (as opposed to the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
802 POSIX specification), a directory which contains no subdirectories will
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
803 have exactly two links (namely, one for @file{.} and one for @file{..}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
804 That is to say, the @code{st_nlink} field in the @samp{stat} structure
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
805 will be two. Thus, we don't have to stat everything in the bottom-level
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
806 (leaf) directories---we can just check @code{st_nlink}, notice it's two,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
807 and do no more work.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
808
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
809 But if you have a directory that contains a single subdirectory and 500
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
810 regular files, @code{st_nlink} will be 3, and Kpathsea has to stat every
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
811 one of those 501 entries. Therein lies slowness.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
812
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
813 @vindex UNIX_ST_LINK
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
814 You can disable the trick by undefining @code{UNIX_ST_LINK} in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
815 @file{kpathsea/config.h}. (It is undefined by default except under Unix.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
816
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
817 @flindex elt-dirs.c
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
818 Unfortunately, in some cases files in leaf directories are
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
819 @code{stat}'d: if the path specification is, say,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
820 @samp{$TEXMF/fonts//pk//}, then files in a subdirectory
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
821 @samp{@dots{}/pk}, even if it is a leaf, are checked. The reason cannot
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
822 be explained without reference to the implementation, so read
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
823 @file{kpathsea/elt-dirs.c} (search for @samp{may descend}) if you are
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
824 curious. And if you can find a way to @emph{solve} the problem, please
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
825 let me know.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
826
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
827 @flindex elt-dirs.c
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
828 Subdirectory expansion is implemented in the source file
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
829 @file{kpathsea/elt-dirs.c}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
830
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
831
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
832 @node Filename database
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
833 @section Filename database (@code{ls-R})
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
834
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
835 @cindex filename database
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
836 @cindex database, for filenames
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
837 @cindex externally-built filename database
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
838
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
839 Kpathsea goes to some lengths to minimize disk accesses for searches
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
840 (@pxref{Subdirectory expansion}). Nevertheless, at installations with
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
841 enough directories, searching each possible directory for a given file
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
842 can take an excessively long time (depending on the speed of the disk,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
843 whether it's NFS-mounted, how patient you are, etc.).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
844
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
845 In practice, a font tree containing the standard PostScript and PCL
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
846 fonts is large enough for searching to be noticeably slow on typical
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
847 systems these days. Therefore, Kpathsea can use an externally-built
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
848 ``database'' file named @file{ls-R} that maps files to directories, thus
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
849 avoiding the need to exhaustively search the disk.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
850
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
851 A second database file @file{aliases} allows you to give additional
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
852 names to the files listed in @file{ls-R}. This can be helpful to adapt
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
853 to ``8.3'' filename conventions in source files.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
854
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
855 The @file{ls-R} and @file{aliases} features are implemented in the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
856 source file @file{kpathsea/db.c}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
857
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
858 @menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
859 * ls-R:: The main filename database.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
860 * Filename aliases:: Aliases for those names.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
861 * Database format:: Syntax details of the database file.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
862 @end menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
863
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
864
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
865 @node ls-R
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
866 @subsection @file{ls-R}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
867
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
868 @flindex ls-R @r{database file}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
869 @vindex TEXMFDBS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
870
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
871 As mentioned above, you must name the main filename database
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
872 @file{ls-R}. You can put one at the root of each @TeX{} installation
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
873 hierarchy you wish to search (@code{$TEXMF} by default); most sites have
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
874 only one hierarchy. Kpathsea looks for @file{ls-R} files along the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
875 @code{TEXMFDBS} path, so that should presumably match the list of
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
876 hierarchies.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
877
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
878 The recommended way to create and maintain @samp{ls-R} is to run the
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
879 @code{mktexlsr} script, which is installed in @samp{$(bindir)}
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
880 (@file{/usr/local/bin} by default). That script goes to some trouble to
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
881 follow symbolic links as necessary, etc. It's also invoked by the
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
882 distributed @samp{mktex@dots{}} scripts.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
883
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
884 @flindex ls-R@r{, simplest build}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
885 At its simplest, though, you can build @file{ls-R} with the command
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
886 @example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
887 cd @var{/your/texmf/root} && ls -LAR ./ >ls-R
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
888 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
889
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
890 @noindent
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
891 @opindex --color=tty
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
892 @flindex /etc/profile @r{and aliases}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
893 presuming your @code{ls} produces the right output format (see the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
894 section below). GNU @code{ls}, for example, outputs in this format.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
895 Also presuming your @code{ls} hasn't been aliased in a system file
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
896 (e.g., @file{/etc/profile}) to something problematic, e.g., @samp{ls
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
897 --color=tty}. In that case, you will have to disable the alias before
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
898 generating @file{ls-R}. For the precise definition of the file format,
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
899 see @ref{Database format}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
900
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
901 Regardless of whether you use the supplied script or your own, you will
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
902 almost certainly want to invoke it via @code{cron}, so when you make
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
903 changes in the installed files (say if you install a new La@TeX{}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
904 package), @file{ls-R} will be automatically updated.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
905
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
906 @opindex -A @r{option to @code{ls}}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
907 @cindex dot files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
908 @flindex . @r{files}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
909 @flindex . @r{directories, ignored}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
910 @flindex .tex @r{file, included in @file{ls-R}}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
911 The @samp{-A} option to @code{ls} includes files beginning with @samp{.}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
912 (except for @file{.} and @file{..}), such as the file @file{.tex}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
913 included with the La@TeX{} tools package. (On the other hand,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
914 @emph{directories} whose names begin with @samp{.} are always ignored.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
915
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
916 @cindex symbolic links, and @file{ls-R}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
917 @opindex -L @r{option to @code{ls}}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
918 If your system does not support symbolic links, omit the @samp{-L}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
919
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
920 @cindex automounter, and @file{ls-R}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
921 @cindex NFS and @file{ls-R}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
922 @code{ls -LAR @var{/your/texmf/root}} will also work. But using
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
923 @samp{./} avoids embedding absolute pathnames, so the hierarchy can be
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
924 easily transported. It also avoids possible trouble with automounters
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
925 or other network filesystem conventions.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
926
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
927 @cindex warning about unusable @file{ls-R}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
928 @cindex unusable @file{ls-R} warning
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
929 Kpathsea warns you if it finds an @file{ls-R} file, but the file does
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
930 not contain any usable entries. The usual culprit is running plain
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
931 @samp{ls -R} instead of @samp{ls -LR ./} or @samp{ls -R
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
932 @var{/your/texmf/root}}. Another possibility is some system directory
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
933 name starting with a @samp{.} (perhaps if you are using AFS); Kpathsea
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
934 ignores everything under such directories.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
935
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
936 @kindex !! @r{in path specifications}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
937 @cindex disk searching, avoiding
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
938 Because the database may be out-of-date for a particular run, if a file
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
939 is not found in the database, by default Kpathsea goes ahead and
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
940 searches the disk. If a particular path element begins with @samp{!!},
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
941 however, @emph{only} the database will be searched for that element,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
942 never the disk. If the database does not exist, nothing will be
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
943 searched. Because this can surprise users (``I see the font
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
944 @file{foo.tfm} when I do an @code{ls}; why can't Dvips find it?''), it
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
945 is not in any of the default search paths.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
946
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
947
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
948 @node Filename aliases
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
949 @subsection Filename aliases
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
950
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
951 @cindex filename aliases
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
952 @cindex aliases, for filenames
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
953
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
954 In some circumstances, you may wish to find a file under several names.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
955 For example, suppose a @TeX{} document was created using a DOS system
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
956 and tries to read @file{longtabl.sty}. But now it's being run on a Unix
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
957 system, and the file has its original name, @file{longtable.sty}. The
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
958 file won't be found. You need to give the actual file
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
959 @file{longtable.sty} an alias @samp{longtabl.sty}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
960
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
961 @c As another example, suppose you are creating a @TeX{} distribution on a
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
962 @c CD-ROM or a DOS system; then the file @file{mf.base} gets stored as
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
963 @c @file{mf.bas}. But Metafont on Unix wants to find @file{mf.base}. Here
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
964 @c you need to give the actual file @file{mf.bas} an alias @samp{mf.base}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
965
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
966 You can handle this by creating a file @file{aliases} as a companion to
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
967 the @file{ls-R} for the hierarchy containing the file in question. (You
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
968 must have an @file{ls-R} for the alias feature to work.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
969
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
970 The format of @file{aliases} is simple: two whitespace-separated words
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
971 per line; the first is the real name @file{longtable.sty}, and second is
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
972 the alias (@file{longtabl.sty}). These must be base filenames, with no
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
973 directory components. @file{longtable.sty} must be in the sibling
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
974 @file{ls-R}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
975
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
976 Also, blank lines and lines starting with @samp{%} or @samp{#} are
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
977 ignored in @file{aliases}, to allow for comments.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
978
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
979 If a real file @file{longtabl.sty} exists, it is used regardless of any
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
980 aliases.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
981
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
982
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
983 @node Database format
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
984 @subsection Database format
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
985
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
986 @cindex format of external database
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
987 @cindex database, format of
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
988
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
989 The ``database'' read by Kpathsea is a line-oriented file of plain
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
990 text. The format is that generated by GNU (and most other) @code{ls}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
991 programs given the @samp{-R} option, as follows.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
992
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
993 @itemize @bullet
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
994 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
995 Blank lines are ignored.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
996
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
997 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
998 If a line begins with @samp{/} or @samp{./} or @samp{../} and ends with
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
999 a colon, it's the name of a directory. (@samp{../} lines aren't useful,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1000 however, and should not be generated.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1001
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1002 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1003 All other lines define entries in the most recently seen directory.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1004 @t{/}'s in such lines will produce possibly-strange results.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1005
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1006 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1007 Files with no preceding directory line are ignored.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1008 @end itemize
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1009
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1010 For example, here's the first few lines of @file{ls-R} (which totals
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1011 about 30K bytes) on my system:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1012
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1013 @example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1014 bibtex
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1015 dvips
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1016 fonts
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1017 ls-R
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1018 metafont
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1019 metapost
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1020 tex
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1021 web2c
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1022
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1023 ./bibtex:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1024 bib
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1025 bst
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1026 doc
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1027
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1028 ./bibtex/bib:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1029 asi.bib
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1030 btxdoc.bib
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1031 @dots{}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1032 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1033
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1034
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1035 @node Invoking kpsewhich
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1036 @section @code{kpsewhich}: Standalone path searching
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1037
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1038 @pindex kpsewhich
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1039 @cindex path searching, standalone
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1040 @cindex standalone path searching
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1041
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1042 The Kpsewhich program exercises the path searching functionality
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1043 independent of any particular application. This can also be useful as a
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1044 sort of @code{find} program to locate files in your @TeX{} hierarchies,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1045 perhaps in administrative scripts. It is used heavily in the
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1046 distributed @samp{mktex@dots{}} scripts.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1047
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1048 Synopsis:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1049 @example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1050 kpsewhich @var{option}@dots{} @var{filename}@dots{}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1051 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1052
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1053 The options and filename(s) to look up can be intermixed.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1054 Options can start with either @samp{-} or @samp{--}, and any unambiguous
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1055 abbreviation is accepted.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1056
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1057 @menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1058 * Path searching options:: Changing the mode, resolution, etc.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1059 * Auxiliary tasks:: Path and variable expansion.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1060 * Standard options:: --help and --version.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1061 @end menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1062
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1063
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1064 @node Path searching options
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1065 @subsection Path searching options
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1066
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1067 @cindex path searching options
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1068
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1069 Kpsewhich looks up each non-option argument on the command line as a
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1070 filename, and returns the first file found. There is no option to
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1071 return all the files with a particular name (you can run the Unix
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1072 @samp{find} utility for that, @pxref{Invoking find,,, findutils, GNU
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1073 find utilities}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1074
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1075 Various options alter the path searching behavior:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1076
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1077 @table @samp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1078 @item --dpi=@var{num}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1079 @opindex --dpi=@var{num}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1080 @opindex -D @var{num}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1081 @cindex resolution, setting
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1082 Set the resolution to @var{num}; this only affects @samp{gf} and
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1083 @samp{pk} lookups. @samp{-D} is a synonym, for compatibility with
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1084 Dvips. Default is 600.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1085
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1086 @item --format=@var{name}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1087 @opindex --format=@var{name}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1088 Set the format for lookup to @var{name}. By default, the format is
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1089 guessed from the filename, with @samp{tex} being used if nothing else
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1090 fits. The recognized filename extensions (including any leading
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1091 @samp{.}) are also allowable @var{name}s.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1092
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1093 All formats also have a name, which is the only way to specify formats
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1094 with no associated suffix. For example, for Dvips configuration files
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1095 you can use @samp{--format="dvips config"}. (The quotes are for the
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1096 sake of the shell.)
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1097
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1098 Here's the current list of recognized names and the associated suffixes.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1099 @xref{Supported file formats}, for more information on each of these.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1100 @example
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1101 gf: gf
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1102 pk: pk
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1103 bitmap font
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1104 afm: .afm
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1105 base: .base
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1106 bib: .bib
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1107 bst: .bst
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1108 cnf: .cnf
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1109 ls-R: ls-R
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1110 fmt: .fmt
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1111 map: .map
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1112 mem: .mem
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1113 mf: .mf
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1114 mfpool: .pool
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1115 mft: .mft
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1116 mp: .mp
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1117 mppool: .pool
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1118 MetaPost support
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1119 ocp: .ocp
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1120 ofm: .ofm .tfm
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1121 opl: .opl
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1122 otp: .otp
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1123 ovf: .ovf
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1124 ovp: .ovp
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1125 graphic/figure: .eps .epsi
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1126 tex: .tex
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1127 TeX system documentation
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1128 texpool: .pool
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1129 TeX system sources
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1130 PostScript header/font: .pro
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1131 Troff fonts
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1132 tfm: .tfm
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1133 type1 fonts: .pfa .pfb
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1134 vf: .vf
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1135 dvips config
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1136 ist: .ist
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1137 truetype fonts: .ttf .ttc
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1138 type42 fonts
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1139 web2c files
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1140 other text files
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1141 other binary files
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1142 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1143
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1144 This option and @samp{--path} are mutually exclusive.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1145
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1146 @item --interactive
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1147 @opindex --interactive
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1148 @cindex interactive query
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1149 After processing the command line, read additional filenames to look up
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1150 from standard input.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1151
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1152 @item -mktex=@var{filetype}
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1153 @itemx -no-mktex=@var{filetype}
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1154 @opindex -mktex=@var{filetype}
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1155 @opindex -no-mktex=@var{filetype}
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1156 Turn on or off the @samp{mktex} script associated with @var{filetype}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1157 The only values that make sense for @var{filetype} are @samp{pk},
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1158 @samp{mf}, @samp{tex}, and @samp{tfm}. By default, all are off in
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1159 Kpsewhich. @xref{mktex scripts}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1160
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1161 @item --mode=@var{string}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1162 @opindex --mode=@var{string}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1163 Set the mode name to @var{string}; this also only affects @samp{gf} and
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1164 @samp{pk} lookups. No default: any mode will be found. @xref{mktex
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1165 script arguments}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1166
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1167 @item --must-exist
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1168 @opindex --must-exist
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1169 Do everything possible to find the files, notably including searching
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1170 the disk. By default, only the @file{ls-R} database is checked, in the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1171 interest of efficiency.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1172
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1173 @item --path=@var{string}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1174 @opindex --path=@var{string}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1175 Search along the path @var{string} (colon-separated as usual), instead
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1176 of guessing the search path from the filename. @samp{//} and all the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1177 usual expansions are supported (@pxref{Path expansion}). This option
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1178 and @samp{--format} are mutually exclusive. To output the complete
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1179 directory expansion of a path, instead of doing a one-shot lookup, see
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1180 @samp{--expand-path} in the following section.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1181
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1182 @item --progname=@var{name}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1183 @opindex --progname=@var{name}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1184 Set the program name to @var{name}; default is @samp{kpsewhich}. This
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1185 can affect the search paths via the @samp{.@var{prognam}} feature in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1186 configuration files (@pxref{Config files}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1187 @end table
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1188
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1189
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1190 @node Auxiliary tasks
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1191 @subsection Auxiliary tasks
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1192
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1193 @cindex auxiliary tasks
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1194
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1195 Kpsewhich provides some additional features not strictly related to path
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1196 lookup:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1197
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1198 @itemize @bullet
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1199 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1200 @opindex --debug=@var{num}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1201 @samp{--debug=@var{num}} sets the debugging options to @var{num}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1202 @xref{Debugging}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1203
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1204 @item
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1205 @opindex --expand-braces=@var{string}
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1206 @samp{--expand-braces=@var{string}} outputs the variable and brace
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1207 expansion of @var{string}. @xref{Path expansion}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1208
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1209 @item
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1210 @opindex --expand-var=@var{string}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1211 @samp{--expand-var=@var{string}} outputs the variable expansion of
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1212 @var{string}. For example, the @samp{mktex@dots{}} scripts run
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1213 @samp{kpsewhich --expand-var='$TEXMF'} to find the root of the @TeX{} system
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1214 hierarchy. @xref{Path expansion}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1215
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1216 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1217 @opindex --expand-path=@var{string}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1218 @samp{--expand-path=@var{string}} outputs the complete expansion of
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1219 @var{string} as a colon-separated path. This is useful to construct a
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1220 search path for a program that doesn't accept recursive subdirectory
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1221 specifications.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1222
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1223 For one-shot uses of an arbitrary (not built in to Kpathsea) path, see
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1224 @samp{--path} in the previous section.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1225
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1226 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1227 @opindex --show-path=@var{name}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1228 @samp{--show-path=@var{name}} shows the path that would be used for file
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1229 lookups of file type @var{name}. Either a filename extension
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1230 (@samp{pk}, @samp{.vf}, etc.) or an integer can be used, just as with
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1231 @samp{--format}, described in the previous section.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1232 @end itemize
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1233
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1234
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1235 @node Standard options
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1236 @subsection Standard options
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1237
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1238 @cindex standard options
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1239
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1240 Kpsewhich accepts the standard GNU options:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1241
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1242 @itemize @bullet
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1243 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1244 @opindex --help
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1245 @samp{--help} prints a help message on standard output and exits.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1246
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1247 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1248 @opindex --version
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1249 @samp{--version} prints the Kpathsea version number and exits.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1250 @end itemize
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1251
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1252
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1253 @node TeX support
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1254 @chapter @TeX{} support
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1255
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1256 @cindex @TeX{} support
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1257
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1258 Although the basic features in Kpathsea can be used for any type of path
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1259 searching, it came about (like all libraries) with a specific
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1260 application in mind: I wrote Kpathsea specifically for @TeX{} system
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1261 programs. I had been struggling with the programs I was using (Dvips,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1262 Xdvi, and @TeX{} itself) having slightly different notions of how to
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1263 specify paths; and debugging was painful, since no code was shared.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1264
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1265 Therefore, Kpathsea provides some @TeX{}-specific formats and features.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1266 Indeed, many of the supposedly generic path searching features were
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1267 provided because they seemed useful in that con@TeX{}t (font lookup,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1268 particularly).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1269
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1270 Kpathsea provides a standard way to search for files of any of the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1271 supported file types; glyph fonts are a bit different than all the rest.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1272 Searches are based solely on filenames, not file contents---if a GF
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1273 file is named @file{cmr10.600pk}, it will be found as a PK file.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1274
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1275 @menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1276 * Supported file formats:: File types Kpathsea knows about.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1277 * File lookup:: Searching for most kinds of files.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1278 * Glyph lookup:: Searching for bitmap fonts.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1279 * Suppressing warnings:: Avoiding warnings via TEX_HUSH.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1280 @end menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1281
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1282
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1283 @node Supported file formats
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1284 @section Supported file formats
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1285
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1286 @cindex supported file formats
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1287 @cindex file formats, supported
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1288
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1289 @cindex environment variables for @TeX{}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1290 @cindex @TeX{} environment variables
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1291
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1292 Kpathsea has support for a number of file types. Each file type has a
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1293 list of environment and config file variables that are checked to define
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1294 the search path, and most have a default suffix that plays a role in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1295 finding files (see the next section). Some also define additional
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1296 suffixes, and/or a program to be run to create missing files on the fly.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1297
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1298 @cindex program-varying paths
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1299 Since environment variables containing periods, such as
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1300 @samp{TEXINPUTS.latex}, are not allowed on some systems, Kpathsea looks
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1301 for environment variables with an underscore, e.g.,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1302 @samp{TEXINPUTS_latex} (@pxref{Config files}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1303
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1304 The following table lists the above information.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1305
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1306 @table @samp
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1307 @item afm
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1308 @flindex .afm
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1309 @vindex AFMFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1310 (Adobe font metrics, @pxref{Metric files,,, dvips, Dvips})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1311 @code{AFMFONTS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1312 suffix @samp{.afm}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1313
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1314 @item base
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1315 @flindex .base
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1316 @vindex MFBASES
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1317 @vindex TEXMFINI
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1318 (Metafont memory dump, @pxref{Memory dumps,,, web2c, Web2c})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1319 @code{MFBASES}, @code{TEXMFINI};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1320 suffix @samp{.base}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1321
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1322 @item bib
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1323 @flindex .bib
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1324 @vindex BIBINPUTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1325 @vindex TEXBIB
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1326 (Bib@TeX{} bibliography source, @pxref{bibtex invocation,,, web2c, Web2c})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1327 @code{BIBINPUTS}, @code{TEXBIB};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1328 suffix @samp{.bib}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1329
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1330 @item bst
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1331 @flindex .bst
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1332 @vindex BSTINPUTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1333 (Bib@TeX{} style file, @pxref{Basic BibTeX style files,, Basic Bib@TeX{}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1334 style files, web2c, Web2c})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1335 @code{BSTINPUTS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1336 suffix @samp{.bst}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1337
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1338 @item cnf
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1339 @flindex .cnf
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1340 @vindex TEXMFCNF
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1341 (Runtime configuration files, @pxref{Config files})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1342 @code{TEXMFCNF};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1343 suffix @samp{.cnf}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1344
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1345 @item dvips config
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1346 @vindex TEXCONFIG
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1347 @flindex config.ps@r{, search path for}
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1348 (Dvips @samp{config.*} files, such as @file{config.ps}, @pxref{Config
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1349 files,,, dvips, Dvips})
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1350 @code{TEXCONFIG}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1351
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1352 @item fmt
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1353 @flindex .fmt
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1354 @vindex TEXFORMATS
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1355 @vindex TEXMFINI
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1356 (@TeX{} memory dump, @pxref{Memory dumps,,, web2c, Web2c})
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1357 @code{TEXFORMATS}, @code{TEXMFINI};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1358 suffix @samp{.fmt}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1359
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1360 @item gf
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1361 @flindex gf
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1362 @vindex GFFONTS
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1363 @vindex GLYPHFONTS
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1364 @vindex TEXFONTS
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1365 (generic font bitmap, @pxref{Glyph files,,, dvips, Dvips})
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1366 @code{@var{program}FONTS}, @code{GFFONTS}, @code{GLYPHFONTS}, @code{TEXFONTS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1367 suffix @samp{gf}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1368
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1369 @item graphic/figure
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1370 @flindex .eps
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1371 @flindex .epsi
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1372 @vindex TEXPICTS
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1373 @vindex TEXINPUTS
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1374 (Encapsulated PostScript figures, @pxref{PostScript figures,,, dvips, Dvips})
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1375 @code{TEXPICTS}, @code{TEXINPUTS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1376 additional suffixes: @samp{.eps}, @samp{.epsi}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1377
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1378 @item ist
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1379 @flindex .ist
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1380 @vindex TEXINDEXSTYLE
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1381 @vindex INDEXSTYLE
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1382 (makeindex style files)
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1383 @code{TEXINDEXSTYLE}, @code{INDEXSTYLE};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1384 suffix @samp{.ist}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1385
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1386 @item ls-R
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1387 @flindex ls-R
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1388 @vindex TEXMFDBS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1389 (Filename databases, @pxref{Filename database})
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1390 @code{TEXMFDBS}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1391
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1392 @item map
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1393 @flindex .map
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1394 @vindex TEXFONTMAPS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1395 (Fontmaps, @pxref{Fontmap})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1396 @code{TEXFONTMAPS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1397 suffix @samp{.map}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1398
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1399 @item mem
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1400 @flindex .mem
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1401 @vindex MPMEMS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1402 @vindex TEXMFINI
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1403 (MetaPost memory dump, @pxref{Memory dumps,,, web2c, Web2c})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1404 @code{MPMEMS}, @code{TEXMFINI};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1405 suffix @samp{.mem}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1406
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1407 @item @r{MetaPost support}
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1408 @vindex MPSUPPORT
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1409 (MetaPost support files, used by DMP; @pxref{dmp invocation,,, web2c, Web2c})
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1410 @code{MPSUPPORT}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1411
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1412 @item mf
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1413 @flindex .mf
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1414 @vindex MFINPUTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1415 (Metafont source, @pxref{mf invocation,,, web2c, Web2c})
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1416 @code{MFINPUTS};
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1417 suffix @samp{.mf};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1418 dynamic creation program: @code{mktexmf}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1419
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1420 @item mfpool
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1421 @flindex .pool
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1422 @vindex MFPOOL
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1423 (Metafont program strings, @pxref{pooltype invocation,,, web2c, Web2c})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1424 @code{MFPOOL}, @code{TEXMFINI};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1425 suffix @samp{.pool}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1426
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1427 @item mft
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1428 @flindex .mft
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1429 @vindex MFTINPUTS
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1430 (@code{MFT} style file, @pxref{mft invocation,,, web2c, Web2c})
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1431 @code{MFTINPUTS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1432 suffix @samp{.mft}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1433
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1434 @item mp
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1435 @flindex .mp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1436 @vindex MPINPUTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1437 (MetaPost source, @pxref{mpost invocation,,, web2c, Web2c})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1438 @code{MPINPUTS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1439 suffix @samp{.mp}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1440
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1441 @item mppool
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1442 @flindex .pool
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1443 @vindex MPPOOL
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1444 (MetaPost program strings, @pxref{pooltype invocation,,, web2c, Web2c})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1445 @code{MPPOOL}, @code{TEXMFINI};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1446 suffix @samp{.pool}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1447
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1448 @item ocp
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1449 @flindex .ocp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1450 @vindex OCPINPUTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1451 (Omega compiled process files)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1452 @code{OCPINPUTS}; @*
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1453 suffix @samp{.ocp};
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1454 dynamic creation program: @code{MakeOmegaOCP}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1455
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1456 @item ofm
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1457 @flindex .ofm
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1458 @vindex OFMFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1459 (Omega font metrics)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1460 @code{OFMFONTS}, @code{TEXFONTS}; @*
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1461 suffixes @samp{.ofm}, @samp{.tfm};
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1462 dynamic creation program: @code{MakeOmegaOFM}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1463
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1464 @item opl
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1465 @flindex .opl
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1466 (Omega property lists)
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1467 @code{OPLFONTS}, @code{TEXFONTS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1468 suffix @samp{.opl}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1469
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1470 @item otp
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1471 @flindex .otp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1472 @vindex OTPINPUTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1473 (Omega translation process files)
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1474 @code{OTPINPUTS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1475 suffix @samp{.otp}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1476
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1477 @item ovf
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1478 @flindex .ovf
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1479 @vindex OVFFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1480 (Omega virtual fonts)
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1481 @code{OVFFONTS}, @code{TEXFONTS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1482 suffix @samp{.ovf}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1483
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1484 @item ovp
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1485 @flindex .ovp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1486 @vindex OVPFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1487 (Omega virtual property lists)
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1488 @code{OVPFONTS}, @code{TEXFONTS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1489 suffix @samp{.ovp}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1490
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1491 @item pk
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1492 @flindex .pk
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1493 @vindex PKFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1494 @vindex TEXPKS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1495 @vindex GLYPHFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1496 @vindex TEXFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1497 (packed bitmap fonts, @pxref{Glyph files,,, dvips, Dvips})
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1498 @code{@var{PROGRAM}FONTS} (@var{program} being @samp{XDVI}, etc.),
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1499 @code{PKFONTS}, @code{TEXPKS}, @code{GLYPHFONTS}, @code{TEXFONTS};
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1500 suffix @samp{pk};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1501 dynamic creation program: @code{mktexpk}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1502
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1503 @item PostScript header
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1504 @flindex .pro
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1505 @vindex TEXPSHEADERS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1506 @vindex PSHEADERS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1507 (downloadable PostScript, @pxref{Header files,,, dvips, Dvips})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1508 @code{TEXPSHEADERS}, @code{PSHEADERS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1509 additional suffix @samp{.pro}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1510
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1511 @item tex
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1512 @flindex .tex
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1513 @vindex TEXINPUTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1514 (@TeX{} source, @pxref{tex invocation,,, web2c, Web2c})
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1515 @code{TEXINPUTS};
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1516 suffix @samp{.tex};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1517 additional suffixes: none, because such a list cannot be complete;
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1518 dynamic creation program: @code{mktextex}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1519
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1520 @item TeX system documentation
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1521 @flindex doc files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1522 @vindex TEXDOCS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1523 (Documentation files for the @TeX{} system)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1524 @code{TEXDOCS}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1525
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1526 @item TeX system sources
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1527 @flindex source files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1528 @vindex TEXSOURCES
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1529 (Source files for the @TeX{} system)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1530 @code{TEXSOURCES}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1531
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1532 @item texpool
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1533 @flindex .pool
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1534 @vindex TEXPOOL
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1535 (@TeX{} program strings, @pxref{pooltype invocation,,, web2c, Web2c})
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1536 @code{TEXPOOL}, @code{TEXMFINI};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1537 suffix @samp{.pool}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1538
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1539 @item tfm
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1540 @flindex .tfm
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1541 @vindex TFMFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1542 @vindex TEXFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1543 (@TeX{} font metrics, @pxref{Metric files,,, dvips, Dvips})
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1544 @code{TFMFONTS}, @code{TEXFONTS};
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1545 suffix @samp{.tfm};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1546 dynamic creation program: @code{mktextfm}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1547
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1548 @item Troff fonts
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1549 @vindex TRFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1550 (Troff fonts, used by DMP; @pxref{DMP invocation,,, web2c, Web2c})
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1551 @code{TRFONTS}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1552
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1553 @item truetype fonts
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1554 @flindex .ttf
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1555 @flindex .ttc
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1556 @vindex TTFONTS
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1557 (TrueType outline fonts) @code{TTFONTS}; suffixes @samp{.ttf},
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1558 @samp{.ttc}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1559
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1560 @item type1 fonts
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1561 @flindex .pfa
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1562 @flindex .pfb
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1563 @vindex T1FONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1564 @vindex T1INPUTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1565 @vindex TEXPSHEADERS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1566 @vindex DVIPSHEADERS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1567 (Type 1 PostScript outline fonts, @pxref{Glyph files,,, dvips, Dvips})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1568 @code{T1FONTS}, @code{T1INPUTS}, @code{TEXPSHEADERS}, @code{DVIPSHEADERS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1569 suffixes @samp{.pfa}, @samp{.pfb}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1570
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1571 @item type42 fonts
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1572 @vindex T42FONTS
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1573 (Type 42 PostScript outline fonts) @code{T42FONTS}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1574
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1575 @item vf
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1576 @flindex .vf
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1577 @vindex VFFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1578 @vindex TEXFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1579 (virtual fonts, @pxref{Virtual fonts,,, dvips, Dvips})
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1580 @code{VFFONTS}, @code{TEXFONTS};
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1581 suffix @samp{.vf}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1582 @end table
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1583
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1584 There are two special cases, because the paths and environment variables
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1585 always depend on the name of the program: the variable name is
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1586 constructed by converting the program name to upper case, and then
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1587 appending @samp{INPUTS}. Assuming the program is called @samp{foo},
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1588 this gives us the following table.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1589
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1590 @table @samp
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1591 @item other text files
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1592 @vindex FOOINPUTS
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1593 (text files used by @samp{foo})
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1594 @code{FOOINPUTS}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1595
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1596 @item other binary files
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1597 @vindex FOOINPUTS
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1598 (binary files used by @samp{foo})
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1599 @code{FOOINPUTS}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1600 @end table
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1601
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1602 If an environment variable by these names are set, the corresponding
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1603 @file{texmf.cnf} definition won't be looked at (unless, as usual, the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1604 environment variable value has an extra @samp{:}). @xref{Default
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1605 expansion}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1606
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1607 For the font variables, the intent is that:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1608 @itemize @bullet
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1609 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1610 @code{TEXFONTS} is the default for everything.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1611
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1612 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1613 @code{GLYPHFONTS} is the default for bitmap (or, more precisely,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1614 non-metric) files.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1615
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1616 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1617 Each font format has a variable of its own.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1618
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1619 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1620 @vindex XDVIFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1621 @vindex DVIPSFONTS
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1622 Each program has its own font override path as well; e.g.,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1623 @code{DVIPSFONTS} for Dvipsk. Again, this is for bitmaps, not metrics.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1624
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1625 @end itemize
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1626
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1627
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1628 @node File lookup
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1629 @section File lookup
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1630
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1631 @cindex file lookup
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1632 @cindex searching for files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1633 @cindex @TeX{} file lookup
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1634
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1635 This section describes how Kpathsea searches for most files (bitmap font
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1636 searches are the exception, as described in the next section).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1637
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1638 Here is the search strategy for a file @var{name}:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1639 @enumerate
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1640 @item
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1641 If the file format defines default suffixes, and the suffix of
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1642 @var{name} name is not already a known suffix for that format, try the
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1643 name with each default appended, and use alternative names found in the
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1644 fontmaps if necessary. We postpone searching the disk as long as
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1645 possible. Example: given @samp{foo.sty}, look for @samp{foo.sty.tex}
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1646 before @samp{foo.sty}. This is unfortunate, but allows us to find
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1647 @samp{foo.bar.tex} before @samp{foo.bar} if both exist and we were given
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1648 @samp{foo.bar}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1649
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1650 @item
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1651 Search for @var{name}, and if necssary for alternative names found in
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1652 the fontmaps. Again we avoid searching the disk if possible. Example:
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1653 given @samp{foo}, we look for @samp{foo}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1654
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1655 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1656 If the file format defines a program to invoke to create missing files,
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1657 run it (@pxref{mktex scripts}).
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1658 @end enumerate
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1659
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1660 @flindex tex-file.c
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1661 @findex kpse_find_file
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1662 This is implemented in the routine @code{kpse_find_file} in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1663 @file{kpathsea/tex-file.c}. You can watch it in action with the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1664 debugging options (@pxref{Debugging}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1665
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1666
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1667 @node Glyph lookup
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1668 @section Glyph lookup
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1669
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1670 @cindex glyph lookup
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1671 @cindex searching for glyphs
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1672 @cindex @TeX{} glyph lookup
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1673
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1674 This section describes how Kpathsea searches for a bitmap font in GF or
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1675 PK format (or either) given a font name (e.g., @samp{cmr10}) and a
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1676 resolution (e.g., 600).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1677
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1678 Here is an outline of the search strategy (details in the sections
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1679 below) for a file @var{name} at resolution @var{dpi}. The search stops
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1680 at the first successful lookup.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1681
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1682 @enumerate
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1683 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1684 Look for an existing file @var{name}.@var{dpi}@var{format} in the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1685 specified format(s).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1686
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1687 @item If @var{name} is an alias for a file @var{f} in the fontmap
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1688 file @file{texfonts.map}, look for @var{f}.@var{dpi}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1689
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1690 @item Run an external program (typically named @samp{mktexpk}) to
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1691 generate the font (@pxref{mktex scripts})
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1692
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1693 @item Look for @var{fallback}.@var{dpi}, where @var{fallback} is some
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1694 last-resort font (typically @samp{cmr10}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1695 @end enumerate
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1696
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1697 @flindex tex-glyph.c
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1698 @findex kpse_find_glyph_format
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1699 This is implemented in @code{kpse_find_glyph_format} in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1700 @file{kpathsea/tex-glyph.c}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1701
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1702 @menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1703 * Basic glyph lookup:: Features common to all glyph lookups.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1704 * Fontmap:: Aliases for fonts.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1705 * Fallback font:: Resolutions and fonts of last resort.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1706 @end menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1707
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1708
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1709 @node Basic glyph lookup
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1710 @subsection Basic glyph lookup
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1711
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1712 @cindex basic glyph lookup
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1713 @cindex common features in glyph lookup
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1714
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1715 When Kpathsea looks for a bitmap font @var{name} at resolution @var{dpi}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1716 in a format @var{format}, it first checks each directory in the search
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1717 path for a file @samp{@var{name}.@var{dpi}@var{format}}; for example,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1718 @samp{cmr10.600pk}. Kpathsea looks for a PK file first, then a GF file.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1719
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1720 If that fails, Kpathsea looks for
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1721 @samp{dpi@var{dpi}/@var{name}.@var{format}}; for example,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1722 @samp{dpi600/cmr10.pk}. This is how fonts are typically stored on
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1723 filesystems (such as DOS) that permit only three-character extensions.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1724
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1725 @cindex tolerance for glyph lookup
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1726 @cindex glyph lookup bitmap tolerance
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1727 @findex KPSE_BITMAP_TOLERANCE
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1728 If that fails, Kpathsea looks for a font with a close-enough @var{dpi}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1729 ``Close enough'' is defined by the macro @code{KPSE_BITMAP_TOLERANCE} in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1730 @file{kpathsea/tex-glyph.h} to be @code{@var{dpi} / 500 + 1}. This is
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1731 slightly more than the 0.2% minimum allowed by the DVI standard
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1732 (@url{@var{CTAN:}/dviware/driv-standard/level-0}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1733
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1734
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1735 @node Fontmap
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1736 @subsection Fontmap
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1737
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1738 @cindex fontmap files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1739 @cindex font alias files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1740 @cindex aliases for fonts
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1741
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1742 @flindex texfonts.map
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1743 If a bitmap font or metric file is not found with the original name (see
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1744 the previous section), Kpathsea looks through any @dfn{fontmap} files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1745 for an @dfn{alias} for the original font name. These files are named
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1746 @file{texfonts.map} and searched for along the @code{TEXFONTMAPS}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1747 environment/config file variable. All @file{texfonts.map} files that
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1748 are found are read; earlier definitions override later ones.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1749
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1750 This feature is intended to help in two respects:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1751
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1752 @enumerate
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1753
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1754 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1755 @cindex fontnames, arbitrary length
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1756 An alias name is limited in length only by available memory, not by your
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1757 filesystem. Therefore, if you want to ask for @samp{Times-Roman}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1758 instead of @file{ptmr}, you can (you get @samp{ptmr8r}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1759
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1760 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1761 @cindex circle fonts
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1762 @flindex lcircle10
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1763 A few fonts have historically had multiple names: specifically,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1764 La@TeX{}'s ``circle font'' has variously been known as @file{circle10},
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1765 @file{lcircle10}, and @file{lcirc10}. Aliases can make all the names
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1766 equivalent, so that it no longer matters what the name of the installed
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1767 file is; @TeX{} documents will find their favorite name.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1768
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1769 @end enumerate
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1770
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1771 The format of fontmap files is straightforward:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1772
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1773 @itemize @bullet
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1774 @cindex comments, in fontmap files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1775 @item Comments start with @samp{%} and continue to the end of the line.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1776 @cindex whitespace, in fontmap files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1777 @item Blank lines are ignored.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1778 @item Each nonblank line is broken up into a series of @dfn{words}:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1779 a sequence of non-whitespace characters.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1780 @findex include @r{fontmap directive}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1781 @item If the first word is @samp{include}, the second word is used as
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1782 a filename, and it is searched for and read.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1783 @item Otherwise, the first word on each line is the true filename;
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1784 @item the second word is the alias;
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1785 @item subsequent words are ignored.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1786 @end itemize
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1787
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1788 If an alias has an extension, it matches only those files with that
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1789 extension; otherwise, it matches anything with the same root, regardless
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1790 of extension. For example, an alias @samp{foo.tfm} matches only when
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1791 @file{foo.tfm} is being searched for; but an alias @samp{foo} matches
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1792 @file{foo.vf}, @file{foo.600pk}, etc.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1793
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1794 As an example, here is an excerpt from the @file{texfonts.map} in the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1795 Web2c distribution. It makes the circle fonts equivalent and includes
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1796 automatically generated maps for most PostScript fonts available from
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1797 various font suppliers.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1798
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1799 @example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1800 circle10 lcircle10
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1801 circle10 lcirc10
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1802 lcircle10 circle10
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1803 lcircle10 lcirc10
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1804 lcirc10 circle10
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1805 lcirc10 lcircle10
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1806 @dots{}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1807 include adobe.map
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1808 include apple.map
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1809 include bitstrea.map
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1810 @dots{}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1811 @end example
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1812
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1813 Fontmaps are implemented in the file @file{kpathsea/fontmap.c}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1814 The Fontname distribution has much more information on font naming
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1815 (@pxref{Introduction,,, fontname, Filenames for @TeX{} fonts}).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1816
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1817
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1818 @node Fallback font
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1819 @subsection Fallback font
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1820
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1821 @cindex fallback font
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1822 @cindex fallback resolutions
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1823 @cindex font of last resort
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1824 @cindex resolutions, last-resort
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1825 @cindex last-resort font
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1826
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1827 @vindex DVIPSSIZES
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1828 @vindex XDVISIZES
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1829 @vindex DVILJSIZES
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1830 @vindex TEXSIZES
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1831 @vindex default_texsizes
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1832 If a bitmap font cannot be found or created at the requested size,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1833 Kpathsea looks for the font at a set of @dfn{fallback resolutions}. You
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1834 specify these resolutions as a colon-separated list (like search paths).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1835 Kpathsea looks first for a program-specific environment variable (e.g.,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1836 @code{DVIPSSIZES} for Dvipsk), then the environment variable
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1837 @code{TEXSIZES}, then a default specified at compilation time (the Make
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1838 variable @code{default_texsizes}). You can set this list to be empty if
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1839 you prefer to find fonts at their stated size or not at all.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1840
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1841 @flindex cmr10@r{, as fallback font}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1842 @vindex kpse_fallback_font
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1843 Finally, if the font cannot be found even at the fallback resolutions,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1844 Kpathsea looks for a fallback font, typically @file{cmr10}. Programs
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1845 must enable this feature by assigning to the global variable
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1846 @code{kpse_fallback_font} or calling @code{kpse_init_prog}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1847 (@pxref{Calling sequence}); the default is no fallback font.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1848
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1849
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1850 @node Suppressing warnings
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1851 @section Suppressing warnings
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1852
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1853 @cindex warnings, suppressing
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1854 @cindex suppressing warnings
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1855
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1856 @vindex TEX_HUSH
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1857 Kpathsea provides a way to suppress selected usually-harmless warnings;
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1858 this is useful at large sites where most users are not administrators,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1859 and thus the warnings are merely a source of confusion, not a help. To
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1860 do this, you set the environment variable or configuration file value
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1861 @code{TEX_HUSH} to a colon-separated list of values. Here are the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1862 possibilities:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1863
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1864 @vtable @samp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1865 @item all
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1866 Suppress everything possible.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1867
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1868 @item checksum
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1869 @cindex mismatched checksum warnings
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1870 Suppress mismatched font checksum warnings.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1871
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1872 @item lostchar
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1873 @cindex missing character warnings
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1874 Suppress warnings when a character is missing from a font that a DVI or
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1875 VF file tries to typeset.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1876
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1877 @item readable
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1878 @cindex unreadable file warnings
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1879 Suppress warnings about attempts to access a file whose permissions
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1880 render it unreadable.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1881
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1882 @item special
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1883 @cindex unknown special warnings
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1884 @findex \special@r{, suppressing warnings about}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1885 Suppresses warnings about an unimplemented or unparsable
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1886 @samp{\special} command.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1887 @end vtable
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1888
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1889 @noindent @file{tex-hush.c} defines the function that checks the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1890 variable value. Each driver implements its own checks where
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1891 appropriate.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1892
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1893
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1894 @node Programming
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1895 @chapter Programming
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1896
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1897 This chapter is for programmers who wish to use Kpathsea.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1898 @xref{Introduction}, for the conditions under which you may do so.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1899
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1900 @menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1901 * Overview: Programming overview. Introduction.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1902 * Calling sequence:: Specifics of what to call.
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1903 * Program-specific files:: How to handle these.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1904 * Config: Programming with config files. Getting info from texmf.cnf.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1905 @end menu
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1906
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1907
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1908 @node Programming overview
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1909 @section Programming overview
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1910
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1911 @cindex programming overview
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1912 @cindex overview of programming with Kpathsea
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1913
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1914 Aside from this manual, your best source of information is the source to
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1915 the programs I've modified to use Kpathsea (@pxref{Introduction}). Of
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1916 those, Dviljk is probably the simplest, and hence a good place to start.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1917 Xdvik adds VF support and the complication of X resources. Dvipsk adds
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1918 the complication of its own config files. Web2c is source code I also
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1919 maintain, so it uses Kpathsea rather straightforwardly, but is of course
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1920 complicated by the Web to C translation. Finally, Kpsewhich is a small
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1921 utility program whose sole purpose is to exercise the main
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1922 path-searching functionality.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1923
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1924 @flindex pathsearch.h
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1925 @flindex tex-file.h
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1926 @flindex tex-glyph.h
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1927 @flindex kpathsea.h
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1928 Beyond these examples, the @file{.h} files in the Kpathsea source
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1929 describe the interfaces and functionality (and of course the @file{.c}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1930 files define the actual routines, which are the ultimate documentation).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1931 @file{pathsearch.h} declares the basic searching routine.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1932 @file{tex-file.h} and @file{tex-glyph.h} define the interfaces for
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1933 looking up particular kinds of files. You may wish to use
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1934 @code{#include <kpathsea/kpathsea.h>}, which includes every Kpathsea header.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1935
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1936 @cindex file types, registering new
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1937 The library provides no way for an external program to register new file
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1938 types: @file{tex-file.[ch]} must be modified to do this. For example,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1939 Kpathsea has support for looking up Dvips config files, even though no
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1940 program other than Dvips will likely ever want to do so. I felt this
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1941 was acceptable, since along with new file types should also come new
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1942 defaults in @file{texmf.cnf} (and its descendant @file{paths.h}), since
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1943 it's simplest for users if they can modify one configuration file for
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1944 all kinds of paths.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1945
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1946 Kpathsea does not parse any formats itself; it barely opens any files.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1947 Its primary purpose is to return filenames. The GNU font utilities does
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1948 contain libraries to read TFM, GF, and PK files, as do the programs
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1949 above, of course.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1950
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1951
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1952 @node Calling sequence
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1953 @section Calling sequence
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1954
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1955 @cindex programming with Kpathsea
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1956 @cindex calling sequence
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1957
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1958 The typical way to use Kpathsea in your program goes something like this:
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1959
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1960 @enumerate
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1961
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1962 @item
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1963 @findex kpse_set_program_name
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1964 @vindex argv[0]
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1965 Call @code{kpse_set_program_name} with @code{argv[0]} as the first
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1966 argument; the second argument is a string or @code{NULL}. The second
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1967 argument is used by Kpathsea as the program name for the
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1968 @code{.@var{program}} feature of config files (@pxref{Config files}).
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1969 If the second argument is @code{NULL}, the value of the first argument
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1970 is used. This function must be called before any other use of the
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1971 Kpathsea library.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1972
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1973 @vindex program_invocation_name
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1974 @vindex program_invocation_short_name
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1975 @vindex kpse_program_name
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1976 @vindex KPATHSEA_DEBUG
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1977 @cindex SELFAUTOLOC
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1978 @cindex SELFAUTODIR
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1979 @cindex SELFAUTOPARENT
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1980 @cindex error message macros
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1981 @cindex symlinks, resolving
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1982 @cindex expanding symlinks
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1983 If necessary, @code{kpse_set_program_name} sets the global variables
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1984 @code{program_invocation_name} and @code{program_invocation_short_name}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1985 These variables are used in the error message macros defined in
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1986 @file{kpathsea/lib.h}. It sets the global variable
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1987 @code{kpse_program_name} to the program name it uses. It also
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1988 initializes debugging options based on the environment variable
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1989 @code{KPATHSEA_DEBUG} (if that is set). Finally, it sets the variables
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1990 @code{SELFAUTOLOC}, @code{SELFAUTODIR} and @code{SELFAUTOPARENT} to the
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1991 location, parent and grandparent directory of the executable, removing
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1992 @file{.} and @file{..} path elements and resolving symbolic links.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1993 These are used in the default configuration file to allow people to
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1994 invoke TeX from anywhere, specifically from a mounted CD-ROM. (You can
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1995 use @samp{--expand-var=\$SELFAUTOLOC}, etc., to see the values finds.)
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1996
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1997 @item
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1998 @findex kpse_set_progname
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
1999 @vindex argv[0]
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2000 The @code{kpse_set_progname} is deprecated. A call to
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2001 @code{kpse_set_progname} with @code{argv[0]} is equivalent to a call of
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2002 @code{kpse_set_program_name} with first argument @code{argv[0]} and
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2003 second argument @code{NULL}. The function is deprecated because it
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2004 cannot ensure that the @code{.@var{program}} feature of config files
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2005 will always work (@pxref{Config files}).
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2006
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2007 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2008 @vindex kpathsea_debug @r{variable}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2009 @cindex debugging options, in Kpathsea-using program
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2010 Set debugging options. @xref{Debugging}. If your program doesn't have a
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2011 debugging option already, you can define one and set
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2012 @code{kpathsea_debug} to the number that the user supplies (as in Dviljk
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2013 and Web2c), or you can just omit this altogether (people can always set
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2014 @code{KPATHSEA_DEBUG}). If you do have runtime debugging already, you
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2015 need to merge Kpathsea's options with yours (as in Dvipsk and Xdvik).
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2016
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2017 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2018 @vindex client_path @r{in @code{kpse_format_info}}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2019 @vindex kpse_format_info
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2020 @flindex resident.c
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2021 @cindex config files, for Kpathsea-using programs
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2022 If your program has its own configuration files that can define search
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2023 paths, you should assign those paths to the @code{client_path} member in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2024 the appropriate element of the @code{kpse_format_info} array. (This
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2025 array is indexed by file type; see @file{tex-file.h}.) See
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2026 @file{resident.c} in Dvipsk for an example.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2027
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2028 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2029 @findex kpse_init_prog
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2030 @flindex proginit.h
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2031 Call @code{kpse_init_prog} (see @file{proginit.c}). It's useful for the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2032 DVI drivers, at least, but for other programs it may be simpler to
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2033 extract the parts of it that actually apply. This does not initialize
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2034 any paths, it just looks for (and sets) certain environment variables
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2035 and other random information. (A search path is always initialized at
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2036 the first call to find a file of that type; this eliminates much useless
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2037 work, e.g., initializing the Bib@TeX{} search paths in a DVI driver.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2038
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2039 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2040 @findex kpse_find_*
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2041 @findex kpse_find_file
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2042 The routine to actually find a file of type @var{format} is
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2043 @code{kpse_find_@var{format}}, defined in @file{tex-file.h}. These are
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2044 macros that expand to a call to @file{kpse_find_file}. You can call,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2045 say, @code{kpse_find_tfm} after doing only the first of the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2046 initialization steps above---Kpathsea automatically reads the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2047 @file{texmf.cnf} generic config files, looks for environment variables,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2048 and does expansions at the first lookup.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2049
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2050 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2051 To find PK and/or GF bitmap fonts, the routines are @code{kpse_find_pk},
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2052 @code{kpse_find_gf} and @code{kpse_find_glyph}, defined in
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2053 @file{tex-glyph.h}. These return a structure in addition to the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2054 resultant filename, because fonts can be found in so many ways. See the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2055 documentation in the source.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2056
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2057 @item
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2058 @findex kpse_open_file
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2059 To actually open a file, not just return a filename, call
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2060 @code{kpse_open_file}. This function takes the name to look up and a
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2061 Kpathsea file format as arguments, and returns the usual @code{FILE *}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2062 It always assumes the file must exist, and thus will search the disk if
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2063 necessary (unless the search path specified @samp{!!}, etc.). In other
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2064 words, if you are looking up a VF or some other file that need not
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2065 exist, don't use this.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2066
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2067 @end enumerate
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2068
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2069 @cindex hash table routines
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2070 @cindex memory allocation routines
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2071 @cindex string routines
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2072 @cindex reading arbitrary-length lines
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2073 @cindex input lines, reading
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2074 @cindex lines, reading arbitrary-length
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2075 Kpathsea also provides many utility routines. Some are generic: hash
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2076 tables, memory allocation, string concatenation and copying, string
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2077 lists, reading input lines of arbitrary length, etc. Others are
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2078 filename-related: default path, tilde, and variable expansion,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2079 @code{stat} calls, etc. (Perhaps someday I'll move the former to a
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2080 separate library.)
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2081
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2082 @flindex c-*.h
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2083 @pindex autoconf@r{, recommended}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2084 The @file{c-*.h} header files can also help your program adapt to many
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2085 different systems. You will almost certainly want to use Autoconf for
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2086 configuring your software if you use Kpathsea; I strongly recommend
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2087 using Autoconf regardless. It is available from
3285
6929a31e7624 [project @ 1999-10-13 21:59:11 by jwe]
jwe
parents: 3172
diff changeset
2088 @url{ftp://ftp.gnu.org/pub/gnu/autoconf}.
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2089
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2090
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2091 @node Program-specific files
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2092 @section Program-specific files
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2093
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2094 Many programs will need to find some configuration files. Kpathsea
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2095 contains some support to make it easy to place them in their own
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2096 directories. The Standard @TeX{} directory structure (@pxref{Top,,
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2097 Introduction, tds, A Directory Structure for @TeX{} files}), specifies
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2098 that such files should go into a subdirectory named after the program,
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2099 like @samp{texmf/ttf2pk}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2100
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2101 Two special formats, @samp{kpse_program_text_format} and
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2102 @samp{kpse_program_binary_format} exist, which use
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2103 @code{.:$TEXMF/@var{program}//} as their compiled-in search path. To
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2104 override this default, you can use the variable
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2105 @code{@var{PROGRAM}INPUTS} in the environment and/or @samp{texmf.cnf}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2106 That is to say, the name of the variable is constructed by converting
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2107 the name of the program to upper case, and appending @code{INPUTS}.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2108
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2109 The only difference between these two formats is whether
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2110 @code{kpse_open_file} will open the files it finds in text or binary
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2111 mode.
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2112
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2113
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2114 @node Programming with config files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2115 @section Programming with config files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2116
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2117 @cindex programming with config files
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2118 @cindex config files, programming with
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2119
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2120 You can (and probably should) use the same @code{texmf.cnf}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2121 configuration file that Kpathsea uses for your program. This helps
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2122 installers by keeping all configuration in one place.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2123
3172
1f0b06020e36 [project @ 1998-04-24 04:24:34 by jwe]
jwe
parents: 2999
diff changeset
2124 @findex kpse_var_value
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2125 @flindex variable.h
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2126 @vindex shell_escape@r{, example for code}
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2127 To retrieve a value @var{var} from config files, the best way is to call
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2128 @code{kpse_var_value} on the string @code{@var{var}}. This will look
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2129 first for an environment variable @var{var}, then a config file value.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2130 The result will be the value found or @samp{NULL}. This function is
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2131 declared in @file{kpathsea/variable.h}. For an example, see the
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2132 @code{shell_escape} code in @file{web2c/lib/texmfmp.c}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2133
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2134 The routine to do variable expansion in the context of a search path (as
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2135 opposed to simply retrieving a value) is @code{kpse_var_expand}, also
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2136 declared in @file{kpathsea/variable.h}. It's generally only necessary
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2137 to set the search path structure components as explained in the previous
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2138 section, rather than using this yourself.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2139
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2140 @findex kpse_cnf_get
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2141 @flindex cnf.h
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2142 If for some reason you want to retrieve a value @emph{only} from a
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2143 config file, not automatically looking for a corresponding environment
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2144 variable, call @code{kpse_cnf_get} (declared in @file{kpathsea/cnf.h})
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2145 with the string @var{var}.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2146
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2147 No initialization calls are needed.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2148
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2149
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2150 @node Index
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2151 @unnumbered Index
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2152
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2153 @printindex cp
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2154
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2155 @contents
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2156
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2157 @bye