Mercurial > octave-nkf
comparison kpathsea/kpathsea.info @ 2999:faa5d0421460
[project @ 1997-05-23 03:02:09 by jwe]
author | jwe |
---|---|
date | Fri, 23 May 1997 03:02:36 +0000 |
parents | |
children | 1f0b06020e36 |
comparison
equal
deleted
inserted
replaced
2998:692ba9d441ec | 2999:faa5d0421460 |
---|---|
1 This is Info file kpathsea.info, produced by Makeinfo version 1.67 from | |
2 the input file kpathsea.texi. | |
3 | |
4 INFO-DIR-SECTION TeX | |
5 START-INFO-DIR-ENTRY | |
6 * Kpathsea: (kpathsea). File lookup along search paths. | |
7 * kpsewhich: (kpathsea)Invoking kpsewhich. TeX file searching. | |
8 * MakeTeXMF: (kpathsea)MakeTeX scripts. MF source generation. | |
9 * MakeTeXPK: (kpathsea)MakeTeX scripts. PK bitmap generation. | |
10 * MakeTeXTeX: (kpathsea)MakeTeX scripts. TeX source generation. | |
11 * MakeTeXTFM: (kpathsea)MakeTeX scripts. TeX font metric generation. | |
12 * MakeTeXls-R: (kpathsea)Filename database. Update ls-R. | |
13 END-INFO-DIR-ENTRY | |
14 | |
15 This file documents the Kpathsea library for path searching. | |
16 | |
17 Copyright (C) 1993, 94, 95, 96, 97 K. Berry. | |
18 | |
19 Permission is granted to make and distribute verbatim copies of this | |
20 manual provided the copyright notice and this permission notice are | |
21 preserved on all copies. | |
22 | |
23 Permission is granted to copy and distribute modified versions of this | |
24 manual under the conditions for verbatim copying, provided that the | |
25 entire resulting derived work is distributed under the terms of a | |
26 permission notice identical to this one. | |
27 | |
28 Permission is granted to copy and distribute translations of this | |
29 manual into another language, under the above conditions for modified | |
30 versions, except that this permission notice may be stated in a | |
31 translation approved by the Free Software Foundation. | |
32 | |
33 | |
34 File: kpathsea.info, Node: Top, Next: Introduction, Up: (dir) | |
35 | |
36 Kpathsea library | |
37 **************** | |
38 | |
39 This manual documents how to install and use the Kpathsea library for | |
40 filename lookup. It corresponds to version 3.0, released in February | |
41 1997. | |
42 | |
43 * Menu: | |
44 | |
45 * Introduction:: Overview. | |
46 * Installation:: Compilation, installation, and bug reporting. | |
47 | |
48 * Path searching:: How filename lookups work. | |
49 * TeX support:: Special support for TeX-related file lookups. | |
50 | |
51 * Programming:: How to use Kpathsea features in your program. | |
52 | |
53 * Index:: General index. | |
54 | |
55 | |
56 File: kpathsea.info, Node: Introduction, Next: Installation, Prev: Top, Up: Top | |
57 | |
58 Introduction | |
59 ************ | |
60 | |
61 This manual corresponds to version 3.0 of the Kpathsea library, | |
62 released in February 1997. | |
63 | |
64 The library's fundamental purpose is to return a filename from a list | |
65 of directories specified by the user, similar to what shells do when | |
66 looking up program names to execute. | |
67 | |
68 The following software, all of which I maintain, uses this library: | |
69 | |
70 * Dviljk (see the `dvilj' man page) | |
71 | |
72 * Dvipsk (*note Introduction: (dvips)Top.) | |
73 | |
74 * GNU font utilities (*note Introduction: (fontu)Top.) | |
75 | |
76 * Web2c (*note Introduction: (web2c)Top.) | |
77 | |
78 * Xdvik (see the `xdvi' man page) | |
79 | |
80 Other software that I do not maintain also uses it. | |
81 | |
82 I am still actively maintaining the library (and probably always will | |
83 be, despite my hopes). If you have comments or suggestions, please send | |
84 them to me (*note Reporting bugs::.). | |
85 | |
86 I distribute the library under the GNU Library General Public License | |
87 (LGPL), with one exception (see below). In short, this means if you | |
88 write a program using the library, you must (offer to) distribute the | |
89 source to the library, along with any changes you have made, and allow | |
90 anyone to modify the library source and distribute their modifications. | |
91 It does not mean you have to distribute the source to your program, | |
92 although I hope you will. | |
93 | |
94 The exception is the part of the file `expand.c' which implements | |
95 brace expansion. I took this from Bash, which is covered by the GNU | |
96 General Public License (GPL). Therefore, if you wish to redistribute | |
97 the library under the LGPL, you must remove this code. (If you write a | |
98 replacement I can distribute, I hope you'll share it with me.) See the | |
99 files `COPYING' and `COPYING.LIB' for the text of the GNU licenses. | |
100 | |
101 If you know enough about TeX to be reading this manual, then you (or | |
102 your institution) should consider joining the TeX Users Group (if | |
103 you're already a member, great!). TUG produces the periodical | |
104 `TUGboat', sponsors an annual meeting and publishes the proceedings, | |
105 and arranges courses on TeX for all levels of users throughout the | |
106 world. Anyway, here is the address: | |
107 | |
108 TeX Users Group | |
109 870 Market St. #801 | |
110 San Francisco, CA 94102 USA | |
111 phone: +1 (415) 982-8449 | |
112 fax: +1 (415) 982-8559 | |
113 email: <tug@tug.org> | |
114 | |
115 * Menu: | |
116 | |
117 * History:: | |
118 | |
119 | |
120 File: kpathsea.info, Node: History, Up: Introduction | |
121 | |
122 History | |
123 ======= | |
124 | |
125 (This section is for those people who are curious about how the | |
126 library came about.) (If you like to read historical accounts of | |
127 software, I urge you to seek out the GNU Autoconf manual and the | |
128 "Errors of TeX" paper by Don Knuth, published in `Software--Practice and | |
129 Experience' 19(7), July 1989.) | |
130 | |
131 My first ChangeLog entry for Web2c seems to be February 1990, but I | |
132 may have done some work before then. In any case, Tim Morgan and I were | |
133 jointly maintaining it for a time. (I should mention here that Tim had | |
134 made Web2c into a real distribution long before I had ever used it or | |
135 even heard of it, and Tom Rokicki did the original implementation. I | |
136 was using `pxp' and `pc' on VAX 11/750's and the hot new Sun 2 | |
137 machines.) | |
138 | |
139 It must have been later in 1990 and 1991 that I started working on | |
140 `TeX for the Impatient'. Dvips, Xdvi, Web2c, and the GNU fontutils | |
141 (which I was also writing at the time) all used different environment | |
142 variables, and, more importantly, had different bugs in their path | |
143 searching. This became extremely painful, as I was stressing everything | |
144 to the limit working on the book. I also desperately wanted to | |
145 implement subdirectory searching, since I couldn't stand putting | |
146 everything in one big directory, and also couldn't stand having to | |
147 explicitly specify `cm', `pandora', ... in a path. | |
148 | |
149 In the first incarnation, I just hacked separately on each | |
150 program--that was the original subdirectory searching code in both Xdvi | |
151 and Dvips, though I think Paul Vojta has completely rewritten Xdvi's | |
152 support by now. That is, I tried to go with the flow in each program, | |
153 rather than changing the program's calling sequences to conform to | |
154 common routines. | |
155 | |
156 Then, as bugs inevitably appeared, I found I was fixing the same thing | |
157 three times (Web2c and fontutils were always sharing code, since I | |
158 maintained those--there was no Dvipsk or Xdvik or Dviljk at this | |
159 point). After a while, I finally started sharing source files. They | |
160 weren't yet a library, though. I just kept things up to date with shell | |
161 scripts. (I was developing on a 386 running ISC 2.2 at the time, and so | |
162 didn't have symbolic links. An awful experience.) | |
163 | |
164 The ChangeLogs for Xdvik and Dvipsk record initial releases of those | |
165 distributions in May and June 1992. I think it was because I was tired | |
166 of the different configuration strategies of each program, not so much | |
167 because of the path searching. (Autoconf was being developed by David | |
168 MacKenzie and others, and I was adapting it to TeX and friends.) | |
169 | |
170 I started to make a separate library that other programs could link | |
171 with on my birthday in April 1993, according to the ChangeLog. I don't | |
172 remember exactly why I finally took the time to make it a separate | |
173 library; a conversation with david zuhn that initiated it. Just seemed | |
174 like it was time. | |
175 | |
176 Dviljk got started in March 1994 after I bought a Laserjet 4. | |
177 (Kpathsea work got suspended while Norm Walsh and I, with Gustaf | |
178 Neumann's help, implemented a way for TeX to get at all those neat | |
179 builtin LJ4 fonts ... such a treat to have something to typeset in | |
180 besides Palatino!) | |
181 | |
182 By spring of 1995, I had implemented just about all the path-searching | |
183 features in Kpathsea that I plan to, driven beyond my initial goals by | |
184 Thomas Esser and others. I then started to integrate Web2c with | |
185 Kpathsea. After the release of a stable Web2c, I hope to be able to stop | |
186 development, and turn most of my attention back to making fonts for GNU. | |
187 (Always assuming Micros**t hasn't completely obliterated Unix by then, | |
188 or that software patents haven't stopped software development by anybody | |
189 smaller than a company with a million-dollar-a-year legal budget. Which | |
190 is actually what I think is likely to happen, but that's another | |
191 story...) | |
192 | |
193 | |
194 File: kpathsea.info, Node: Installation, Next: Path searching, Prev: Introduction, Up: Top | |
195 | |
196 Installation | |
197 ************ | |
198 | |
199 (A copy of this chapter is in the distribution file | |
200 `kpathsea/INSTALL'.) | |
201 | |
202 The procedure for Kpathsea (and Web2c, etc.) configuration and | |
203 installation follows. If trouble, *note Common problems::., a copy of | |
204 which is in the file `kpathsea/BUGS'. | |
205 | |
206 * Menu: | |
207 | |
208 * Simple installation:: If you just want to do it. | |
209 * Custom installation:: If you want to change things around. | |
210 * Security:: Who can write what files, etc. | |
211 * TeX directory structure:: Managing the horde of TeX input files. | |
212 * unixtex.ftp:: Getting software via FTP, on CD-ROM, or on tape. | |
213 * Reporting bugs:: Where and how to report bugs. | |
214 | |
215 | |
216 File: kpathsea.info, Node: Simple installation, Next: Custom installation, Up: Installation | |
217 | |
218 Simple installation | |
219 =================== | |
220 | |
221 Installing TeX and friends for the first time can be a daunting | |
222 experience. Thus, you may prefer to skip this whole thing and just get | |
223 precompiled executables: *note unixtex.ftp::.. | |
224 | |
225 This section explains what to do if you wish to take the defaults for | |
226 everything (installing under `/usr/local'), and generally to install in | |
227 the simplest possible way. Most steps here refer to corresponding | |
228 subsection in the next section which explains how to override defaults | |
229 and generally gives more details. | |
230 | |
231 1. Be sure you have enough disk space: approximately 8 megabytes for | |
232 the compressed archives, 15MB for sources, 45MB for compilation, | |
233 40MB for the (initial) installed system (including library files). | |
234 *Note Disk space::. | |
235 | |
236 2. Retrieve these two distribution archives: | |
237 `ftp://ftp.tug.org/tex/texk.tar.gz' | |
238 These are the sources, which you will be compiling. | |
239 | |
240 `ftp://ftp.tug.org/tex/texmflib.tar.gz' | |
241 This is a basic set of input files. You should unpack it in | |
242 the directory `/usr/local/share'; doing so will create a | |
243 `texmf' subdirectory there. | |
244 | |
245 *Note Kpathsea application distributions::. | |
246 | |
247 3. When using the default search paths, there is no need to edit any | |
248 distribution files. *Note Changing search paths::. | |
249 | |
250 4. At the top level of the distribution, run `sh configure'. (If you | |
251 have the GNU Bash shell installed, run `bash configure'.) *Note | |
252 Running configure::. | |
253 | |
254 5. `make'. *Note Running make::. | |
255 | |
256 6. `make install'. *Note Installing files::. | |
257 | |
258 7. `make distclean'. *Note Cleaning up::. | |
259 | |
260 8. Set up a cron job to rebuild the filename database that makes | |
261 searching faster. This line will rebuild it every midnight: | |
262 0 0 * * * cd /usr/local/share/texmf && /BINDIR/MakeTeXls-R | |
263 *Note Filename database generation::, and *Note Filename | |
264 database::. | |
265 | |
266 9. If you're installing Dvips, you also need to set up configuration | |
267 files for your printers and make any additional PostScript fonts | |
268 available. *Note Installation: (dvips)Installation. If you have | |
269 any color printers, *note Color device configuration: (dvips)Color | |
270 device configuration.. | |
271 | |
272 10. The first time you run a DVI driver, a bunch of PK fonts will be | |
273 built by Metafont via `MakeTeXPK' (and added to the filename | |
274 database). This will take some time. Don't be alarmed; they will | |
275 created only this first time (unless something is wrong with your | |
276 path definitions). | |
277 | |
278 By default, `MakeTeXPK' assumes `/usr/local/share/texmf/fonts' is | |
279 globally writable. If you need a different arrangement, *note | |
280 MakeTeX configuration::.. | |
281 | |
282 *Note MakeTeX scripts::. | |
283 | |
284 11. For some simple tests, try `tex story \\bye' and `latex simple'. | |
285 Then run `xdvi story' or `dvips simple' on the resulting DVI files | |
286 to preview/print the documents. *Note Installation testing::. | |
287 | |
288 | |
289 File: kpathsea.info, Node: Custom installation, Next: Security, Prev: Simple installation, Up: Installation | |
290 | |
291 Custom installation | |
292 =================== | |
293 | |
294 Most sites need to modify the default installation procedure in some | |
295 way, perhaps merely changing the prefix from `/usr/local', perhaps | |
296 adding extra compiler or loader options to work around `configure' | |
297 bugs. This section explains how to override default choices. For | |
298 additional distribution-specific information: | |
299 * `dviljk/INSTALL'. | |
300 | |
301 * *Note Installation: (dvips)Installation. | |
302 | |
303 * *Note Installation: (web2c)Installation. | |
304 | |
305 * `xdvik/INSTALL'. | |
306 | |
307 These instructions are for Unix systems. Other operating-system | |
308 specific distributions have their own instructions. The code base | |
309 itself supports Amiga, DOS, OS/2, and VMS. | |
310 | |
311 Following are the same steps as in the previous section (which | |
312 describes the simplest installation), but with much more detail. | |
313 | |
314 * Menu: | |
315 | |
316 * Disk space:: | |
317 * Kpathsea application distributions:: | |
318 * Changing search paths:: | |
319 * Running configure:: | |
320 * Running make:: | |
321 * Installing files:: | |
322 * Cleaning up:: | |
323 * Filename database generation:: | |
324 * MakeTeX scripts:: | |
325 * Installation testing:: | |
326 | |
327 | |
328 File: kpathsea.info, Node: Disk space, Next: Kpathsea application distributions, Up: Custom installation | |
329 | |
330 Disk space | |
331 ---------- | |
332 | |
333 Here is a table showing the disk space needed for each distribution | |
334 (described in the next section). The `(totals)' line reflects the | |
335 `texk' source distribution and `texmflib'; the individual distributions | |
336 don't enter into it. Sizes are in megabytes. All numbers are | |
337 approximate. | |
338 | |
339 dviljk .9 3.8 | |
340 dvipsk .9 3.2 | |
341 xdvik .7 2.5 | |
342 web2c 1.3 5.0 | |
343 web 1.9 6.5 - - | |
344 texk 3.8 14.1 43.1 23.5 | |
345 texmflib 3.8 15.0 - 15.0 | |
346 (totals) 7.6 29.1 43.1 38.5 | |
347 | |
348 | |
349 File: kpathsea.info, Node: Kpathsea application distributions, Next: Changing search paths, Prev: Disk space, Up: Custom installation | |
350 | |
351 Kpathsea application distributions | |
352 ---------------------------------- | |
353 | |
354 The archive `ftp://ftp.tug.org/tex/texk.tar.gz' contains all of the | |
355 Kpathsea applications I maintain, and the library itself. For example, | |
356 since NeXT does not generally support X11, you'd probably want to skip | |
357 `xdvik' (or simply remove it after unpacking `texk.tar.gz'. If you are | |
358 not interested in all of them, you can also retrieve them separately: | |
359 | |
360 `dviljk.tar.gz' | |
361 DVI to PCL, for LaserJet printers. | |
362 | |
363 `dvipsk.tar.gz' | |
364 DVI to PostScript, for previewers, printers, or PDF generation. | |
365 | |
366 `web2c.tar.gz' | |
367 The software needed to compile TeX and friends. | |
368 | |
369 `web.tar.gz' | |
370 The original WEB source files, also used in compilation. | |
371 | |
372 `xdvik.tar.gz' | |
373 DVI previewing under the X window system. | |
374 | |
375 If you want to use the Babel LaTeX package for support of non-English | |
376 typesetting, you may need to retrieve additional files. See the file | |
377 `install.txt' in the Babel distribution. | |
378 | |
379 | |
380 File: kpathsea.info, Node: Changing search paths, Next: Running configure, Prev: Kpathsea application distributions, Up: Custom installation | |
381 | |
382 Changing search paths | |
383 --------------------- | |
384 | |
385 If the search paths for your installation differ from the standard | |
386 TeX directory structure (*note Introduction: (tds)Top.), edit the file | |
387 `kpathsea/texmf.cnf.in' as desired, before running `configure'. For | |
388 example, if you have all your fonts or macros in one big directory. | |
389 | |
390 You may also wish to edit the file `MakeTeXnames.cnf', either before | |
391 or after installation, to control various aspects of `MakeTeXPK' and | |
392 friends. *Note MakeTeX configuration::. | |
393 | |
394 You do not need to edit `texmf.cnf.in' to change the default | |
395 top-level or other installation *directories* (only the paths). You | |
396 can and should do that when you run `configure' (next step). | |
397 | |
398 You also do not need to edit `texmf.cnf.in' if you are willing to | |
399 rely on `texmf.cnf' at runtime to define the paths, and let the | |
400 compile-time default paths be incorrect. Usually there is no harm in | |
401 doing this. | |
402 | |
403 The section below explains default generation in more detail. | |
404 | |
405 * Menu: | |
406 | |
407 * Default path features:: | |
408 * Default path generation:: | |
409 | |
410 | |
411 File: kpathsea.info, Node: Default path features, Next: Default path generation, Up: Changing search paths | |
412 | |
413 Default path features | |
414 ..................... | |
415 | |
416 The purpose of having all the different files described in the section | |
417 above is to avoid having the same information in more than one place. If | |
418 you change the installation directories or top-level prefix at | |
419 `configure'-time, those changes will propagate through the whole | |
420 sequence. And if you change the default paths in `texmf.cnf.in', those | |
421 changes are propagated to the compile-time defaults. | |
422 | |
423 The Make definitions are all repeated in several Makefile's; but | |
424 changing the top-level `Makefile' should suffice, as it passes down all | |
425 the variable definitions, thus overriding the submakes. (The | |
426 definitions are repeated so you can run Make in the subdirectories, if | |
427 you should have occasion to.) | |
428 | |
429 By default, the bitmap font paths end with `/$MAKETEX_MODE', thus | |
430 including the device name (usually a Metafont mode name such as | |
431 `ljfour'). This distinguishes two different devices with the same | |
432 resolution--a write/white from a write/black 300dpi printer, for | |
433 example. | |
434 | |
435 However, since most sites don't have this complication, Kpathsea | |
436 (specifically, the `kpse_init_prog' function in `kpathsea/proginit.c') | |
437 has a special case: if the mode has not been explicitly set by the user | |
438 (or in a configuration file), it sets `MAKETEX_MODE' to `/'. This | |
439 makes the default PK path, for example, expand into `.../pk//', so | |
440 fonts will be found even if there is no subdirectory for the mode (if | |
441 you arranged things that way because your site has only one printer, | |
442 for example) or if the program is mode-independent (e.g., `pktype'). | |
443 | |
444 To make the paths independent of the mode, simply edit `texmf.cnf.in' | |
445 before installation, or the installed `texmf.cnf', and remove the | |
446 `$MAKETEX_MODE'. | |
447 | |
448 *Note MakeTeX script arguments::, for how this interacts with | |
449 `MakeTeXPK'. | |
450 | |
451 *Note TeX directory structure: TeX directory structure, for a | |
452 description of the default arrangement of the input files that comprise | |
453 the TeX system. The file `kpathsea/HIER' is a copy of that section. | |
454 | |
455 | |
456 File: kpathsea.info, Node: Default path generation, Prev: Default path features, Up: Changing search paths | |
457 | |
458 Default path generation | |
459 ....................... | |
460 | |
461 This section describes how the default paths are constructed. | |
462 | |
463 You may wish to ignore the whole mess and simply edit `texmf.cnf' | |
464 after it is installed, perhaps even copying it into place beforehand so | |
465 you can complete the installation, if it seems necessary. | |
466 | |
467 To summarize the chain of events that go into defining the default | |
468 paths: | |
469 | |
470 1. `configure' creates a `Makefile' from each `Makefile.in'. | |
471 | |
472 2. When Make runs in the `kpathsea' directory, it creates a file | |
473 `texmf.sed' that substitutes the Make value of `$(var)' for a | |
474 string `@var@'. The variables in question are the one that define | |
475 the installation directories. | |
476 | |
477 3. `texmf.sed' (together with a little extra magic--see | |
478 `kpathsea/Makefile') is applied to `texmf.cnf.in' to generate | |
479 `texmf.cnf'. This is the file that will eventually be installed | |
480 and used. | |
481 | |
482 4. The definitions in `texmf.cnf' are recast as C `#define''s in | |
483 `paths.h'. These values will be the compile-time defaults; they | |
484 are not used at runtime unless no `texmf.cnf' file can be found. | |
485 | |
486 (That's a lie: the compile-time defaults are what any extra :'s in | |
487 `texmf.cnf' expand into; but the paths as distributed have no extra | |
488 :'s, and there's no particular reason for them to.) | |
489 | |
490 | |
491 File: kpathsea.info, Node: Running configure, Next: Running make, Prev: Changing search paths, Up: Custom installation | |
492 | |
493 Running `configure' | |
494 ------------------- | |
495 | |
496 Run `sh configure OPTIONS' (in the top-level directory, the one | |
497 containing `kpathsea/'), possibly using a shell other than `sh' (*note | |
498 configure shells::.). | |
499 | |
500 `configure' adapts the source distribution to the present system via | |
501 `#define''s in `*/c-auto.h', which are created from the corresponding | |
502 `c-auto.h.in'. It also creates a `Makefile' from the corresponding | |
503 `Makefile.in', doing `@VAR@' and `ac_include' substitutions). | |
504 | |
505 `configure' is the best place to control the configuration, | |
506 compilation, and installed location of the software, either via | |
507 command-line options, or by setting environment variables before | |
508 invoking it. For example, you can disable `MakeTeXPK' by default with | |
509 the option `--disable-maketexpk'. *Note configure options::. | |
510 | |
511 * Menu: | |
512 | |
513 * configure shells:: | |
514 * configure options:: | |
515 * configure environment:: | |
516 * configure scenarios:: | |
517 * Shared library:: | |
518 | |
519 | |
520 File: kpathsea.info, Node: configure shells, Next: configure options, Up: Running configure | |
521 | |
522 `configure' shells | |
523 .................. | |
524 | |
525 If you have Bash, the GNU shell, use it if `sh' runs into trouble | |
526 (*note Top: (features)Top.). | |
527 | |
528 Most Bourne shell variants other than Bash cannot handle `configure' | |
529 scripts as generated by GNU Autoconf (*note Introduction: | |
530 (autoconf)Top.). Specifically: | |
531 `ksh' | |
532 The Korn shell may be installed as `/bin/sh' on AIX. `/bin/bsh' | |
533 may serve instead. | |
534 | |
535 `ash' | |
536 Ash is sometimes installed as `/bin/sh' on NetBSD, FreeBSD, and | |
537 Linux systems. `/bin/bash' should be available. | |
538 | |
539 `Ultrix /bin/sh' | |
540 `/bin/sh' under Ultrix is a DEC-grown shell that is notably | |
541 deficient in many ways. `/bin/sh5' may be necessary. | |
542 | |
543 | |
544 File: kpathsea.info, Node: configure options, Next: configure environment, Prev: configure shells, Up: Running configure | |
545 | |
546 `configure' options | |
547 ................... | |
548 | |
549 For a complete list of all `configure' options, run `configure | |
550 --help' or *note Running `configure' scripts: (autoconf)Invoking | |
551 configure. (a copy is in the file `kpathsea/CONFIGURE'). The generic | |
552 options are listed first in the `--help' output, and the | |
553 package-specific options come last. The environment variables | |
554 `configure' pays attention to are listed below. | |
555 | |
556 Options particularly likely to be useful are `--prefix', `--datadir', | |
557 and the like; *note configure scenarios::.. | |
558 | |
559 This section gives pointers to descriptions of the `--with' and | |
560 `--enable' options to `configure' that Kpathsea-using programs accept. | |
561 | |
562 `--without-maketexmf-default' | |
563 `--without-maketexpk-default' | |
564 `--without-maketextfm-default' | |
565 `--with-maketextex-default' | |
566 Enable or disable the dynamic generation programs. *Note MakeTeX | |
567 configuration::. | |
568 | |
569 `--enable-shared' | |
570 Build Kpathsea as a shared library, and link against it. Also | |
571 build the usual static library. *Note Shared library::. | |
572 | |
573 `--disable-static' | |
574 Build only the shared library. | |
575 | |
576 | |
577 File: kpathsea.info, Node: configure environment, Next: configure scenarios, Prev: configure options, Up: Running configure | |
578 | |
579 `configure' environment | |
580 ....................... | |
581 | |
582 `configure' uses the value of the following environment variables in | |
583 determining your system's characteristics, and substitutes for them in | |
584 Makefile's: | |
585 | |
586 `CC' | |
587 The compiler to use: default is `gcc' if it's installed, otherwise | |
588 `cc'. | |
589 | |
590 `CFLAGS' | |
591 Options to give the compiler: default is `-g -O2' for `gcc', `-g' | |
592 otherwise. `CFLAGS' comes after any other options. You may need | |
593 to include `-w' here if your compilations commonly have useless | |
594 warnings (e.g., `NULL redefined'), or `configure' may fail to | |
595 detect the presence of header files (it takes the messages on | |
596 standard error to mean the header file doesn't exist). | |
597 | |
598 `CPPFLAGS' | |
599 Options to pass to the compiler preprocessor; this matters most for | |
600 configuration, not the actual source compilation. The `configure' | |
601 script often does only preprocessing (e.g., to check for the | |
602 existence of #include files), and `CFLAGS' is not used for this. | |
603 You may need to set this to something like | |
604 `-I/usr/local/include/wwwhatever' if you have the libwww library | |
605 installed for hyper-xdvik (see `xdvik/INSTALL'). | |
606 | |
607 `DEFS' | |
608 Additional preprocessor options, but not used by `configure'. | |
609 Provided for enabling or disabling program features, as documented | |
610 in the various program-specific installation instructions. `DEFS' | |
611 comes before any compiler options included by the distribution | |
612 `Makefile's or by `configure'. | |
613 | |
614 `LDFLAGS' | |
615 Additional options to give to the loader. `LDFLAGS' comes before | |
616 any other linker options. | |
617 | |
618 `LIBS' | |
619 Additional libraries to link with. | |
620 | |
621 | |
622 File: kpathsea.info, Node: configure scenarios, Next: Shared library, Prev: configure environment, Up: Running configure | |
623 | |
624 `configure' scenarios | |
625 ..................... | |
626 | |
627 Here are some common installation scenarios: | |
628 | |
629 * Including X support in Metafont. This is disabled by default, | |
630 since many sites have no use for it, and it's a leading cause of | |
631 configuration problems. | |
632 configure --with-x-toolkit | |
633 | |
634 * Putting the binaries, TeX files, GNU info files, etc. into a single | |
635 TeX hierarchy, say TEXMF, requires overriding defaults in both | |
636 `configure' and `make': | |
637 configure --prefix=TEXMF --datadir=TEXMF | |
638 make texmf=TEXMF | |
639 | |
640 * You can compile on multiple architectures simultaneously either by | |
641 building symbolic link trees with the `lndir' script from the X11 | |
642 distribution, or with the `--srcdir' option: | |
643 configure --srcdir=SRCDIR | |
644 | |
645 * If you are installing binaries for multiple architectures into a | |
646 single hierarchy, you will probably want to override the default | |
647 `bin' and `lib' directories, something like this: | |
648 configure --prefix=TEXMF --datadir=TEXMF \ | |
649 --bindir=TEXMF/ARCH/bin --libdir=TEXMF/ARCH/lib | |
650 make texmf=TEXMF | |
651 (Unless you make provisions for architecture-specific files in | |
652 other ways, e.g., with Depot or an automounter.) | |
653 | |
654 * To compile with optimization (to compile without debugging, remove | |
655 the `-g'): | |
656 env CFLAGS="-g -O" sh configure ... | |
657 For a potential problem if you optimize, see *Note TeX or | |
658 Metafont failing: TeX or Metafont failing. | |
659 | |
660 | |
661 File: kpathsea.info, Node: Shared library, Prev: configure scenarios, Up: Running configure | |
662 | |
663 Shared library | |
664 .............. | |
665 | |
666 You can compile Kpathsea as a shared library on a few systems, by | |
667 specifying the option `--enable-shared' when you run `configure'. | |
668 | |
669 The main advantage in doing this is that the executables can then | |
670 share the code, thus decreasing memory and disk space requirements. | |
671 | |
672 On some systems, you can record the location of shared libraries in a | |
673 binary, usually by giving certain options to the linker. Then | |
674 individual users do not need to set their system's environment variable | |
675 (e.g., `LD_LIBRARY_PATH') to find shared libraries. If you want to do | |
676 this, you will need to add the necessary options to `LDFLAGS' yourself; | |
677 for example, on Solaris, include something like `-R${prefix}/lib'. | |
678 (Unfortunately, making this happen by default is very difficult, | |
679 because of interactions with an existing installed shared library.) | |
680 | |
681 Currently, shared library support is implemented only on SunOS 4 | |
682 (Solaris 1) and SunOS 5 (Solaris 2). If you're interested and willing | |
683 in adding support for other systems, please see the `configure' mode in | |
684 the `klibtool' script, especially the host-specific case statement | |
685 around line 250. | |
686 | |
687 | |
688 File: kpathsea.info, Node: Running make, Next: Installing files, Prev: Running configure, Up: Custom installation | |
689 | |
690 Running `make' | |
691 -------------- | |
692 | |
693 `make' (still in the top-level directory). This also creates the | |
694 `texmf.cnf' and `paths.h' files that define the default search paths, | |
695 and (by default) the `plain' and `latex' TeX formats. | |
696 | |
697 You can override directory names and other values at `make'-time. | |
698 `make/paths.make' lists the variables most commonly reset. For | |
699 example, `make default_texsizes=600' changes the list of fallback | |
700 resolutions. | |
701 | |
702 You can also override each of `configure''s environment variables | |
703 (*note configure environment::.). The Make variables have the same | |
704 names. | |
705 | |
706 Finally, you can supply additional options via the following | |
707 variables. (`configure' does not use these.) | |
708 | |
709 `XCPPFLAGS' | |
710 `XDEFS' | |
711 Preprocessor options. | |
712 | |
713 `XCFLAGS' | |
714 Compiler options. | |
715 | |
716 `XLDFLAGS' | |
717 Loader options (included at beginning of link commands). | |
718 | |
719 `XLOADLIBES' | |
720 More loader options (included at end of link commands). | |
721 | |
722 `XMAKEARGS' | |
723 Additional Make arguments passed to all sub-`make''s. You may need | |
724 to include assignments to the other variables here via `XMAKEARGS'; | |
725 for example: `make XMAKEARGS="CFLAGS=-O XDEFS=-DA4"'. | |
726 | |
727 It's generally a bad idea to use a different compiler (`CC') or | |
728 libraries (`LIBS') for compilation than you did for configuration, | |
729 since the values `configure' determined may then be incorrect. | |
730 | |
731 Adding compiler options to change the "universe" you are using | |
732 (typically BSD vs. system V) is generally a cause of trouble. It's | |
733 best to use the native environment, whatever that is; `configure' and | |
734 the software usually adapt best to that. In particular, under Solaris | |
735 2.x, you should not use the BSD-compatibility library (`libucb') or | |
736 include files (`ucbinclude'). | |
737 | |
738 If you want to use the Babel LaTeX package for support of non-English | |
739 typesetting, you need to modify some files before making the LaTeX | |
740 format. See the file `install.txt' in the Babel distribution. | |
741 | |
742 | |
743 File: kpathsea.info, Node: Installing files, Next: Cleaning up, Prev: Running make, Up: Custom installation | |
744 | |
745 Installing files | |
746 ---------------- | |
747 | |
748 The basic command is the usual `make install'. For security issues, | |
749 *note Security::.. | |
750 | |
751 The first time you install any manual in the GNU Info system, you | |
752 should add a line (you choose where) to the file `dir' in your | |
753 `$(infodir)' directory. Sample text for this is given near the top of | |
754 the Texinfo source files (`kpathsea/kpathsea.texi', | |
755 `dvipsk/dvips.texi', and `web2c/doc/web2c.texi'). If you have a recent | |
756 version of the GNU Texinfo distribution installed | |
757 (`ftp://prep.ai.mit.edu/pub/gnu/texinfo-3.9.tar.gz' or later), this | |
758 should happen automatically. | |
759 | |
760 On the offchance that this is your first Info installation, the `dir' | |
761 file I use is included in the distribution as `etc/dir-example'. | |
762 | |
763 You may wish to use one of the following targets, especially if you | |
764 are installing on multiple architectures: | |
765 * `make install-exec' to install in architecture-dependent | |
766 directories, i.e., ones that depend on the `$(exec_prefix)' Make | |
767 variable. This includes links to binaries, libraries, etc., not | |
768 just "executables". | |
769 | |
770 * `make install-data' to install in architecture-independent | |
771 directories, such as documentation, configuration files, pool | |
772 files, etc. | |
773 | |
774 If you use the Andrew File System, the normal path (e.g., PREFIX/bin) | |
775 only gets you to a read-only copy of the files, and you must specify a | |
776 different path for installation. The best way to do this is by setting | |
777 the `prefix' variable on the `make' command line. The sequence becomes | |
778 something like this: | |
779 configure --prefix=/whatever | |
780 make | |
781 make install prefix=/afs/.SYSTEM.NAME/system/1.3/@sys/whatever | |
782 With AFS, you will definitely want to use relative filenames in | |
783 `ls-R' (*note Filename database::.), not absolute filenames. This is | |
784 done by default, but check anyway. | |
785 | |
786 | |
787 File: kpathsea.info, Node: Cleaning up, Next: Filename database generation, Prev: Installing files, Up: Custom installation | |
788 | |
789 Cleaning up | |
790 ----------- | |
791 | |
792 The basic command is `make distclean'. This removes all files created | |
793 by the build. | |
794 | |
795 Alternatively, | |
796 * `make mostlyclean' if you intend to compile on another | |
797 architecture. For Web2c, since the generated C files are portable, | |
798 they are not removed. If the `lex' vs. `flex' situation is going | |
799 to be different on the next machine, `rm web2c/lex.yy.c'. | |
800 | |
801 * `make clean' to remove files created by compiling, but leave | |
802 configuration files and Makefiles. | |
803 | |
804 * `make maintainer-clean' to remove everything that the Makefiles can | |
805 rebuild. This is more than `distclean' removes, and you should | |
806 only use it if you are thoroughly conversant with (and have the | |
807 necessary versions of) Autoconf. | |
808 | |
809 * `make extraclean' to remove other junk, e.g., core files, log | |
810 files, patch rejects. This is independent of the other `clean' | |
811 targets. | |
812 | |
813 | |
814 File: kpathsea.info, Node: Filename database generation, Next: MakeTeX scripts, Prev: Cleaning up, Up: Custom installation | |
815 | |
816 Filename database generation | |
817 ---------------------------- | |
818 | |
819 You will probably want to set up a `cron' entry on the appropriate | |
820 machine(s) to rebuild the filename database nightly or so, as in: | |
821 0 0 * * * cd TEXMF && /BINDIR/MakeTeXls-R | |
822 *Note Filename database::. | |
823 | |
824 Although the `MakeTeX...' scripts make every effort to add | |
825 newly-created files on the fly, it can't hurt to make sure you get a | |
826 fresh version every so often. | |
827 | |
828 | |
829 File: kpathsea.info, Node: MakeTeX scripts, Next: Installation testing, Prev: Filename database generation, Up: Custom installation | |
830 | |
831 `MakeTeX' scripts | |
832 ----------------- | |
833 | |
834 If Kpathsea cannot otherwise find a file, for some file types it is | |
835 configured by default to invoke an external program to create it | |
836 dynamically (*note MakeTeX configuration::.). This is most useful for | |
837 fonts (bitmaps, TFM's, and arbitrarily-sizable Metafont sources such as | |
838 the Sauter and DC fonts), since any given document can use fonts never | |
839 before referenced. Trying to build all fonts in advance is therefore | |
840 impractical, if not impossible. | |
841 | |
842 The script is passed the name of the file to create and possibly other | |
843 arguments, as explained below. It must echo the full pathname of the | |
844 file it created (and nothing else) to standard output; it can write | |
845 diagnostics to standard error. | |
846 | |
847 * Menu: | |
848 | |
849 * MakeTeX configuration:: | |
850 * MakeTeX script names:: | |
851 * MakeTeX script arguments:: | |
852 | |
853 | |
854 File: kpathsea.info, Node: MakeTeX configuration, Next: MakeTeX script names, Up: MakeTeX scripts | |
855 | |
856 `MakeTeX' configuration | |
857 ....................... | |
858 | |
859 The following file types can run an external program to create missing | |
860 files: `pk', `tfm', `mf', `tex'; the scripts are named `MakeTeXPK', | |
861 `MakeTeXTFM', `MakeTeXMF', and `MakeTeXTeX'. | |
862 | |
863 In the absence of `configure' options specifying otherwise, | |
864 everything but `MakeTeXTeX' will be enabled by default. The `configure' | |
865 options to change the defaults are: | |
866 | |
867 --without-maketexmf-default | |
868 --without-maketexpk-default | |
869 --without-maketextfm-default | |
870 --with-maketextex-default | |
871 | |
872 The `configure' setting is overridden if the environment variable or | |
873 configuration file value named for the script is set; e.g., `MAKETEXPK' | |
874 (*note MakeTeX script arguments::.). | |
875 | |
876 As distributed, all the scripts source a file | |
877 `texmf/web2c/MakeTeX.site' if it exists, so you can override various | |
878 defaults. See `MakeTeXcommon', for instance, which defines the default | |
879 mode, resolution, directory permissions, some special directory names, | |
880 etc. If you prefer not to change the distributed scripts, you can | |
881 simply create `MakeTeX.site' with the appropriate definitions (you do | |
882 not need to create it if you have nothing to put in it). | |
883 `MakeTeX.site' has no special syntax; it's an arbitrary Bourne shell | |
884 script. The distribution contains a sample `MakeTeX.site' for you to | |
885 copy and modify as you please (it is not installed anywhere). | |
886 | |
887 In addition, you can configure a number of features with the | |
888 `MT_FEATURES' variable, which you can define: | |
889 * in `MakeTeX.site', as just mentioned; | |
890 | |
891 * by editing the file `MakeTeXnames.cnf', either before `make | |
892 install' (in the source hierarchy) or after (in the installed | |
893 hierarchy); | |
894 | |
895 * or in the environment. | |
896 | |
897 By default, `MakeTeXPK' installs fonts into the standard TeX | |
898 directory structure (*note TeX directory structure: TeX directory | |
899 structure.). It uses aliases and directory names from the Fontname | |
900 distribution (*note Introduction: (fontname)Top.). Most of the options | |
901 here change that. | |
902 | |
903 `appendonlydir' | |
904 Tell `MakeTeXmkdir' to create directories append-only, i.e., set | |
905 their sticky bit (*note Mode Structure: (fileutils)Mode | |
906 Structure.). | |
907 | |
908 `dosnames' | |
909 Use 8.3 names; e.g., `dpi600/cmr10.pk' instead of `cmr10.600pk'. | |
910 | |
911 `nomode' | |
912 Omit the directory level for the mode name; this is fine as long as | |
913 you generate fonts for only one mode. | |
914 | |
915 `strip' | |
916 Omit the font supplier and typeface name directory levels. | |
917 | |
918 `varfonts' | |
919 Put `MakeTeXPK'-generated fonts under the directory named by | |
920 `VARTEXFONTS'; the default value in `kpathsea/texmf.cnf.in' is | |
921 `/var/tex/fonts', as recommended by the `Linux File System | |
922 Standard' (but unless `varfonts' is enabled, nothing cares about | |
923 that value). | |
924 | |
925 The `varfonts' setting in `MT_FEATURES' is overridden by the | |
926 `USE_VARTEXFONTS' environment variable: if set to `1', the feature | |
927 is enabled, and if set to `0', the feature is disabled. | |
928 | |
929 | |
930 File: kpathsea.info, Node: MakeTeX script names, Next: MakeTeX script arguments, Prev: MakeTeX configuration, Up: MakeTeX scripts | |
931 | |
932 `MakeTeX' script names | |
933 ...................... | |
934 | |
935 The following table shows the default name of the script for each | |
936 possible file types. (The source is the variable `kpse_make_specs' in | |
937 `kpathsea/tex-make.c'.) | |
938 | |
939 `MakeTeXPK' | |
940 Glyph fonts. | |
941 | |
942 `MakeTeXTeX' | |
943 TeX input files. | |
944 | |
945 `MakeTeXMF' | |
946 Metafont input files. | |
947 | |
948 `MakeTeXTFM' | |
949 TFM files. | |
950 | |
951 These names are overridden by an environment variable specific to the | |
952 program--for example, `DVIPSMAKEPK' for Dvipsk. | |
953 | |
954 If a `MakeTeX...' script fails, the invocation is appended to a file | |
955 `missfont.log' (by default) in the current directory. You can then | |
956 execute the log file to create the missing files after fixing the | |
957 problem. | |
958 | |
959 If the current directory is not writable and the environment variable | |
960 or configuration file value `TEXMFOUTPUT' is set, its value is used. | |
961 Otherwise, nothing is written. The name `missfont.log' is overridden | |
962 by the `MISSFONT_LOG' environment variable or configuration file value. | |
963 | |
964 | |
965 File: kpathsea.info, Node: MakeTeX script arguments, Prev: MakeTeX script names, Up: MakeTeX scripts | |
966 | |
967 `MakeTeX' script arguments | |
968 .......................... | |
969 | |
970 The first argument to a `MakeTeX' script is always the name of the | |
971 file to be created. | |
972 | |
973 In the default `MakeTeXPK' implementation, from three to five | |
974 additional arguments may also passed, via environment variables: | |
975 | |
976 1. The resolution to make the font at (`KPATHSEA_DPI'). | |
977 | |
978 2. The "base dpi" the program is operating at (`MAKETEX_BASE_DPI'), | |
979 i.e., the assumed resolution of the output device. | |
980 | |
981 3. A "magstep" string suitable for the Metafont `mag' variable | |
982 (`MAKETEX_MAG'). | |
983 | |
984 4. Optionally, a Metafont mode name to assign to the Metafont `mode' | |
985 variable (`MAKETEX_MODE'). Otherwise, (the default) `MakeTeXPK' | |
986 guesses the mode from the resolution. *Note TeX directory | |
987 structure: TeX directory structure. | |
988 | |
989 5. Optionally, a directory name. If the directory is absolute, it is | |
990 used as-is. Otherwise, it is appended to the root destination | |
991 directory set in the script (from environment variables `DESTDIR' | |
992 or `MTP_DESTDIR' or a compile-time default). If this argument is | |
993 not supplied, the mode name is appended to the root destination | |
994 directory. | |
995 | |
996 Kpathsea sets `KPATHSEA_DPI' appropriately for each attempt at building | |
997 a font. It's up to the program using Kpathsea to set the others. | |
998 (*Note Calling sequence::.) | |
999 | |
1000 You can change the specification for the arguments passed to the | |
1001 external script by setting the environment variable named as the script | |
1002 name, but all capitals--`MAKETEXPK', for example. If you've changed | |
1003 the script name by setting (say) `DVIPSMAKEPK' to `foo', then the spec | |
1004 is taken from the environment variable `FOO'. | |
1005 | |
1006 The spec can contain any variable references, to the above variables | |
1007 or any others. As an example, the default spec for `MakeTeXPK' is: | |
1008 $KPATHSEA_DPI $MAKETEX_BASE_DPI $MAKETEX_MAG $MAKETEX_MODE | |
1009 | |
1010 The convention of passing the name of the file to be created as the | |
1011 first argument cannot be changed. | |
1012 | |
1013 | |
1014 File: kpathsea.info, Node: Installation testing, Prev: MakeTeX scripts, Up: Custom installation | |
1015 | |
1016 Installation testing | |
1017 -------------------- | |
1018 | |
1019 Besides the tests listed in *Note Simple installation::, you can try | |
1020 running `make check'. This includes the torture tests (trip, trap, and | |
1021 mptrap) that come with Web2c (*note Torture tests: (web2c)Torture | |
1022 tests.). | |
1023 | |
1024 | |
1025 File: kpathsea.info, Node: Security, Next: TeX directory structure, Prev: Custom installation, Up: Installation | |
1026 | |
1027 Security | |
1028 ======== | |
1029 | |
1030 None of the programs in the TeX system require any special system | |
1031 privileges, so there's no first-level security concern of people gaining | |
1032 illegitimate root access. | |
1033 | |
1034 A TeX document, however, can write to arbitrary files, e.g., | |
1035 `~/.rhosts', and thus an unwitting user who runs TeX on a random | |
1036 document is vulnerable to a trojan horse attack. This loophole is | |
1037 closed by default, but you can be permissive if you so desire in | |
1038 `texmf.cnf'. *Note tex invocation: (web2c)tex invocation. MetaPost has | |
1039 the same issue. | |
1040 | |
1041 Dvips, Xdvi, and TeX can also execute shell commands under some | |
1042 circumstances. To disable this, see the `-R' option in *Note Option | |
1043 details: (dvips)Option details, the xdvi man page, and *Note tex | |
1044 invocation: (web2c)tex invocation, respectively. | |
1045 | |
1046 Another security issue arises because it's very useful--almost | |
1047 necessary--to make arbitrary fonts on user demand with `MakeTeXPK' and | |
1048 friends. Where do these files get installed? By default, the | |
1049 `MakeTeXPK' distributed with Kpathsea assumes a globally writable | |
1050 `texmf' tree; this is the simplest and most convenient approach, but it | |
1051 may not suit your situation. | |
1052 | |
1053 The first restriction you can apply is to make newly-created | |
1054 directories under `texmf' be append-only with an option in | |
1055 `MakeTeXnames.cnf'. *Note MakeTeX configuration::. | |
1056 | |
1057 Another approach is to establish a group (or user) for TeX files, | |
1058 make the `texmf' tree writable only to that group (or user), and make | |
1059 `MakeTeXPK' et al. setgid to that group (or setuid to that user). Then | |
1060 users must invoke the scripts to install things. (If you're worried | |
1061 about the inevitable security holes in scripts, then you could write a | |
1062 C wrapper to exec the script.) | |
1063 | |
1064 Finally, using a central writable `texmf' tree may be completely | |
1065 impossible, because it's on an NFS filesystem that you cannot export | |
1066 read/write, or AFS is in use, or simply because "it's policy". Then | |
1067 you must resort to each user's machine having its own local directory of | |
1068 dynamically-created fonts; again, `MakeTeXnames.cnf' has an option to | |
1069 do this, and again, *note MakeTeX configuration::.. | |
1070 | |
1071 | |
1072 File: kpathsea.info, Node: TeX directory structure, Next: unixtex.ftp, Prev: Security, Up: Installation | |
1073 | |
1074 TeX directory structure | |
1075 ======================= | |
1076 | |
1077 This section describes the default installation hierarchy of the | |
1078 distribution. It conforms to both the GNU coding standards and the TeX | |
1079 directory structure (TDS) standard. For rationale and further | |
1080 explanation, please see those documents. The GNU standard is available | |
1081 as `ftp://prep.ai.mit.edu/pub/gnu/standards/standards.texi' and | |
1082 mirrors. The TDS document is available from `CTAN:/tex-archive/tds' | |
1083 (*note unixtex.ftp::.). | |
1084 | |
1085 You can change the default paths in many ways (*note Changing search | |
1086 paths::.). One common desire is to put everything (binaries and all) | |
1087 under a single top-level directory such as `/usr/local/texmf' or | |
1088 `/opt/texmf'--in the terms used below, make PREFIX and TEXMF the same. | |
1089 For specific instructions on doing that, *note configure scenarios::.. | |
1090 | |
1091 Here is a skeleton of the default directory structure, extracted from | |
1092 the TDS document: | |
1093 | |
1094 PREFIX/ installation root (`/usr/local' by default) | |
1095 bin/ executables | |
1096 man/ man pages | |
1097 include/ C header files | |
1098 info/ GNU info files | |
1099 lib/ libraries (`libkpathsea.*') | |
1100 share/ architecture-independent files | |
1101 texmf/ TDS root | |
1102 bibtex/ BibTeX input files | |
1103 bib/ BibTeX databases | |
1104 base/ base distribution (e.g., `xampl.bib') | |
1105 misc/ single-file databases | |
1106 PKG/ name of a package | |
1107 bst/ BibTeX style files | |
1108 base/ base distribution (e.g., `plain.bst', `acm.bst') | |
1109 misc/ single-file styles | |
1110 PKG/ name of a package | |
1111 doc/ additional documentation | |
1112 dvips/ `.pro', `.ps', `psfonts.map' | |
1113 fonts/ font-related files | |
1114 TYPE/ file type (e.g., `tfm', `pk') | |
1115 MODE/ type of output device (types `pk' and `gf' only) | |
1116 SUPPLIER/ name of a font supplier (e.g., `public') | |
1117 TYPEFACE/ name of a typeface (e.g., `cm') | |
1118 dpiNNN/ font resolution (types `pk' and `gf' only) | |
1119 metafont/ Metafont (non-font) input files | |
1120 base/ base distribution (e.g., `plain.mf') | |
1121 misc/ single-file packages (e.g., `modes.mf') | |
1122 PKG/ name of a package (e.g., `mfpic') | |
1123 metapost/ MetaPost input files | |
1124 base/ base distribution (e.g., `plain.mp') | |
1125 misc/ single-file packages | |
1126 PKG/ name of a package | |
1127 support/ support files for MetaPost-related utilities (e.g., `trfonts.map') | |
1128 mft/ `MFT' inputs (e.g., `plain.mft') | |
1129 tex/ TeX input files | |
1130 FORMAT/ name of a format (e.g., `plain') | |
1131 base/ base distribution for FORMAT (e.g., `plain.tex') | |
1132 misc/ single-file packages (e.g., `webmac.tex') | |
1133 local/ local additions to or local configuration files for FORMAT | |
1134 PKG/ name of a package (e.g., `graphics', `mfnfss') | |
1135 generic/ format-independent packages | |
1136 hyphen/ hyphenation patterns (e.g., `hyphen.tex') | |
1137 images/ image input files (e.g., Encapsulated PostScript) | |
1138 misc/ single-file format-independent packages (e.g., `null.tex'). | |
1139 PKG/ name of a package (e.g., `babel') | |
1140 web2c/ implementation-dependent files (`.pool', `.fmt', `texmf.cnf', etc.) | |
1141 | |
1142 Some concrete examples for most file types: | |
1143 | |
1144 /usr/local/bin/tex | |
1145 /usr/local/man/man1/xdvi.1 | |
1146 /usr/local/info/kpathsea.info | |
1147 /usr/local/lib/libkpathsea.a | |
1148 /usr/local/share/texmf/bibtex/bst/base/plain.bst | |
1149 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmr10.600pk | |
1150 /usr/local/share/texmf/fonts/source/public/pandora/pnr10.mf | |
1151 /usr/local/share/texmf/fonts/tfm/public/cm/cmr10.tfm | |
1152 /usr/local/share/texmf/fonts/type1/adobe/utopia/putr.pfa | |
1153 /usr/local/share/texmf/metafont/base/plain.mf | |
1154 /usr/local/share/texmf/metapost/base/plain.mp | |
1155 /usr/local/share/texmf/tex/plain/base/plain.tex | |
1156 /usr/local/share/texmf/tex/generic/hyphen/hyphen.tex | |
1157 /usr/local/share/texmf/web2c/tex.pool | |
1158 /usr/local/share/texmf/web2c/tex.fmt | |
1159 /usr/local/share/texmf/web2c/texmf.cnf | |
1160 | |
1161 | |
1162 File: kpathsea.info, Node: unixtex.ftp, Next: Reporting bugs, Prev: TeX directory structure, Up: Installation | |
1163 | |
1164 `unixtex.ftp': Obtaining TeX | |
1165 ============================ | |
1166 | |
1167 This is `ftp://ftp.tug.org/tex/unixtex.ftp', last updated 7 February | |
1168 1997. Also available as `http://www.tug.org/unixtex.ftp'. The IP | |
1169 address is currently [158.121.106.10], and the canonical host name is | |
1170 currently `tug.cs.umb.edu'. It is also in Kpathsea source | |
1171 distributions as `etc/unixtex.ftp' (although the network version is | |
1172 usually newer). Mail <kb@mail.tug.org> with comments or questions. | |
1173 | |
1174 Following are general instructions for Unix or other sites who wish to | |
1175 acquire the Web2c distribution, (plain) TeX, LaTeX (2e), BibTeX, | |
1176 Metafont, MetaPost, DVI processors for the X window system, PostScript, | |
1177 the PCL language in the HP LaserJet, and related programs. They are | |
1178 oriented towards building from the original sources, though some | |
1179 information on alternative packages is included in the last section. | |
1180 See also `http://www.tug.org/web2c', the Web2c and Kpathsea home page. | |
1181 | |
1182 Please consider joining the TeX Users Group (TUG) to help support the | |
1183 maintenance and development of the programs you retrieve. Email | |
1184 <tug@tug.org> or see `http://www.tug.org' for information and a | |
1185 membership form. | |
1186 | |
1187 For actual installation instructions after obtaining the necessary | |
1188 sources, *note Installation::.. A copy is in the distribution file | |
1189 `kpathsea/INSTALL'. | |
1190 | |
1191 * Menu: | |
1192 | |
1193 * Electronic distribution:: CTAN and so forth. | |
1194 * CD-ROM distribution:: | |
1195 * Tape distribution:: | |
1196 * Other TeX packages:: | |
1197 | |
1198 | |
1199 File: kpathsea.info, Node: Electronic distribution, Next: CD-ROM distribution, Up: unixtex.ftp | |
1200 | |
1201 Electronic distribution | |
1202 ----------------------- | |
1203 | |
1204 In many places we refer to CTAN:. This is *both* a host name and a | |
1205 directory name. Here are some primary locations: | |
1206 | |
1207 `ftp://ftp.cdrom.com/pub/tex/ctan' (California, USA) | |
1208 `ftp://ftp.dante.de/tex-archive' (Germany) | |
1209 `ftp://ftp.tex.ac.uk/tex-archive' (England) | |
1210 | |
1211 CTAN has many mirrors worldwide; see the top-level file | |
1212 `README.mirrors' from one of the sites above, or finger | |
1213 <ctan@ftp.tug.org>, or see `http://www.tug.org/CTAN.sites'. A list | |
1214 current as of the time of distribution is in the top-level file | |
1215 `./MIRROR'. | |
1216 | |
1217 You can also access CTAN via the World Wide Web, Gopher, electronic | |
1218 mail, or NFS. The same `README.mirrors' file explains how. | |
1219 | |
1220 You will need to retrieve some or all of the following archives, | |
1221 depending on your needs (don't forget to set binary mode for file | |
1222 transfers): | |
1223 | |
1224 `CTAN:/systems/web2c/texmflib.tar.gz' | |
1225 A basic collection of fonts (TFM files only) and macro packages | |
1226 (including Texinfo and LaTeX 2e). It unpacks into `texmf/'; if | |
1227 you change the structure of this hierarchy, you will also have to | |
1228 change the default search paths (*note Changing search paths::.). | |
1229 It is required unless you already have these files, in which case | |
1230 you should change the default paths as necessary to find them. | |
1231 | |
1232 `CTAN:/systems/web2c/web.tar.gz' | |
1233 The original WEB source files, written mostly by Don Knuth. | |
1234 Required unless you already have this `web' version. (The WEB | |
1235 sources change irregularly with respect to Web2c itself.) Unpacks | |
1236 into `web2c-VERSION'. | |
1237 | |
1238 `CTAN:/systems/web2c/web2c.tar.gz' | |
1239 The Web2c system. Required. Also unpacks into `web2c-VERSION'. | |
1240 | |
1241 `CTAN:/dviware/dvipsk.tar.gz' | |
1242 DVI-to-PostScript translator. Unpacks into `dvipsk-VERSION'. | |
1243 Optional. | |
1244 | |
1245 `CTAN:/dviware/xdvik.tar.gz' | |
1246 X window system DVI previewer. Unpacks into `xdvik-VERSION'. | |
1247 Optional. | |
1248 | |
1249 `CTAN:/dviware/dviljk.tar.gz' | |
1250 DVI-to-PCL (HP LaserJet) translator. Unpacks into | |
1251 `dviljk-VERSION'. Optional. | |
1252 | |
1253 All that said, the originating host for the software above is | |
1254 `ftp.tug.org'. You can retrieve these distributions (but not much | |
1255 else) from the `tex/' directory on that host. | |
1256 | |
1257 | |
1258 File: kpathsea.info, Node: CD-ROM distribution, Next: Tape distribution, Prev: Electronic distribution, Up: unixtex.ftp | |
1259 | |
1260 CD-ROM distribution | |
1261 ------------------- | |
1262 | |
1263 Numerous organizations distribute various TeX CD-ROM's: | |
1264 | |
1265 * TUG, UK TUG, and GUTenberg (French-speaking TeX user group) | |
1266 collaborated to produce the `TeX Live' CD-ROM, based on teTeX, | |
1267 which in turn is based on Web2c; email <tex-live@mail.tug.org> or | |
1268 see `http://www.tug.org/tex-live.html'. | |
1269 | |
1270 * NTG (Dutch-speaking TeX user group) produced the 4allTeX CD-ROM; | |
1271 email <ntg@nic.surfnet.nl>, or see | |
1272 `http://ei0.ei.ele.tue.nl/ntg/'. This is a runnable system. | |
1273 | |
1274 * The Free Software Foundation's `Source Code CD-ROM' contains the | |
1275 minimal TeX source distribution described in the previous section | |
1276 (i.e., enough to print GNU documentation); email | |
1277 <gnu@prep.ai.mit.edu> or finger <fsf@prep.ai.mit.edu>. | |
1278 | |
1279 * The Gateway! CD-ROM set contains a runnable NetBSD/Amiga | |
1280 distribution and sources; see | |
1281 `http://www.netbsd.org/Sites/cdroms.html'. | |
1282 | |
1283 * The Prime Time TeXcetera CD-ROM is a copy of CTAN (see the previous | |
1284 section); email <ptf@ctcl.com> or see `http://www.ptf.com/ptf/'. | |
1285 | |
1286 * Walnut Creek's TeX CD-ROM is also a copy of CTAN; email | |
1287 <info@cdrom.com> or see `http://www.cdrom.com:/titles/tex.html'. | |
1288 | |
1289 * Most Linux distributions include some TeX package based on Web2c; | |
1290 see the Linux documentation file `Distribution-HOWTO' for a | |
1291 comparison of Linux distributions, available (for example) via | |
1292 `http://www.linux.org'. | |
1293 | |
1294 If you know of additional TeX CD-ROM distributions to add to this | |
1295 list, please inform <kb@mail.tug.org>. | |
1296 | |
1297 | |
1298 File: kpathsea.info, Node: Tape distribution, Next: Other TeX packages, Prev: CD-ROM distribution, Up: unixtex.ftp | |
1299 | |
1300 Tape distribution | |
1301 ----------------- | |
1302 | |
1303 You can obtain a complete TeX distribution, including Web2c, on tape. | |
1304 Contact: | |
1305 Pierre MacKay / Denny Hall, Mail Stop DH-10 / Department of Classics | |
1306 University of Washington / Seattle, WA 98195 / USA | |
1307 phone: 206-543-2268; email: <unixtex@u.washington.edu> | |
1308 | |
1309 At this writing, the distribution is available in `tar' format on 1/4 | |
1310 inch 4-track QIC-24 cartridges and 4mm DAT cartridges, and the cost is | |
1311 US$210. Make checks payable to the University of Washington, drawn on | |
1312 a U.S. bank. Purchase orders are acceptable, but they carry an extra | |
1313 charge of $10 to pay for invoice processing. Overseas sites, please | |
1314 add $20 for shipment via air parcel post, or $30 for shipment via | |
1315 courier. | |
1316 | |
1317 | |
1318 File: kpathsea.info, Node: Other TeX packages, Prev: Tape distribution, Up: unixtex.ftp | |
1319 | |
1320 Other TeX packages | |
1321 ------------------ | |
1322 | |
1323 Many other TeX implementations are available in `CTAN:/systems', | |
1324 including ready-to-run distributions for Unix, Amiga, Acorn, VMS, | |
1325 Macintosh, DOS, and Windows (in various forms). Although Web2c has | |
1326 support in the source code for many operating systems, and in fact some | |
1327 of the other distributions are based on it, it's unlikely to work as | |
1328 distributed on anything but Unix. (Please contribute improvements!) | |
1329 | |
1330 The Unix distribution alluded to above is the teTeX distribution. | |
1331 This includes both complete sources and precompiled binaries for many | |
1332 popular Unix variants, including Linux. It is based on Web2c, and | |
1333 contains many other TeX-related programs as well. | |
1334 | |
1335 The host labrea.stanford.edu is the original source for the files for | |
1336 which Donald Knuth is directly responsible: `tex.web', `plain.tex', | |
1337 etc. However, unless you want to build your TeX library tree ab initio, | |
1338 it is more reliable and less work to retrieve these files as part of | |
1339 the above packages. In any case, labrea is not the canonical source for | |
1340 anything except what was created by Stanford TeX project, so do not | |
1341 rely on all the files available at that ftp site being up-to-date. | |
1342 | |
1343 | |
1344 File: kpathsea.info, Node: Reporting bugs, Prev: unixtex.ftp, Up: Installation | |
1345 | |
1346 Reporting bugs | |
1347 ============== | |
1348 | |
1349 (A copy of this chapter is in the file `kpathsea/BUGS'.) | |
1350 | |
1351 If you have problems or suggestions, please report them to | |
1352 <tex-k@mail.tug.org> using the bug checklist below. | |
1353 | |
1354 Please report bugs in the documentation; not only factual errors or | |
1355 inconsistent behavior, but unclear or incomplete explanations, typos, | |
1356 wrong fonts, ... | |
1357 | |
1358 * Menu: | |
1359 | |
1360 * Bug checklist:: What to include in a good bug report. | |
1361 * Mailing lists:: Joining the bugs or announcements mailing lists. | |
1362 * Debugging:: Analyzing runtime problems. | |
1363 * Logging:: Recording searches. | |
1364 * Common problems:: When things go wrong. | |
1365 | |
1366 | |
1367 File: kpathsea.info, Node: Bug checklist, Next: Mailing lists, Up: Reporting bugs | |
1368 | |
1369 Bug checklist | |
1370 ------------- | |
1371 | |
1372 Before reporting a bug, please check below to be sure it isn't already | |
1373 known (*note Common problems::.). | |
1374 | |
1375 Bug reports should be sent via electronic mail to | |
1376 <tex-k@mail.tug.org>, or by postal mail to 135 Center Hill Road / | |
1377 Plymouth, MA 02360 / USA. | |
1378 | |
1379 The general principle is that a good bug report includes all the | |
1380 information necessary for reproduction. Therefore, to enable | |
1381 investigation, your report should include the following: | |
1382 | |
1383 * The version number(s) of the program(s) involved, and of Kpathsea | |
1384 itself. You can get the former by giving a sole option `--version' | |
1385 to the program, and the latter by running `kpsewhich --version'. | |
1386 The `NEWS' and `ChangeLog' files also contain the version number. | |
1387 | |
1388 * The hardware, operating system (including version number), | |
1389 compiler, and `make' program you are using (the output of `uname | |
1390 -a' is a start on the first two, though often incomplete). If the | |
1391 bug involves the X window system, include X version and supplier | |
1392 information as well (examples: X11R6 from MIT; X11R4 from HP; | |
1393 OpenWindows 3.3 bundled with SunOS 4.1.4). | |
1394 | |
1395 * Any options you gave to `configure'. This is recorded in the | |
1396 `config.status' files. | |
1397 | |
1398 If you are reporting a bug in `configure' itself, it's probably | |
1399 system-dependent, and it will be unlikely the maintainers can do | |
1400 anything useful if you merely report that thus-and-such is broken. | |
1401 Therefore, you need to do some additional work: for some bugs, you | |
1402 can look in the file `config.log' where the test that failed should | |
1403 appear, along with the compiler invocation and source program in | |
1404 question. You can then compile it yourself by hand, and discover | |
1405 why the test failed. Other `configure' bugs do not involve the | |
1406 compiler; in that case, the only recourse is to inspect the | |
1407 `configure' shell script itself, or the Autoconf macros that | |
1408 generated `configure'. | |
1409 | |
1410 * The log of all debugging output, if the bug is in path searching. | |
1411 You can get this by setting the environment variable | |
1412 `KPATHSEA_DEBUG' to `-1' before running the program. Please look | |
1413 at the log yourself to make sure the behavior is really a bug | |
1414 before reporting it; perhaps "old" environment variable settings | |
1415 are causing files not to be found, for example. | |
1416 | |
1417 * The contents of any input files necessary to reproduce the bug. | |
1418 For bugs in DVI-reading programs, for example, this generally | |
1419 means a DVI file (and any EPS or other files it uses)--TeX source | |
1420 files are helpful, but the DVI file is necessary, because that's | |
1421 the actual program input. | |
1422 | |
1423 GNU `shar', available from `ftp://prep.ai.mit.edu/pub/gnu' is a | |
1424 convenient way of packaging multiple (possibly binary) files for | |
1425 electronic mail. If you feel your input files are too big to send | |
1426 by email, you can ftp them to `ftp://ftp.tug.org/incoming' (that | |
1427 directory is writable, but not readable). | |
1428 | |
1429 * If you are sending a patch (do so if you can!), please do so in | |
1430 the form of a context diff (`diff -c') against the original | |
1431 distribution source. Any other form of diff is either not as | |
1432 complete or harder for me to understand. Please also include a | |
1433 `ChangeLog' entry. | |
1434 | |
1435 * If the bug involved is an actual crash (i.e., core dump), it is | |
1436 easy and useful to include a stack trace from a debugger (I | |
1437 recommend the GNU debugger GDB, available from | |
1438 `ftp://prep.ai.mit.edu/pub/gnu'). If the cause is apparent (a | |
1439 `NULL' value being dereferenced, for example), please send the | |
1440 details along. If the program involved is TeX or Metafont, and | |
1441 the crash is happening at apparently-sound code, however, the bug | |
1442 may well be in the compiler, rather than in the program or the | |
1443 library (*note TeX or Metafont failing: TeX or Metafont failing.). | |
1444 | |
1445 * Any additional information that will be helpful in reproducing, | |
1446 diagnosing, or fixing the bug. | |
1447 | |
1448 | |
1449 File: kpathsea.info, Node: Mailing lists, Next: Debugging, Prev: Bug checklist, Up: Reporting bugs | |
1450 | |
1451 Mailing lists | |
1452 ------------- | |
1453 | |
1454 Web2c and Kpathsea in general are discussed on the mailing list | |
1455 <tex-k@mail.tug.org>. To join, email <tex-k-request@mail.tug.org> with | |
1456 a line consisting of | |
1457 | |
1458 subscribe YOU@YOUR.PREFERRED.EMAIL.ADDRESS | |
1459 | |
1460 in the body of the message. | |
1461 | |
1462 You do not need to join to submit a report, nor will it affect whether | |
1463 you get a response. There is no Usenet newsgroup equivalent (if you can | |
1464 be the one to set this up, email `tex-k-request'). Traffic on the list | |
1465 is fairly light, and is mainly bug reports and enhancement requests to | |
1466 the software. The best way to decide if you want to join or not is | |
1467 read some of the archives from `ftp://ftp.tug.org/mail/archives/tex-k/'. | |
1468 | |
1469 Be aware that large data files are sometimes included in bug reports. | |
1470 If this is a problem for you, do not join the list. | |
1471 | |
1472 If you only want announcements of new releases, not bug reports and | |
1473 discussion, join <tex-archive@math.utah.edu> (via mail to | |
1474 <tex-archive-request@math.utah.edu>). | |
1475 | |
1476 If you are looking for general TeX help, such as how to use LaTeX, | |
1477 please use the mailing list <info-tex@shsu.edu> mailing list, which is | |
1478 gatewayed to the `comp.text.tex' Usenet newsgroup (or post to the | |
1479 newsgroup; the gateway is bidirectional). | |
1480 | |
1481 | |
1482 File: kpathsea.info, Node: Debugging, Next: Logging, Prev: Mailing lists, Up: Reporting bugs | |
1483 | |
1484 Debugging | |
1485 --------- | |
1486 | |
1487 Kpathsea provides a number of runtime debugging options, detailed | |
1488 below by their names and corresponding numeric values. When the files | |
1489 you expect aren't being found, the thing to do is enable these options | |
1490 and examine the output. | |
1491 | |
1492 You can set these with some runtime argument (e.g., `-d') to the | |
1493 program; in that case, you should use the numeric values described in | |
1494 the program's documentation (which, for Dvipsk and Xdvik, are different | |
1495 than those below). It's best to give the `-d' (or whatever) option | |
1496 first, for maximal output. Dvipsk and Xdvik have additional | |
1497 program-specific debugging options as well. | |
1498 | |
1499 You can also set the environment variable `KPATHSEA_DEBUG'; in this | |
1500 case, you should use the numbers below. Also, if you run the program | |
1501 under a debugger and set the variable `kpathsea_debug', Also use the | |
1502 numbers below | |
1503 | |
1504 In any case, by far the simplest value to use is `-1', which will | |
1505 turn on all debugging output. This is usually better than guessing | |
1506 which particular values will yield the output you need. | |
1507 | |
1508 Debugging output always goes to standard error, so you can redirect it | |
1509 easily. For example, in Bourne-compatible shells: | |
1510 dvips -d -1 ... 2>/tmp/debug | |
1511 | |
1512 It is sometimes helpful to run the standalone Kpsewhich utility | |
1513 (*note Invoking kpsewhich::.), instead of the original program. | |
1514 | |
1515 In any case, you can *not* use the *names* below; you must always use | |
1516 somebody's numbers. (Sorry.) To set more than one option, just sum | |
1517 the corresponding numbers. | |
1518 | |
1519 `KPSE_DEBUG_STAT (1)' | |
1520 Report `stat'(2) calls. This is useful for verifying that your | |
1521 directory structure is not forcing Kpathsea to do many additional | |
1522 file tests (*note Slow path searching::., and *note Subdirectory | |
1523 expansion::.). If you are using an up-to-date `ls-R' database | |
1524 (*note Filename database::.), this should produce no output unless | |
1525 a nonexistent file that must exist is searched for. | |
1526 | |
1527 `KPSE_DEBUG_HASH (2)' | |
1528 Report lookups in all hash tables: `ls-R' and `aliases' (*note | |
1529 Filename database::.); font aliases (*note Fontmap::.); and config | |
1530 file values (*note Config files::.). Useful when expected values | |
1531 are not being found, e.g.., file searches are looking at the disk | |
1532 instead of using `ls-R'. | |
1533 | |
1534 `KPSE_DEBUG_FOPEN (4)' | |
1535 Report file openings and closings. Especially useful when your | |
1536 system's file table is full, for seeing which files have been | |
1537 opened but never closed. In case you want to set breakpoints in a | |
1538 debugger: this works by redefining `fopen' (`fclose') to be | |
1539 `kpse_fopen_trace' (`kpse_fclose_trace'). | |
1540 | |
1541 `KPSE_DEBUG_PATHS (8)' | |
1542 Report general path information for each file type Kpathsea is | |
1543 asked to search. This is useful when you are trying to track down | |
1544 how a particular path got defined--from `texmf.cnf', `config.ps', | |
1545 an environment variable, the compile-time default, etc. This is | |
1546 the contents of the `kpse_format_info_type' structure defined in | |
1547 `tex-file.h'. | |
1548 | |
1549 `KPSE_DEBUG_EXPAND (16)' | |
1550 Report the directory list corresponding to each path element | |
1551 Kpathsea searches. This is only relevant when Kpathsea searches | |
1552 the disk, since `ls-R' searches don't look through directory lists | |
1553 in this way. | |
1554 | |
1555 `KPSE_DEBUG_SEARCH (32)' | |
1556 Report on each file search: the name of the file searched for, the | |
1557 path searched in, whether or not the file must exist (when drivers | |
1558 search for `cmr10.vf', it need not exist), and whether or not we | |
1559 are collecting all occurrences of the file in the path (as with, | |
1560 e.g., `texmf.cnf' and `texfonts.map'), or just the first (as with | |
1561 most lookups). This can help you correlate what Kpathsea is doing | |
1562 with what is in your input file. | |
1563 | |
1564 Debugging output from Kpathsea is always written to standard error, | |
1565 and begins with the string `kdebug:'. (Except for hash table buckets, | |
1566 which just start with the number, but you can only get that output | |
1567 running under a debugger. See comments at the `hash_summary_only' | |
1568 variable in `kpathsea/db.c'.) | |
1569 | |
1570 | |
1571 File: kpathsea.info, Node: Logging, Next: Common problems, Prev: Debugging, Up: Reporting bugs | |
1572 | |
1573 Logging | |
1574 ------- | |
1575 | |
1576 Kpathsea can record the time and filename found for each successful | |
1577 search. This may be useful in finding good candidates for deletion when | |
1578 your filesystem is full, or in discovering usage patterns at your site. | |
1579 | |
1580 To do this, define the environment or config file variable | |
1581 `TEXMFLOG'. The value is the name of the file to append the | |
1582 information to. The file is created if it doesn't exist, and appended | |
1583 to if it does. | |
1584 | |
1585 Each successful search turns into one line in the log file: two words | |
1586 separated by a space. The first word is the time of the search, as the | |
1587 integer number of seconds since "the epoch", i.e., UTC midnight 1 | |
1588 January 1970 (more precisely, the result of the `time' system call). | |
1589 The second word is the filename. | |
1590 | |
1591 For example, after `setenv TEXMFLOG /tmp/log', running Dvips on | |
1592 `story.dvi' appends the following lines: | |
1593 | |
1594 774455887 /usr/local/share/texmf/dvips/config.ps | |
1595 774455887 /usr/local/share/texmf/dvips/psfonts.map | |
1596 774455888 /usr/local/share/texmf/dvips/texc.pro | |
1597 774455888 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmbx10.600pk | |
1598 774455889 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmsl10.600pk | |
1599 774455889 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmr10.600pk | |
1600 774455889 /usr/local/share/texmf/dvips/texc.pro | |
1601 | |
1602 Only filenames that are absolute are recorded, to preserve some | |
1603 semblance of privacy. | |
1604 | |
1605 | |
1606 File: kpathsea.info, Node: Common problems, Prev: Logging, Up: Reporting bugs | |
1607 | |
1608 Common problems | |
1609 --------------- | |
1610 | |
1611 Here are some common problems with configuration, compilation, | |
1612 linking, execution, ... | |
1613 | |
1614 * Menu: | |
1615 | |
1616 * Unable to find files:: If your program can't find fonts (or whatever). | |
1617 * Slow path searching:: If it takes forever to find anything. | |
1618 * Unable to generate fonts:: If MakeTeXPK fails. | |
1619 * TeX or Metafont failing:: Likely compiler bugs. | |
1620 | |
1621 * XtStrings:: When _XtStrings is undefined. | |
1622 * dlopen:: When dlopen is undefined. | |
1623 * ShellWidgetClass:: For dynamic linking troubles under OpenWindows. | |
1624 * Pointer combination warnings:: For old compilers that don't grok char *. | |
1625 | |
1626 | |
1627 File: kpathsea.info, Node: Unable to find files, Next: Slow path searching, Up: Common problems | |
1628 | |
1629 Unable to find files | |
1630 .................... | |
1631 | |
1632 If a program complains it cannot find fonts (or other input files), | |
1633 any of several things might be wrong. In any case, you may find the | |
1634 debugging options helpful. *Note Debugging::. | |
1635 | |
1636 * Perhaps you simply haven't installed all the necessary files; the | |
1637 basic fonts and input files are distributed separately from the | |
1638 programs. *Note unixtex.ftp::. | |
1639 | |
1640 * You have (perhaps unknowingly) told Kpathsea to use search paths | |
1641 that don't reflect where the files actually are. One common cause | |
1642 is having environment variables set from a previous installation, | |
1643 thus overriding what you carefully set in `texmf.cnf' (*note | |
1644 Supported file formats::.). System `/etc/profile' or other files | |
1645 such may be the culprit. | |
1646 | |
1647 * Your files reside in a directory that is only pointed to via a | |
1648 symbolic link, in a leaf directory and is not listed in `ls-R'. | |
1649 | |
1650 Unfortunately, Kpathsea's subdirectory searching has an | |
1651 irremediable deficiency: If a directory D being searched for | |
1652 subdirectories contains plain files and symbolic links to other | |
1653 directories, but no true subdirectories, D will be considered a | |
1654 leaf directory, i.e., the symbolic links will not be followed. | |
1655 *Note Subdirectory expansion::. | |
1656 | |
1657 You can work around this problem by creating an empty dummy | |
1658 subdirectory in D. Then D will no longer be a leaf, and the | |
1659 symlinks will be followed. | |
1660 | |
1661 The directory immediately followed by the `//' in the path | |
1662 specification, however, is always searched for subdirectories, | |
1663 even if it is a leaf. Presumably you would not have asked for the | |
1664 directory to be searched for subdirectories if you didn't want it | |
1665 to be. | |
1666 | |
1667 * If the fonts (or whatever) don't already exist, `MakeTeXPK' (or | |
1668 `MakeTeXMF' or `MakeTeXTFM') will try to create them. If these | |
1669 rather complicated shell scripts fail, you'll eventually get an | |
1670 error message saying something like `Can't find font FONTNAME'. | |
1671 The best solution is to fix (or at least report) the bug in | |
1672 `MakeTeXPK'; the workaround is to generate the necessary fonts by | |
1673 hand with Metafont, or to grab them from a CTAN site (*note | |
1674 unixtex.ftp::.). | |
1675 | |
1676 * There is a bug in the library. *Note Reporting bugs::. | |
1677 | |
1678 | |
1679 File: kpathsea.info, Node: Slow path searching, Next: Unable to generate fonts, Prev: Unable to find files, Up: Common problems | |
1680 | |
1681 Slow path searching | |
1682 ................... | |
1683 | |
1684 If your program takes an excessively long time to find fonts or other | |
1685 input files, but does eventually succeed, here are some possible | |
1686 culprits: | |
1687 | |
1688 * Most likely, you just have a lot of directories to search, and that | |
1689 takes a noticeable time. The solution is to create and maintain a | |
1690 separate `ls-R' file that lists all the files in your main TeX | |
1691 hierarchy. *Note Filename database::. Kpathsea always uses `ls-R' | |
1692 if it's present; there's no need to recompile or reconfigure any | |
1693 of the programs. | |
1694 | |
1695 * Your recursively-searched directories (e.g., | |
1696 `/usr/local/share/texmf/fonts//'), contain a mixture of files and | |
1697 directories. This prevents Kpathsea from using a useful | |
1698 optimization (*note Subdirectory expansion::.). | |
1699 | |
1700 It is best to have only directories (and perhaps a `README') in the | |
1701 upper levels of the directory structure, and it's very important | |
1702 to have *only* files, and no subdirectories, in the leaf | |
1703 directories where the dozens of TFM, PK, or whatever files reside. | |
1704 | |
1705 In any case, you may find the debugging options helpful in determining | |
1706 precisely when the disk or network is being pounded. *Note Debugging::. | |
1707 | |
1708 | |
1709 File: kpathsea.info, Node: Unable to generate fonts, Next: TeX or Metafont failing, Prev: Slow path searching, Up: Common problems | |
1710 | |
1711 Unable to generate fonts | |
1712 ........................ | |
1713 | |
1714 This can happen if either `MakeTeXPK' hasn't been installed properly, | |
1715 or if the local installation of Metafont isn't correct. | |
1716 | |
1717 If `mf' is a command not found by `MakeTeXPK', then you need to | |
1718 install Metafont (*note unixtex.ftp::.). | |
1719 | |
1720 If Metafont runs, but generates fonts at the wrong resolution, you | |
1721 need to be sure the `M' and `D' lines in your Dvips configuration file | |
1722 match (*note Config files: (dvips)Config files.). For example, if | |
1723 `MakeTeXPK' is generating 300dpi fonts, but you need 600dpi fonts, you | |
1724 should have: | |
1725 M ljfour | |
1726 D 600 | |
1727 | |
1728 If Metafont runs but generates fonts at a resolution of 2602dpi (and | |
1729 prints out the name of each character as well as just a character | |
1730 number, and maybe tries to display the characters), then your Metafont | |
1731 base file probably hasn't been made properly. (It's using the default | |
1732 `proof' mode, instead of an actual device mode.) To make a proper | |
1733 `plain.base', assuming the local mode definitions are contained in a | |
1734 file `modes.mf', run the following command (assuming Unix): | |
1735 | |
1736 inimf "plain; input modes; dump" | |
1737 | |
1738 Then copy the `plain.base' file from the current directory to where the | |
1739 base files are stored on your system (`/usr/local/share/texmf/web2c' by | |
1740 default), and make a link (either hard or soft) from `plain.base' to | |
1741 `mf.base' in that directory. *Note inimf invocation: (web2c)inimf | |
1742 invocation. | |
1743 | |
1744 | |
1745 File: kpathsea.info, Node: TeX or Metafont failing, Next: XtStrings, Prev: Unable to generate fonts, Up: Common problems | |
1746 | |
1747 TeX or Metafont failing | |
1748 ....................... | |
1749 | |
1750 If TeX or Metafont get a segmentation fault or otherwise fail while | |
1751 running a normal input file, the problem is usually a compiler bug | |
1752 (unlikely as that may sound). Even if the trip and trap tests are | |
1753 passed, problems may lurk. Optimization occasionally causes trouble in | |
1754 programs other than TeX and Metafont themselves, too. | |
1755 | |
1756 Insufficient swap space may also cause core dumps or other erratic | |
1757 behavior. | |
1758 | |
1759 For a workaround, if you enabled any optimization flags, it's best to | |
1760 omit optimization entirely. In any case, the way to find the facts is | |
1761 to run the program under the debugger and see where it's failing. | |
1762 | |
1763 Also, if you have trouble with a system C compiler, I advise trying | |
1764 the GNU C compiler. And vice versa, unfortunately; but in that case I | |
1765 also recommend reporting a bug to the GCC mailing list; *note Bugs: | |
1766 (gcc)Bugs.. | |
1767 | |
1768 To report compiler bugs effectively requires perseverance and | |
1769 perspicacity: you must find the miscompiled line, and that usually | |
1770 involves delving backwards in time from the point of error, checking | |
1771 through TeX's (or whatever program's) data structures. Things are not | |
1772 helped by all-too-common bugs in the debugger itself. Good luck. | |
1773 | |
1774 | |
1775 File: kpathsea.info, Node: XtStrings, Next: dlopen, Prev: TeX or Metafont failing, Up: Common problems | |
1776 | |
1777 `XtStrings' | |
1778 ........... | |
1779 | |
1780 You may find that linking X programs results in an error from the | |
1781 linker that `XtStrings' is undefined, something like this: | |
1782 | |
1783 gcc -o virmf ... | |
1784 .../x11.c:130: undefined reference to `XtStrings' | |
1785 | |
1786 This generally happens because of a mismatch between the X include | |
1787 files with which you compiled and the X libraries with which you linked; | |
1788 often, the include files are from MIT and the libraries from Sun. | |
1789 | |
1790 The solution is to use the same X distribution for compilation and | |
1791 linking. Probably `configure' was unable to guess the proper | |
1792 directories from your installation. You can use the `configure' | |
1793 options `--x-includes=PATH' and `--x-libraries=PATH' to explicitly | |
1794 specify them. | |
1795 | |
1796 | |
1797 File: kpathsea.info, Node: dlopen, Next: ShellWidgetClass, Prev: XtStrings, Up: Common problems | |
1798 | |
1799 `dlopen' | |
1800 ........ | |
1801 | |
1802 (This section adapted from the file `dlsym.c' in the X distribution.) | |
1803 | |
1804 The `Xlib' library uses the standard C function `wcstombs'. Under | |
1805 SunOS 4.1, `wcstombs' uses the `dlsym' interface defined in `libdl.so'. | |
1806 Unfortunately, the SunOS 4.1 distribution does not include a static | |
1807 `libdl.a' library. | |
1808 | |
1809 As a result, if you try to link an X program statically under SunOS, | |
1810 you may get undefined references to `dlopen', `dlsym', and `dlclose'. | |
1811 One workaround is to include these definitions when you link: | |
1812 | |
1813 void *dlopen() { return 0; } | |
1814 void *dlsym() { return 0; } | |
1815 int dlclose() { return -1; } | |
1816 | |
1817 These are contained in the `dlsym.c' file in the MIT X distribution. | |
1818 | |
1819 | |
1820 File: kpathsea.info, Node: ShellWidgetClass, Next: Pointer combination warnings, Prev: dlopen, Up: Common problems | |
1821 | |
1822 `ShellWidgetClass' | |
1823 .................. | |
1824 | |
1825 (This section adapted from the comp.sys.sun.admin FAQ.) | |
1826 | |
1827 If you are linking with Sun's OpenWindows libraries in SunOS 4.1.x, | |
1828 you may get undefined symbols `_get_wmShellWidgetClass' and | |
1829 `_get_applicationShellWidgetClass' when linking. This problem does not | |
1830 arise using the standard MIT X libraries under SunOS. | |
1831 | |
1832 The cause is bugs in the `Xmu' shared library as shipped from Sun. | |
1833 There are several fixes: | |
1834 | |
1835 * Install the free MIT distribution from `ftp.x.org' and mirrors. | |
1836 | |
1837 * Get the OpenWindows patches listed below. | |
1838 | |
1839 * Statically link the `Xmu' library into the executable. | |
1840 | |
1841 * Avoid using `Xmu' at all. If you are compiling Metafont, *note | |
1842 Online Metafont graphics: (web2c)Online Metafont graphics.. If you | |
1843 are compiling Xdvi, see the `-DNOTOOL' option in `xdvik/INSTALL'. | |
1844 | |
1845 * Ignore the errors. The binary runs fine regardless. | |
1846 | |
1847 Here is the information for getting the two patches: | |
1848 | |
1849 Patch ID: 100512-02 | |
1850 Bug ID's: 1086793, 1086912, 1074766 | |
1851 Description: 4.1.x OpenWindows 3.0 `libXt' jumbo patch | |
1852 | |
1853 Patch ID: 100573-03 | |
1854 Bug ID: 1087332 | |
1855 Description: 4.1.x OpenWindows 3.0 undefined symbols when using shared `libXmu'. | |
1856 | |
1857 The way to statically link with `libXmu' depends on whether you are | |
1858 using a Sun compiler (e.g., `cc') or `gcc'. If the latter, alter the | |
1859 `x_libs' Make variable to include | |
1860 | |
1861 -static -lXmu -dynamic | |
1862 | |
1863 If you are using the Sun compiler, use `-Bstatic' and `-Bdynamic'. | |
1864 | |
1865 | |
1866 File: kpathsea.info, Node: Pointer combination warnings, Prev: ShellWidgetClass, Up: Common problems | |
1867 | |
1868 Pointer combination warnings | |
1869 ............................ | |
1870 | |
1871 When compiling with old C compilers, you may get some warnings about | |
1872 "illegal pointer combinations". These are spurious; just ignore them. | |
1873 I decline to clutter up the source with casts to get rid of them. | |
1874 | |
1875 | |
1876 File: kpathsea.info, Node: Path searching, Next: TeX support, Prev: Installation, Up: Top | |
1877 | |
1878 Path searching | |
1879 ************** | |
1880 | |
1881 This chapter describes the generic path searching mechanism Kpathsea | |
1882 provides. For information about searching for particular file types | |
1883 (e.g., TeX fonts), see the next chapter. | |
1884 | |
1885 * Menu: | |
1886 | |
1887 * Searching overview:: Basic scheme for searching. | |
1888 * Path sources:: Where search paths can be defined. | |
1889 * Path expansion:: Special constructs in search paths. | |
1890 * Filename database:: Using an externally-built list to search. | |
1891 * Invoking kpsewhich:: Standalone path lookup. | |
1892 | |
1893 | |
1894 File: kpathsea.info, Node: Searching overview, Next: Path sources, Up: Path searching | |
1895 | |
1896 Searching overview | |
1897 ================== | |
1898 | |
1899 A "search path" is a colon-separated list of "path elements", which | |
1900 are directory names with a few extra frills. A search path can come | |
1901 from (a combination of) many sources; see below. To look up a file | |
1902 `foo' along a path `.:/dir', Kpathsea checks each element of the path | |
1903 in turn: first `./foo', then `/dir/foo', returning the first match (or | |
1904 possibly all matches). | |
1905 | |
1906 The "colon" and "slash" mentioned here aren't necessarily `:' and `/' | |
1907 on non-Unix systems. Kpathsea tries to adapt to other operating | |
1908 systems' conventions. | |
1909 | |
1910 To check a particular path element E, Kpathsea first sees if a | |
1911 prebuilt database (*note Filename database::.) applies to E, i.e., if | |
1912 the database is in a directory that is a prefix of E. If so, the path | |
1913 specification is matched against the contents of the database. | |
1914 | |
1915 If the database does not exist, or does not apply to this path | |
1916 element, or contains no matches, the filesystem is searched (if this | |
1917 was not forbidden by the specification with `!!' and if the file being | |
1918 searched for must exist). Kpathsea constructs the list of directories | |
1919 that correspond to this path element, and then checks in each for the | |
1920 file being searched for. (To help speed future lookups of files in the | |
1921 same directory, the directory in which a file is found is floated to the | |
1922 top of the directory list.) | |
1923 | |
1924 The "file must exist" condition comes into play with VF files and | |
1925 input files read by the TeX `\openin' command. These files may not | |
1926 exist (consider `cmr10.vf'), and so it would be wrong to search the | |
1927 disk for them. Therefore, if you fail to update `ls-R' when you | |
1928 install a new VF file, it will never be found. | |
1929 | |
1930 Each path element is checked in turn: first the database, then the | |
1931 disk. If a match is found, the search stops and the result is | |
1932 returned. This avoids possibly-expensive processing of path | |
1933 specifications that are never needed on a particular run. (Unless the | |
1934 search explicitly requested all matches.) | |
1935 | |
1936 Although the simplest and most common path element is a directory | |
1937 name, Kpathsea supports additional features in search paths: layered | |
1938 default values, environment variable names, config file values, users' | |
1939 home directories, and recursive subdirectory searching. Thus, we say | |
1940 that Kpathsea "expands" a path element, meaning transforming all thel | |
1941 magic specifications into the basic directory name or names. This | |
1942 process is described in the sections below. It happens in the same | |
1943 order as the sections. | |
1944 | |
1945 Exception to all of the above: If the filename being searched for is | |
1946 absolute or explicitly relative, i.e., starts with `/' or `./' or | |
1947 `../', Kpathsea simply checks if that file exists. | |
1948 | |
1949 Ordinarily, if Kpathsea tries to access a file or directory that | |
1950 cannot be read, it gives a warning. This is so you will be alerted to | |
1951 directories or files that accidentally lack read permission (for | |
1952 example, a `lost+found'). If you prefer not to see these warnings, | |
1953 include the value `readable' in the `TEX_HUSH' environment variable or | |
1954 config file value. | |
1955 | |
1956 This generic path searching algorithm is implemented in | |
1957 `kpathsea/pathsearch.c'. It is employed by a higher-level algorithm | |
1958 when searching for a file of a particular type (*note File lookup::., | |
1959 and *Note Glyph lookup::). | |
1960 | |
1961 | |
1962 File: kpathsea.info, Node: Path sources, Next: Path expansion, Prev: Searching overview, Up: Path searching | |
1963 | |
1964 Path sources | |
1965 ============ | |
1966 | |
1967 A search path can come from many sources. In the order in which | |
1968 Kpathsea uses them: | |
1969 | |
1970 1. A user-set environment variable, e.g., `TEXINPUTS'. Environment | |
1971 variables with an underscore and the program name appended | |
1972 override; for example, `TEXINPUTS_latex' overrides `TEXINPUTS' if | |
1973 the program being run is named `latex'. | |
1974 | |
1975 2. A program-specific configuration file, e.g., an `S /a:/b' line in | |
1976 Dvips' `config.ps' (*note Config files: (dvips)Config files.). | |
1977 | |
1978 3. A line in a Kpathsea configuration file `texmf.cnf', e.g., | |
1979 `TEXINPUTS=/c:/d' (see below). | |
1980 | |
1981 4. The compile-time default (specified in `kpathsea/paths.h'). | |
1982 | |
1983 You can see each of these values for a given search path by using the | |
1984 debugging options (*note Debugging::.). | |
1985 | |
1986 These sources may be combined via default expansion (*note Default | |
1987 expansion::.). | |
1988 | |
1989 * Menu: | |
1990 | |
1991 * Config files:: Kpathsea's runtime config files (texmf.cnf). | |
1992 | |
1993 | |
1994 File: kpathsea.info, Node: Config files, Up: Path sources | |
1995 | |
1996 Config files | |
1997 ------------ | |
1998 | |
1999 As mentioned above, Kpathsea reads "runtime configuration files" | |
2000 named `texmf.cnf' for search path and other definitions. The search | |
2001 path used to look for these configuration files is named `TEXMFCNF', | |
2002 and is constructed in the usual way, as described above, except that | |
2003 configuration files cannot be used to define the path, naturally; also, | |
2004 an `ls-R' database is not used to search for them. | |
2005 | |
2006 Kpathsea reads *all* `texmf.cnf' files in the search path, not just | |
2007 the first one found; definitions in earlier files override those in | |
2008 later files. Thus, with the search path of `.:$TEXMF', values from | |
2009 `./texmf.cnf' override those from `$TEXMF/texmf.cnf'. | |
2010 | |
2011 While (or instead of) reading this description, you may find it | |
2012 helpful to look at the distributed `texmf.cnf', which uses or at least | |
2013 mentions most features. The format of `texmf.cnf' files follows: | |
2014 | |
2015 * Comments start with `%' and continue to the end of the line. | |
2016 | |
2017 * Blank lines are ignored. | |
2018 | |
2019 * A `\' at the end of a line acts as a continuation character, i.e., | |
2020 the next line is appended. Whitespace at the beginning of | |
2021 continuation lines is not ignored. | |
2022 | |
2023 * Each remaining line must look like | |
2024 | |
2025 VARIABLE [. PROGNAME] [=] VALUE | |
2026 | |
2027 where the `=' and surrounding whitespace is optional. | |
2028 | |
2029 * The VARIABLE name may contain any character other than whitespace, | |
2030 `=', or `.', but sticking to `A-Za-z_' is safest. | |
2031 | |
2032 * If `.PROGNAME' is present, the definition only applies if the | |
2033 program that is running is named (i.e., the last component of | |
2034 `argv[0]' is) PROGNAME or `PROGNAME.exe'. This allows different | |
2035 flavors of TeX to have different search paths, for example. | |
2036 | |
2037 * VALUE may contain any characters except `%' and `@'. (These | |
2038 restrictions are only necessary because of the processing done on | |
2039 `texmf.cnf' at build time, so you can stick those characters in | |
2040 after installation if you have to.) The `$VAR.PROG' feature is | |
2041 not available on the right-hand side; instead, you must use an | |
2042 additional variable (see below for example). A `;' in VALUE is | |
2043 translated to `:' if running under Unix; this is useful to write a | |
2044 single `texmf.cnf' which can be used under both Unix and NT. (If | |
2045 you really want `;''s in your filenames, add | |
2046 `-DALLOW_SEMICOLON_IN_FILENAMES' to `CFLAGS'.) | |
2047 | |
2048 * All definitions are read before anything is expanded, so you can | |
2049 use variables before they are defined (like Make, unlike most other | |
2050 programs). | |
2051 | |
2052 Here is a configuration file fragment illustrating most of these points: | |
2053 | |
2054 % TeX input files -- i.e., anything to be found by \input or \openin ... | |
2055 latex209_inputs = .:$TEXMF/tex/latex209//:$TEXMF/tex// | |
2056 latex2e_inputs = .:$TEXMF/tex/latex//:$TEXMF/tex// | |
2057 TEXINPUTS = .:$TEXMF/tex// | |
2058 TEXINPUTS.latex209 = $latex209_inputs | |
2059 TEXINPUTS.latex2e = $latex2e_inputs | |
2060 TEXINPUTS.latex = $latex2e_inputs | |
2061 | |
2062 Although this format has obvious similarities to Bourne shell | |
2063 scripts--change the comment character to `#', disallow spaces around | |
2064 the `=', and get rid of the `.NAME' convention, and it could be run | |
2065 through the shell. But there seemed little advantage to doing this, | |
2066 since all the information would have to passed back to Kpathsea and | |
2067 parsed there anyway, since the `sh' process couldn't affect its | |
2068 parent's environment. | |
2069 | |
2070 The implementation of all this is in `kpathsea/cnf.c'. | |
2071 | |
2072 | |
2073 File: kpathsea.info, Node: Path expansion, Next: Filename database, Prev: Path sources, Up: Path searching | |
2074 | |
2075 Path expansion | |
2076 ============== | |
2077 | |
2078 Kpathsea recognizes certain special characters and constructions in | |
2079 search paths, similar to that in shells. As a general example: | |
2080 `~$USER/{foo,bar}//baz' expands to all subdirectories under directories | |
2081 `foo' and `bar' in $USER's home directory that contain a directory or | |
2082 file `baz'. These expansions are explained in the sections below. | |
2083 | |
2084 * Menu: | |
2085 | |
2086 * Default expansion:: a: or :a or a::b expands to a default. | |
2087 * Variable expansion:: $foo and ${foo} expand to environment values. | |
2088 * Tilde expansion:: ~ and ~user expand to home directories. | |
2089 * Brace expansion:: a{foo,bar}b expands to afoob abarb. | |
2090 * Subdirectory expansion:: a// and a//b recursively expand to subdirs. | |
2091 | |
2092 | |
2093 File: kpathsea.info, Node: Default expansion, Next: Variable expansion, Up: Path expansion | |
2094 | |
2095 Default expansion | |
2096 ----------------- | |
2097 | |
2098 If the highest-priority search path (*note Path sources::.) contains | |
2099 an "extra colon" (i.e., leading, trailing, or doubled), Kpathsea | |
2100 inserts at that point the next-highest-priority search path that is | |
2101 defined. If that inserted path has an extra colon, the same happens | |
2102 with the next-highest. (An extra colon in the compile-time default | |
2103 value has unpredictable results, so installers beware.) | |
2104 | |
2105 For example, given an environment variable setting | |
2106 | |
2107 setenv TEXINPUTS /home/karl: | |
2108 | |
2109 and a `TEXINPUTS' value from `texmf.cnf' of | |
2110 | |
2111 .:$TEXMF//tex | |
2112 | |
2113 then the final value used for searching will be: | |
2114 | |
2115 /home/karl:.:$TEXMF//tex | |
2116 | |
2117 Since Kpathsea looks for multiple configuration files, it would be | |
2118 natural to expect that (for example) an extra colon in `./texmf.cnf' | |
2119 would expand to the path in `$TEXMF/texmf.cnf'. Or, with Dvips' | |
2120 configuration files, that an extra colon in `config.$PRINTER' would | |
2121 expand to the path in `config.ps'. This doesn't happen. It's not | |
2122 clear this would be desirable in all cases, and trying to devise a way | |
2123 to specify the path to which the extra colon should expand seemed truly | |
2124 baroque. | |
2125 | |
2126 Technicality: Since it would be useless to insert the default value in | |
2127 more than one place, Kpathsea changes only one extra `:' and leaves any | |
2128 others in place (where they will eventually be equivalent to `.', i.e., | |
2129 the current directory). Kpathsea checks first for a leading `:', then | |
2130 a trailing `:', then a doubled `:'. | |
2131 | |
2132 You can trace this by debugging "paths" (*note Debugging::.). | |
2133 Default expansion is implemented in the source file | |
2134 `kpathsea/kdefault.c'. | |
2135 | |
2136 | |
2137 File: kpathsea.info, Node: Variable expansion, Next: Tilde expansion, Prev: Default expansion, Up: Path expansion | |
2138 | |
2139 Variable expansion | |
2140 ------------------ | |
2141 | |
2142 `$foo' or `${foo}' in a path element is replaced by (1) the value of | |
2143 an environment variable `foo' (if defined); (2) the value of `foo' from | |
2144 `texmf.cnf' (if defined); (3) the empty string. | |
2145 | |
2146 If the character after the `$' is alphanumeric or `_', the variable | |
2147 name consists of all consecutive such characters. If the character | |
2148 after the `$' is a `{', the variable name consists of everything up to | |
2149 the next `}' (braces may not be nested). Otherwise, Kpathsea gives a | |
2150 warning and ignores the `$' and its following character. | |
2151 | |
2152 You must quote the $'s and braces as necessary for your shell. | |
2153 *Shell* variable values cannot be seen by Kpathsea, i.e., ones defined | |
2154 by `set' in C shells and without `export' in Bourne shells. | |
2155 | |
2156 For example, given | |
2157 setenv tex /home/texmf | |
2158 setenv TEXINPUTS .:$tex:${tex}prev | |
2159 the final `TEXINPUTS' path is the three directories: | |
2160 .:/home/texmf:/home/texmfprev | |
2161 | |
2162 The `.PROGNAME' suffix on variables and `_PROGNAME' on environment | |
2163 variable names are not implemented for general variable expansions. | |
2164 These are only recognized when search paths are initialized (*note Path | |
2165 sources::.). | |
2166 | |
2167 Variable expansion is implemented in the source file | |
2168 `kpathsea/variable.c'. | |
2169 | |
2170 | |
2171 File: kpathsea.info, Node: Tilde expansion, Next: Brace expansion, Prev: Variable expansion, Up: Path expansion | |
2172 | |
2173 Tilde expansion | |
2174 --------------- | |
2175 | |
2176 A leading `~' in a path element is replaced by the value of the | |
2177 environment variable `HOME', or `.' if `HOME' is not set. | |
2178 | |
2179 A leading `~USER' in a path element is replaced by USER's home | |
2180 directory from the system `passwd' database. | |
2181 | |
2182 For example, | |
2183 setenv TEXINPUTS ~/mymacros: | |
2184 | |
2185 will prepend a directory `mymacros' in your home directory to the | |
2186 default path. | |
2187 | |
2188 As a special case, if a home directory ends in `/', the trailing | |
2189 slash is dropped, to avoid inadvertently creating a `//' construct in | |
2190 the path. For example, if the home directory of the user `root' is | |
2191 `/', the path element `~root/mymacros' expands to just `/mymacros', not | |
2192 `//mymacros'. | |
2193 | |
2194 Tilde expansion is implemented in the source file `kpathsea/tilde.c'. | |
2195 | |
2196 | |
2197 File: kpathsea.info, Node: Brace expansion, Next: Subdirectory expansion, Prev: Tilde expansion, Up: Path expansion | |
2198 | |
2199 Brace expansion | |
2200 --------------- | |
2201 | |
2202 `x{A,B}y' expands to `xAy:xBy'. For example: | |
2203 | |
2204 foo/{1,2}/baz | |
2205 | |
2206 expands to `foo1baz:foo2baz'. `:' is the path separator on the current | |
2207 system; e.g., on a DOS system, it's `;'. | |
2208 | |
2209 Braces can be nested; for example, `x{a,b{1,2}}y' expands to | |
2210 `xay:xb1y:xb2y'. | |
2211 | |
2212 This feature can be used to implement multiple TeX hierarchies, by | |
2213 assigning a brace list to `$TEXMF', as mentioned in `texmf.cnf.in'. | |
2214 | |
2215 Brace expansion is implemented in the source file | |
2216 `kpathsea/expand.c'. It is taken from Bash, and is thus covered by the | |
2217 GNU General Public License, rather than the Library General Public | |
2218 License that covers the rest of Kpathsea. | |
2219 | |
2220 | |
2221 File: kpathsea.info, Node: Subdirectory expansion, Prev: Brace expansion, Up: Path expansion | |
2222 | |
2223 Subdirectory expansion | |
2224 ---------------------- | |
2225 | |
2226 Two or more consecutive slashes in a path element following a | |
2227 directory D is replaced by all subdirectories of D: first those | |
2228 subdirectories directly under D, then the subsubdirectories under | |
2229 those, and so on. At each level, the order in which the directories are | |
2230 searched is unspecified. (It's "directory order", and definitely not | |
2231 alphabetical.) | |
2232 | |
2233 If you specify any filename components after the `//', only | |
2234 subdirectories which match those components are included. For example, | |
2235 `/a//b' would expand into directories `/a/1/b', `/a/2/b', `/a/1/1/b', | |
2236 and so on, but not `/a/b/c' or `/a/1'. | |
2237 | |
2238 You can include multiple `//' constructs in the path. | |
2239 | |
2240 `//' at the beginning of a path is ignored; you didn't really want to | |
2241 search every directory on the system, did you? | |
2242 | |
2243 I should mention one related implementation trick, which I took from | |
2244 GNU find. Matthew Farwell suggested it, and David MacKenzie | |
2245 implemented it. | |
2246 | |
2247 The trick is that in every real Unix implementation (as opposed to the | |
2248 POSIX specification), a directory which contains no subdirectories will | |
2249 have exactly two links (namely, one for `.' and one for `..'). That is | |
2250 to say, the `st_nlink' field in the `stat' structure will be two. | |
2251 Thus, we don't have to stat everything in the bottom-level (leaf) | |
2252 directories--we can just check `st_nlink', notice it's two, and do no | |
2253 more work. | |
2254 | |
2255 But if you have a directory that contains a single subdirectory and | |
2256 500 regular files, `st_nlink' will be 3, and Kpathsea has to stat every | |
2257 one of those 501 entries. Therein lies slowness. | |
2258 | |
2259 You can disable the trick by undefining `UNIX_ST_LINK' in | |
2260 `kpathsea/config.h'. (It is undefined by default except under Unix.) | |
2261 | |
2262 Unfortunately, in some cases files in leaf directories are `stat''d: | |
2263 if the path specification is, say, `$TEXMF/fonts//pk//', then files in | |
2264 a subdirectory `.../pk', even if it is a leaf, are checked. The reason | |
2265 cannot be explained without reference to the implementation, so read | |
2266 `kpathsea/elt-dirs.c' (search for `may descend') if you are curious. | |
2267 And if you can find a way to *solve* the problem, please let me know. | |
2268 | |
2269 Subdirectory expansion is implemented in the source file | |
2270 `kpathsea/elt-dirs.c'. | |
2271 | |
2272 | |
2273 File: kpathsea.info, Node: Filename database, Next: Invoking kpsewhich, Prev: Path expansion, Up: Path searching | |
2274 | |
2275 Filename database (`ls-R') | |
2276 ========================== | |
2277 | |
2278 Kpathsea goes to some lengths to minimize disk accesses for searches | |
2279 (*note Subdirectory expansion::.). Nevertheless, at installations with | |
2280 enough directories, searching each possible directory for a given file | |
2281 can take an excessively long time (depending on the speed of the disk, | |
2282 whether it's NFS-mounted, how patient you are, etc.). | |
2283 | |
2284 In practice, a font tree containing the standard PostScript and PCL | |
2285 fonts is large enough for searching to be noticeably slow on typical | |
2286 systems these days. Therefore, Kpathsea can use an externally-built | |
2287 "database" file named `ls-R' that maps files to directories, thus | |
2288 avoiding the need to exhaustively search the disk. | |
2289 | |
2290 A second database file `aliases' allows you to give additional names | |
2291 to the files listed in `ls-R'. This can be helpful to adapt to "8.3" | |
2292 filename conventions in source files. | |
2293 | |
2294 The `ls-R' and `aliases' features are implemented in the source file | |
2295 `kpathsea/db.c'. | |
2296 | |
2297 * Menu: | |
2298 | |
2299 * ls-R:: The main filename database. | |
2300 * Filename aliases:: Aliases for those names. | |
2301 * Database format:: Syntax details of the database file. | |
2302 | |
2303 | |
2304 File: kpathsea.info, Node: ls-R, Next: Filename aliases, Up: Filename database | |
2305 | |
2306 `ls-R' | |
2307 ------ | |
2308 | |
2309 As mentioned above, you must name the main filename database `ls-R'. | |
2310 You can put one at the root of each TeX installation hierarchy you wish | |
2311 to search (`$TEXMF' by default); most sites have only one hierarchy. | |
2312 Kpathsea looks for `ls-R' files along the `TEXMFDBS' path, so that | |
2313 should presumably match the list of hierarchies. | |
2314 | |
2315 The recommended way to create and maintain `ls-R' is to run the | |
2316 `MakeTeXls-R' script, which is installed in `$(bindir)' | |
2317 (`/usr/local/bin' by default). That script goes to some trouble to | |
2318 follow symbolic links as necessary, etc. It's also invoked by the | |
2319 distributed `MakeTeX...' scripts. | |
2320 | |
2321 At its simplest, though, you can build `ls-R' with the command | |
2322 cd /YOUR/TEXMF/ROOT && ls -LAR ./ >ls-R | |
2323 | |
2324 presuming your `ls' produces the right output format (see the section | |
2325 below). GNU `ls', for example, outputs in this format. Also presuming | |
2326 your `ls' hasn't been aliased in a system file (e.g., `/etc/profile') | |
2327 to something problematic, e.g., `ls --color=tty'. In that case, you | |
2328 will have to disable the alias before generating `ls-R'. For the | |
2329 precise definition of the file format, *note Database format::.. | |
2330 | |
2331 Regardless of whether you use the supplied script or your own, you | |
2332 will almost certainly want to invoke it via `cron', so when you make | |
2333 changes in the installed files (say if you install a new LaTeX | |
2334 package), `ls-R' will be automatically updated. | |
2335 | |
2336 The `-A' option to `ls' includes files beginning with `.' (except for | |
2337 `.' and `..'), such as the file `.tex' included with the LaTeX tools | |
2338 package. (On the other hand, *directories* whose names begin with `.' | |
2339 are always ignored.) | |
2340 | |
2341 If your system does not support symbolic links, omit the `-L'. | |
2342 | |
2343 `ls -LAR /YOUR/TEXMF/ROOT' will also work. But using `./' avoids | |
2344 embedding absolute pathnames, so the hierarchy can be easily | |
2345 transported. It also avoids possible trouble with automounters or | |
2346 other network filesystem conventions. | |
2347 | |
2348 Kpathsea warns you if it finds an `ls-R' file, but the file does not | |
2349 contain any usable entries. The usual culprit is running plain `ls -R' | |
2350 instead of `ls -LR ./' or `ls -R /YOUR/TEXMF/ROOT'. Another | |
2351 possibility is some system directory name starting with a `.' (perhaps | |
2352 if you are using AFS); Kpathsea ignores everything under such | |
2353 directories. | |
2354 | |
2355 Because the database may be out-of-date for a particular run, if a | |
2356 file is not found in the database, by default Kpathsea goes ahead and | |
2357 searches the disk. If a particular path element begins with `!!', | |
2358 however, *only* the database will be searched for that element, never | |
2359 the disk. If the database does not exist, nothing will be searched. | |
2360 Because this can surprise users ("I see the font `foo.tfm' when I do an | |
2361 `ls'; why can't Dvips find it?"), it is not in any of the default | |
2362 search paths. | |
2363 | |
2364 | |
2365 File: kpathsea.info, Node: Filename aliases, Next: Database format, Prev: ls-R, Up: Filename database | |
2366 | |
2367 Filename aliases | |
2368 ---------------- | |
2369 | |
2370 In some circumstances, you may wish to find a file under several | |
2371 names. For example, suppose a TeX document was created using a DOS | |
2372 system and tries to read `longtabl.sty'. But now it's being run on a | |
2373 Unix system, and the file has its original name, `longtable.sty'. The | |
2374 file won't be found. You need to give the actual file `longtable.sty' | |
2375 an alias `longtabl.sty'. | |
2376 | |
2377 You can handle this by creating a file `aliases' as a companion to | |
2378 the `ls-R' for the hierarchy containing the file in question. (You | |
2379 must have an `ls-R' for the alias feature to work.) | |
2380 | |
2381 The format of `aliases' is simple: two whitespace-separated words per | |
2382 line; the first is the real name `longtable.sty', and second is the | |
2383 alias (`longtabl.sty'). These must be base filenames, with no | |
2384 directory components. `longtable.sty' must be in the sibling `ls-R'. | |
2385 | |
2386 Also, blank lines and lines starting with `%' or `#' are ignored in | |
2387 `aliases', to allow for comments. | |
2388 | |
2389 If a real file `longtabl.sty' exists, it is used regardless of any | |
2390 aliases. | |
2391 | |
2392 | |
2393 File: kpathsea.info, Node: Database format, Prev: Filename aliases, Up: Filename database | |
2394 | |
2395 Database format | |
2396 --------------- | |
2397 | |
2398 The "database" read by Kpathsea is a line-oriented file of plain | |
2399 text. The format is that generated by GNU (and most other) `ls' | |
2400 programs given the `-R' option, as follows. | |
2401 | |
2402 * Blank lines are ignored. | |
2403 | |
2404 * If a line begins with `/' or `./' or `../' and ends with a colon, | |
2405 it's the name of a directory. (`../' lines aren't useful, | |
2406 however, and should not be generated.) | |
2407 | |
2408 * All other lines define entries in the most recently seen directory. | |
2409 /'s in such lines will produce possibly-strange results. | |
2410 | |
2411 * Files with no preceding directory line are ignored. | |
2412 | |
2413 For example, here's the first few lines of `ls-R' (which totals about | |
2414 30K bytes) on my system: | |
2415 | |
2416 bibtex | |
2417 dvips | |
2418 fonts | |
2419 ls-R | |
2420 metafont | |
2421 metapost | |
2422 tex | |
2423 web2c | |
2424 | |
2425 ./bibtex: | |
2426 bib | |
2427 bst | |
2428 doc | |
2429 | |
2430 ./bibtex/bib: | |
2431 asi.bib | |
2432 btxdoc.bib | |
2433 ... | |
2434 | |
2435 | |
2436 File: kpathsea.info, Node: Invoking kpsewhich, Prev: Filename database, Up: Path searching | |
2437 | |
2438 `kpsewhich': Standalone path searching | |
2439 ====================================== | |
2440 | |
2441 The Kpsewhich program exercises the path searching functionality | |
2442 independent of any particular application. This can also be useful as a | |
2443 sort of `find' program to locate files in your TeX hierarchies, perhaps | |
2444 in administrative scripts. It is used heavily in the distributed | |
2445 `MakeTeX...' scripts. | |
2446 | |
2447 Synopsis: | |
2448 kpsewhich OPTION... FILENAME... | |
2449 | |
2450 The options and filename(s) to look up can be intermixed. Options | |
2451 can start with either `-' or `--', and any unambiguous abbreviation is | |
2452 accepted. | |
2453 | |
2454 * Menu: | |
2455 | |
2456 * Path searching options:: Changing the mode, resolution, etc. | |
2457 * Auxiliary tasks:: Path and variable expansion. | |
2458 * Standard options:: -help and -version. | |
2459 | |
2460 | |
2461 File: kpathsea.info, Node: Path searching options, Next: Auxiliary tasks, Up: Invoking kpsewhich | |
2462 | |
2463 Path searching options | |
2464 ---------------------- | |
2465 | |
2466 Kpsewhich looks up each non-option argument on the command line as a | |
2467 filename, and returns the first file found. There is no option to | |
2468 return all the files with a particular name (you can run the Unix | |
2469 `find' utility for that, *note Invoking find: (findutils)Invoking | |
2470 find.). | |
2471 | |
2472 Various options alter the path searching behavior: | |
2473 | |
2474 `--dpi=NUM' | |
2475 Set the resolution to NUM; this only affects `gf' and `pk' | |
2476 lookups. `-D' is a synonym, for compatibility with Dvips. | |
2477 Default is 600. | |
2478 | |
2479 `--format=NAME' | |
2480 Set the format for lookup to NAME. By default, the format is | |
2481 guessed from the filename. In fact, the recognized filename | |
2482 extensions and the allowable NAMEs (including any leading `.') are | |
2483 the same. | |
2484 | |
2485 You can also specify an integer for NAME; this is the only way to | |
2486 specify formats that don't have an associated suffix, such as | |
2487 MetaPost support files and Dvips configuration files. It's also | |
2488 somewhat faster, since no unused formats need to be initialized. | |
2489 The integers appear in the output of `--help', and are of course | |
2490 subject to change. | |
2491 | |
2492 Here's the current list of recognized names and numbers. *Note | |
2493 Supported file formats::, for more information on each of these. | |
2494 gf(0) | |
2495 pk(1) | |
2496 bitmap font (2) | |
2497 .afm(3) | |
2498 .base(4) | |
2499 .bib(5) | |
2500 .bst(6) | |
2501 .cnf(7) | |
2502 ls-R(8) | |
2503 .fmt(9) | |
2504 .map(10) | |
2505 .mem(11) | |
2506 .mf(12) | |
2507 .pool(13) | |
2508 .mft(14) | |
2509 .mp(15) | |
2510 .pool(16) | |
2511 MetaPost support (17) | |
2512 .ocp(18) | |
2513 .ofm(19) | |
2514 .opl(20) | |
2515 .otp(21) | |
2516 .ovf(22) | |
2517 .ovp(23) | |
2518 graphic/figure (24) .eps .epsi | |
2519 .tex(25) .ltx .dtx .texi .texinfo .txi .eps .epsi | |
2520 TeX documentation (26) | |
2521 .pool(27) | |
2522 TeX sources (28) | |
2523 PostScript header/font (29) .pro | |
2524 Troff fonts (30) | |
2525 .tfm(31) | |
2526 .pfa(32) .pfb | |
2527 .vf(33) | |
2528 dvips config (34) | |
2529 .ist(35) | |
2530 | |
2531 This option and `--path' are mutually exclusive. | |
2532 | |
2533 `--interactive' | |
2534 After processing the command line, read additional filenames to | |
2535 look up from standard input. | |
2536 | |
2537 `-maketex=FILETYPE' | |
2538 `-no-maketex=FILETYPE' | |
2539 Turn on or off the `MakeTeX' script associated with FILETYPE. The | |
2540 only values that make sense for FILETYPE are `pk', `mf', `tex', | |
2541 and `tfm'. By default, all are off in Kpsewhich. *Note MakeTeX | |
2542 scripts::. | |
2543 | |
2544 `--mode=STRING' | |
2545 Set the mode name to STRING; this also only affects `gf' and `pk' | |
2546 lookups. No default: any mode will be found. *Note MakeTeX | |
2547 script arguments::. | |
2548 | |
2549 `--must-exist' | |
2550 Do everything possible to find the files, notably including | |
2551 searching the disk. By default, only the `ls-R' database is | |
2552 checked, in the interest of efficiency. | |
2553 | |
2554 `--path=STRING' | |
2555 Search along the path STRING (colon-separated as usual), instead | |
2556 of guessing the search path from the filename. `//' and all the | |
2557 usual expansions are supported (*note Path expansion::.). This | |
2558 option and `--format' are mutually exclusive. To output the | |
2559 complete directory expansion of a path, instead of doing a | |
2560 one-shot lookup, see `--path-expand' in the following section. | |
2561 | |
2562 `--progname=NAME' | |
2563 Set the program name to NAME; default is `kpsewhich'. This can | |
2564 affect the search paths via the `.PROGNAM' feature in | |
2565 configuration files (*note Config files::.). | |
2566 | |
2567 | |
2568 File: kpathsea.info, Node: Auxiliary tasks, Next: Standard options, Prev: Path searching options, Up: Invoking kpsewhich | |
2569 | |
2570 Auxiliary tasks | |
2571 --------------- | |
2572 | |
2573 Kpsewhich provides some additional features not strictly related to | |
2574 path lookup: | |
2575 | |
2576 * `--debug=NUM' sets the debugging options to NUM. *Note | |
2577 Debugging::. | |
2578 | |
2579 * `--expand-var=STRING' outputs the variable expansion of STRING. | |
2580 For example, the `MakeTeX...' scripts run `kpsewhich | |
2581 --expand-var='$TEXMF'' to find the root of the TeX system | |
2582 hierarchy. *Note Path expansion::. | |
2583 | |
2584 * `--expand-path=STRING' outputs the complete expansion of STRING as | |
2585 a colon-separated path. This is useful to construct a search path | |
2586 for a program that doesn't accept recursive subdirectory | |
2587 specifications. The option `--separator=STRING' changes the | |
2588 separator in the output from `:' to STRING. | |
2589 | |
2590 For one-shot uses of an arbitrary (not built in to Kpathsea) path, | |
2591 see `--path' in the previous section. | |
2592 | |
2593 * `--show-path=NAME' shows the path that would be used for file | |
2594 lookups of file type NAME. Either a filename extension (`pk', | |
2595 `.vf', etc.) or an integer can be used, just as with `--format', | |
2596 described in the previous section. | |
2597 | |
2598 | |
2599 File: kpathsea.info, Node: Standard options, Prev: Auxiliary tasks, Up: Invoking kpsewhich | |
2600 | |
2601 Standard options | |
2602 ---------------- | |
2603 | |
2604 Kpsewhich accepts the standard GNU options: | |
2605 | |
2606 * `--help' prints a help message on standard output and exits. | |
2607 | |
2608 * `--version' prints the Kpathsea version number and exits. | |
2609 | |
2610 | |
2611 File: kpathsea.info, Node: TeX support, Next: Programming, Prev: Path searching, Up: Top | |
2612 | |
2613 TeX support | |
2614 *********** | |
2615 | |
2616 Although the basic features in Kpathsea can be used for any type of | |
2617 path searching, it came about (like all libraries) with a specific | |
2618 application in mind: I wrote Kpathsea specifically for TeX system | |
2619 programs. I had been struggling with the programs I was using (Dvips, | |
2620 Xdvi, and TeX itself) having slightly different notions of how to | |
2621 specify paths; and debugging was painful, since no code was shared. | |
2622 | |
2623 Therefore, Kpathsea provides some TeX-specific formats and features. | |
2624 Indeed, many of the supposedly generic path searching features were | |
2625 provided because they seemed useful in that conTeXt (font lookup, | |
2626 particularly). | |
2627 | |
2628 Kpathsea provides a standard way to search for files of any of the | |
2629 supported file types; glyph fonts are a bit different than all the rest. | |
2630 Searches are based solely on filenames, not file contents--if a GF file | |
2631 is named `cmr10.600pk', it will be found as a PK file. | |
2632 | |
2633 * Menu: | |
2634 | |
2635 * Supported file formats:: File types Kpathsea knows about. | |
2636 * File lookup:: Searching for most kinds of files. | |
2637 * Glyph lookup:: Searching for bitmap fonts. | |
2638 * Suppressing warnings:: Avoiding warnings via TEX_HUSH. | |
2639 | |
2640 | |
2641 File: kpathsea.info, Node: Supported file formats, Next: File lookup, Up: TeX support | |
2642 | |
2643 Supported file formats | |
2644 ====================== | |
2645 | |
2646 Kpathsea has support for a number of file types. Each file type has a | |
2647 list of environment and config file variables that are checked to define | |
2648 the search path, and most have a default suffix that plays a role in | |
2649 finding files (see the next section). Some also define additional | |
2650 suffixes, and/or a program to be run to create missing files on the fly. | |
2651 | |
2652 Since environment variables containing periods, such as | |
2653 `TEXINPUTS.latex', are not allowed on some systems, Kpathsea looks for | |
2654 environment variables with an underscore, e.g., `TEXINPUTS_latex' | |
2655 (*note Config files::.). | |
2656 | |
2657 The following table lists the above information. | |
2658 | |
2659 `.afm' | |
2660 (Adobe font metrics, *note Metric files: (dvips)Metric files.) | |
2661 `AFMFONTS'. | |
2662 | |
2663 `.base' | |
2664 (Metafont memory dump, *note Memory dumps: (web2c)Memory dumps.) | |
2665 `MFBASES', `TEXMFINI'. | |
2666 | |
2667 `.bib' | |
2668 (BibTeX bibliography source, *note bibtex invocation: | |
2669 (web2c)bibtex invocation.) `BIBINPUTS', `TEXBIB'. | |
2670 | |
2671 `.bst' | |
2672 (BibTeX style file, *note Basic BibTeX style files: (web2c)Basic | |
2673 BibTeX style files.) `BSTINPUTS'. | |
2674 | |
2675 `.cnf' | |
2676 (Runtime configuration files, *note Config files::.) `TEXMFCNF'. | |
2677 | |
2678 `ls-R' | |
2679 (Filename databases, *note Filename database::.) `TEXMFDBS'. | |
2680 | |
2681 `.fmt' | |
2682 (TeX memory dump, *note Memory dumps: (web2c)Memory dumps.) | |
2683 `TEXFORMATS', `TEXMFINI'. | |
2684 | |
2685 `gf' | |
2686 (generic font bitmap, *note Glyph files: (dvips)Glyph files.) | |
2687 `PROGRAMFONTS', `GFFONTS', `GLYPHFONTS', `TEXFONTS'. | |
2688 | |
2689 `.map' | |
2690 (Fontmaps, *note Fontmap::.) `TEXFONTMAPS'. | |
2691 | |
2692 `.ist' | |
2693 (makeindex style files) `TEXINDEXSTYLE', `INDEXSTYLE'. | |
2694 | |
2695 `.mem' | |
2696 (MetaPost memory dump, *note Memory dumps: (web2c)Memory dumps.) | |
2697 `MPMEMS', `TEXMFINI'. | |
2698 | |
2699 `.mf' | |
2700 (Metafont source, *note mf invocation: (web2c)mf invocation.) | |
2701 `MFINPUTS'; dynamic creation program: `MakeTeXMF'. | |
2702 | |
2703 `.mft' | |
2704 (`MFT' style file, *note mft invocation: (web2c)mft invocation.) | |
2705 `MFTINPUTS'. | |
2706 | |
2707 `mf.pool' | |
2708 (Metafont program strings, *note pooltype invocation: | |
2709 (web2c)pooltype invocation.) `MFPOOL', `TEXMFINI'. | |
2710 | |
2711 `.mp' | |
2712 (MetaPost source, *note mpost invocation: (web2c)mpost invocation.) | |
2713 `MPINPUTS'. | |
2714 | |
2715 `mp.pool' | |
2716 (MetaPost program strings, *note pooltype invocation: | |
2717 (web2c)pooltype invocation.) `MPPOOL', `TEXMFINI'. | |
2718 | |
2719 `(none)' | |
2720 (MetaPost support files, used by DMP; *note dmp invocation: | |
2721 (web2c)dmp invocation.) `MPSUPPORT'. | |
2722 | |
2723 `.ocp' | |
2724 (Omega compiled process files) `OCPINPUTS'; | |
2725 dynamic creation program: `MakeOmegaOCP'. | |
2726 | |
2727 `.ofm' | |
2728 (Omega font metrics) `OFMFONTS', `TEXFONTS'; | |
2729 dynamic creation program: `MakeOmegaOFM'. | |
2730 | |
2731 `.opl' | |
2732 (Omega property lists) `OPLFONTS', `TEXFONTS'. | |
2733 | |
2734 `.otp' | |
2735 (Omega translation process files) `OTPINPUTS'. | |
2736 | |
2737 `.ovf' | |
2738 (Omega virtual fonts) `OVFFONTS', `TEXFONTS'. | |
2739 | |
2740 `.ovp' | |
2741 (Omega virtual property lists) `OVPFONTS', `TEXFONTS'. | |
2742 | |
2743 `.eps' | |
2744 (Encapsulated PostScript figures, *note PostScript figures: | |
2745 (dvips)PostScript figures.) `TEXPICTS', `TEXINPUTS'; additional | |
2746 suffixes: `.epsi'. | |
2747 | |
2748 `pk' | |
2749 (packed bitmap fonts, *note Glyph files: (dvips)Glyph files.) | |
2750 `PROGRAMFONTS' (PROGRAM being `XDVI', etc.), `PKFONTS', `TEXPKS', | |
2751 `GLYPHFONTS', `TEXFONTS'; dynamic creation program: `MakeTeXPK'. | |
2752 | |
2753 `.pro' | |
2754 (downloadable PostScript, *note Header files: (dvips)Header files.) | |
2755 `TEXPSHEADERS', `PSHEADERS'. | |
2756 | |
2757 `.tex' | |
2758 (TeX source, *note tex invocation: (web2c)tex invocation.) | |
2759 `TEXINPUTS'; additional suffixes: `.ltx' `.dtx' `.texi' `.texinfo' | |
2760 `.txi' `.eps' `.epsi'; dynamic creation program: `MakeTeXTeX'. | |
2761 | |
2762 `(none)' | |
2763 (Documentation files for the TeX system) `TEXDOCS'. | |
2764 | |
2765 `tex.pool' | |
2766 (TeX program strings, *note pooltype invocation: (web2c)pooltype | |
2767 invocation.) `TEXPOOL', `TEXMFINI'. | |
2768 | |
2769 `(none)' | |
2770 (Source files for the TeX system) `TEXSOURCES'. | |
2771 | |
2772 `.tfm' | |
2773 (TeX font metrics, *note Metric files: (dvips)Metric files.) | |
2774 `TFMFONTS', `TEXFONTS'; dynamic creation program: `MakeTeXTFM'. | |
2775 | |
2776 `(none)' | |
2777 (Troff fonts, used by DMP; *note DMP invocation: (web2c)DMP | |
2778 invocation.) `TRFONTS'. | |
2779 | |
2780 `.pfa' | |
2781 (Type 1 PostScript outline fonts, *note Glyph files: (dvips)Glyph | |
2782 files.) `T1FONTS', `T1INPUTS', `TEXPSHEADERS', `DVIPSHEADERS'; | |
2783 additional suffix: `.pfb'. | |
2784 | |
2785 `.vf' | |
2786 (virtual fonts, *note Virtual fonts: (dvips)Virtual fonts.) | |
2787 `VFFONTS', `TEXFONTS'. | |
2788 | |
2789 `(none)' | |
2790 (Dvips `config.*' files, such as `config.ps', *note Config files: | |
2791 (dvips)Config files.) `TEXCONFIG'. | |
2792 | |
2793 If an environment variable by these names are set, the corresponding | |
2794 `texmf.cnf' definition won't be looked at (unless, as usual, the | |
2795 environment variable value has an extra `:'). *Note Default | |
2796 expansion::. | |
2797 | |
2798 For the font variables, the intent is that: | |
2799 * `TEXFONTS' is the default for everything. | |
2800 | |
2801 * `GLYPHFONTS' is the default for bitmap (or, more precisely, | |
2802 non-metric) files. | |
2803 | |
2804 * Each font format has a variable of its own. | |
2805 | |
2806 * Each program has its own font override path as well; e.g., | |
2807 `DVIPSFONTS' for Dvipsk. Again, this is for bitmaps, not metrics. | |
2808 | |
2809 | |
2810 File: kpathsea.info, Node: File lookup, Next: Glyph lookup, Prev: Supported file formats, Up: TeX support | |
2811 | |
2812 File lookup | |
2813 =========== | |
2814 | |
2815 This section describes how Kpathsea searches for most files (bitmap | |
2816 font searches are the exception, as described in the next section). | |
2817 | |
2818 Here is the search strategy for a file NAME: | |
2819 1. If NAME has a suffix, search for exactly NAME along the | |
2820 appropriate path. Example: given `foo.sty', look for `foo.sty' | |
2821 before `foo.sty.tex', even though it's a TeX input file. | |
2822 | |
2823 2. If the file format defines a default suffix, and the suffix of | |
2824 NAME is not already that default, try appending the default. | |
2825 Example: given `foo.bar', search for `foo.bar.tex'. But if given | |
2826 `foo.tex', don't bother to search for `foo.tex.tex'. | |
2827 | |
2828 3. If we're searching for a TFM, PK, or GF file, look for aliases of | |
2829 NAME in `texfonts.map' files (*note Fontmap::.). Example: given | |
2830 `Times-Roman', find `ptmr'. | |
2831 | |
2832 4. If the file format defines a program to invoke to create missing | |
2833 files, run it (*note MakeTeX scripts::.). | |
2834 | |
2835 5. Search for NAME itself, if we haven't done so already. Example: | |
2836 given `foo', search for `foo'. | |
2837 | |
2838 This is implemented in the routine `kpse_find_file' in | |
2839 `kpathsea/tex-file.c'. You can watch it in action with the debugging | |
2840 options (*note Debugging::.). | |
2841 | |
2842 | |
2843 File: kpathsea.info, Node: Glyph lookup, Next: Suppressing warnings, Prev: File lookup, Up: TeX support | |
2844 | |
2845 Glyph lookup | |
2846 ============ | |
2847 | |
2848 This section describes how Kpathsea searches for a bitmap font in GF | |
2849 or PK format (or either) given a font name (e.g., `cmr10') and a | |
2850 resolution (e.g., 600). | |
2851 | |
2852 Here is an outline of the search strategy (details in the sections | |
2853 below) for a file NAME at resolution DPI. The search stops at the | |
2854 first successful lookup. | |
2855 | |
2856 1. Look for an existing file NAME.DPIFORMAT in the specified | |
2857 format(s). | |
2858 | |
2859 2. If NAME is an alias for a file F in the fontmap file | |
2860 `texfonts.map', look for F.DPI. | |
2861 | |
2862 3. Run an external program (typically named `MakeTeXPK') to generate | |
2863 the font (*note MakeTeX scripts::.) | |
2864 | |
2865 4. Look for FALLBACK.DPI, where FALLBACK is some last-resort font | |
2866 (typically `cmr10'). | |
2867 | |
2868 This is implemented in `kpse_find_glyph_format' in | |
2869 `kpathsea/tex-glyph.c'. | |
2870 | |
2871 * Menu: | |
2872 | |
2873 * Basic glyph lookup:: Features common to all glyph lookups. | |
2874 * Fontmap:: Aliases for fonts. | |
2875 * Fallback font:: Resolutions and fonts of last resort. | |
2876 | |
2877 | |
2878 File: kpathsea.info, Node: Basic glyph lookup, Next: Fontmap, Up: Glyph lookup | |
2879 | |
2880 Basic glyph lookup | |
2881 ------------------ | |
2882 | |
2883 When Kpathsea looks for a bitmap font NAME at resolution DPI in a | |
2884 format FORMAT, it first checks each directory in the search path for a | |
2885 file `NAME.DPIFORMAT'; for example, `cmr10.600pk'. Kpathsea looks for | |
2886 a PK file first, then a GF file. | |
2887 | |
2888 If that fails, Kpathsea looks for `dpiDPI/NAME.FORMAT'; for example, | |
2889 `dpi600/cmr10.pk'. This is how fonts are typically stored on | |
2890 filesystems (such as DOS) that permit only three-character extensions. | |
2891 | |
2892 If that fails, Kpathsea looks for a font with a close-enough DPI. | |
2893 "Close enough" is defined by the macro `KPSE_BITMAP_TOLERANCE' in | |
2894 `kpathsea/tex-glyph.h' to be `DPI / 500 + 1'. This is slightly more | |
2895 than the 0.2% minimum allowed by the DVI standard | |
2896 (`CTAN:/dviware/driv-standard/level-0'). | |
2897 | |
2898 | |
2899 File: kpathsea.info, Node: Fontmap, Next: Fallback font, Prev: Basic glyph lookup, Up: Glyph lookup | |
2900 | |
2901 Fontmap | |
2902 ------- | |
2903 | |
2904 If a bitmap font or metric file is not found with the original name | |
2905 (see the previous section), Kpathsea looks through any "fontmap" files | |
2906 for an "alias" for the original font name. These files are named | |
2907 `texfonts.map' and searched for along the `TEXFONTMAPS' | |
2908 environment/config file variable. All `texfonts.map' files that are | |
2909 found are read; earlier definitions override later ones. | |
2910 | |
2911 This feature is intended to help in two respects: | |
2912 | |
2913 1. An alias name is limited in length only by available memory, not | |
2914 by your filesystem. Therefore, if you want to ask for | |
2915 `Times-Roman' instead of `ptmr', you can (you get `ptmr8r'). | |
2916 | |
2917 2. A few fonts have historically had multiple names: specifically, | |
2918 LaTeX's "circle font" has variously been known as `circle10', | |
2919 `lcircle10', and `lcirc10'. Aliases can make all the names | |
2920 equivalent, so that it no longer matters what the name of the | |
2921 installed file is; TeX documents will find their favorite name. | |
2922 | |
2923 | |
2924 The format of fontmap files is straightforward: | |
2925 | |
2926 * Comments start with `%' and continue to the end of the line. | |
2927 | |
2928 * Blank lines are ignored. | |
2929 | |
2930 * Each nonblank line is broken up into a series of "words": a | |
2931 sequence of non-whitespace characters. | |
2932 | |
2933 * If the first word is `include', the second word is used as a | |
2934 filename, and it is searched for and read. | |
2935 | |
2936 * Otherwise, the first word on each line is the true filename; | |
2937 | |
2938 * the second word is the alias; | |
2939 | |
2940 * subsequent words are ignored. | |
2941 | |
2942 If an alias has an extension, it matches only those files with that | |
2943 extension; otherwise, it matches anything with the same root, regardless | |
2944 of extension. For example, an alias `foo.tfm' matches only when | |
2945 `foo.tfm' is being searched for; but an alias `foo' matches `foo.vf', | |
2946 `foo.600pk', etc. | |
2947 | |
2948 As an example, here is an excerpt from the `texfonts.map' in the | |
2949 Web2c distribution. It makes the circle fonts equivalent and includes | |
2950 automatically generated maps for most PostScript fonts available from | |
2951 various font suppliers. | |
2952 | |
2953 circle10 lcircle10 | |
2954 circle10 lcirc10 | |
2955 lcircle10 circle10 | |
2956 lcircle10 lcirc10 | |
2957 lcirc10 circle10 | |
2958 lcirc10 lcircle10 | |
2959 ... | |
2960 include adobe.map | |
2961 include apple.map | |
2962 include bitstrea.map | |
2963 ... | |
2964 | |
2965 Fontmaps are implemented in the file `kpathsea/fontmap.c'. The | |
2966 Fontname distribution has much more information on font naming (*note | |
2967 Introduction: (fontname)Introduction.). | |
2968 | |
2969 | |
2970 File: kpathsea.info, Node: Fallback font, Prev: Fontmap, Up: Glyph lookup | |
2971 | |
2972 Fallback font | |
2973 ------------- | |
2974 | |
2975 If a bitmap font cannot be found or created at the requested size, | |
2976 Kpathsea looks for the font at a set of "fallback resolutions". You | |
2977 specify these resolutions as a colon-separated list (like search paths). | |
2978 Kpathsea looks first for a program-specific environment variable (e.g., | |
2979 `DVIPSSIZES' for Dvipsk), then the environment variable `TEXSIZES', | |
2980 then a default specified at compilation time (the Make variable | |
2981 `default_texsizes'). You can set this list to be empty if you prefer | |
2982 to find fonts at their stated size or not at all. | |
2983 | |
2984 Finally, if the font cannot be found even at the fallback resolutions, | |
2985 Kpathsea looks for a fallback font, typically `cmr10'. Programs must | |
2986 enable this feature by assigning to the global variable | |
2987 `kpse_fallback_font' or calling `kpse_init_prog' (*note Calling | |
2988 sequence::.); the default is no fallback font. | |
2989 | |
2990 | |
2991 File: kpathsea.info, Node: Suppressing warnings, Prev: Glyph lookup, Up: TeX support | |
2992 | |
2993 Suppressing warnings | |
2994 ==================== | |
2995 | |
2996 Kpathsea provides a way to suppress selected usually-harmless | |
2997 warnings; this is useful at large sites where most users are not | |
2998 administrators, and thus the warnings are merely a source of confusion, | |
2999 not a help. To do this, you set the environment variable or | |
3000 configuration file value `TEX_HUSH' to a colon-separated list of | |
3001 values. Here are the possibilities: | |
3002 | |
3003 `all' | |
3004 Suppress everything possible. | |
3005 | |
3006 `checksum' | |
3007 Suppress mismatched font checksum warnings. | |
3008 | |
3009 `lostchar' | |
3010 Suppress warnings when a character is missing from a font that a | |
3011 DVI or VF file tries to typeset. | |
3012 | |
3013 `readable' | |
3014 Suppress warnings about attempts to access a file whose permissions | |
3015 render it unreadable. | |
3016 | |
3017 `special' | |
3018 Suppresses warnings about an unimplemented or unparsable | |
3019 `\special' command. | |
3020 | |
3021 `tex-hush.c' defines the function that checks the variable value. Each | |
3022 driver implements its own checks where appropriate. | |
3023 | |
3024 | |
3025 File: kpathsea.info, Node: Programming, Next: Index, Prev: TeX support, Up: Top | |
3026 | |
3027 Programming | |
3028 *********** | |
3029 | |
3030 This chapter is for programmers who wish to use Kpathsea. *Note | |
3031 Introduction::, for the conditions under which you may do so. | |
3032 | |
3033 * Menu: | |
3034 | |
3035 * Overview: Programming overview. Introduction. | |
3036 * Calling sequence:: Specifics of what to call. | |
3037 * Config: Programming with config files. Getting info from texmf.cnf. | |
3038 | |
3039 | |
3040 File: kpathsea.info, Node: Programming overview, Next: Calling sequence, Up: Programming | |
3041 | |
3042 Programming overview | |
3043 ==================== | |
3044 | |
3045 Aside from this manual, your best source of information is the source | |
3046 to the programs I've modified to use Kpathsea (*note Introduction::.). | |
3047 Of those, Dviljk is probably the simplest, and hence a good place to | |
3048 start. Xdvik adds VF support and the complication of X resources. | |
3049 Dvipsk adds the complication of its own config files. Web2c is source | |
3050 code I also maintain, so it uses Kpathsea rather straightforwardly, but | |
3051 is of course complicated by the Web to C translation. Finally, | |
3052 Kpsewhich is a small utility program whose sole purpose is to exercise | |
3053 the main path-searching functionality. | |
3054 | |
3055 Beyond these examples, the `.h' files in the Kpathsea source describe | |
3056 the interfaces and functionality (and of course the `.c' files define | |
3057 the actual routines, which are the ultimate documentation). | |
3058 `pathsearch.h' declares the basic searching routine. `tex-file.h' and | |
3059 `tex-glyph.h' define the interfaces for looking up particular kinds of | |
3060 files. You may wish to use `#include <kpathsea/kpathsea.h>', which | |
3061 includes every Kpathsea header. | |
3062 | |
3063 The library provides no way for an external program to register new | |
3064 file types: `tex-file.[ch]' must be modified to do this. For example, | |
3065 Kpathsea has support for looking up Dvips config files, even though no | |
3066 program other than Dvips will likely ever want to do so. I felt this | |
3067 was acceptable, since along with new file types should also come new | |
3068 defaults in `texmf.cnf' (and its descendant `paths.h'), since it's | |
3069 simplest for users if they can modify one configuration file for all | |
3070 kinds of paths. | |
3071 | |
3072 Kpathsea does not parse any formats itself; it barely opens any files. | |
3073 Its primary purpose is to return filenames. The GNU font utilities does | |
3074 contain libraries to read TFM, GF, and PK files, as do the programs | |
3075 above, of course. | |
3076 | |
3077 | |
3078 File: kpathsea.info, Node: Calling sequence, Next: Programming with config files, Prev: Programming overview, Up: Programming | |
3079 | |
3080 Calling sequence | |
3081 ================ | |
3082 | |
3083 The typical way to use Kpathsea in your program goes something like | |
3084 this: | |
3085 | |
3086 1. Call `kpse_set_progname' with `argv[0]'; This is the only | |
3087 initialization that is mandatory to take full advantage of | |
3088 Kpathsea--specifically, for the `.PROGRAM' feature of config files | |
3089 (*note Config files::.). | |
3090 | |
3091 If necessary, `kpse_set_progname' sets the global variables | |
3092 `program_invocation_name' and `program_invocation_short_name'. | |
3093 These variables are used in the error message macros defined in | |
3094 `kpathsea/lib.h'. It also initializes debugging options based on | |
3095 the environment variable `KPATHSEA_DEBUG' (if that is set). | |
3096 Finally, it sets the variables `SELFAUTOLOC', `SELFAUTODIR' and | |
3097 `SELFAUTOPARENT' to the location, parent and grandparent directory | |
3098 of the executable, removing `.' and `..' path elements and | |
3099 resolving symbolic links. These are used in the default | |
3100 configuration file to allow people to invoke TeX from anywhere, | |
3101 specifically from a mounted CD-ROM. (You can use | |
3102 `--expand-var=\$SELFAUTOLOC', etc., to see the values finds.) | |
3103 | |
3104 2. Set debugging options. *Note Debugging::. If your program doesn't | |
3105 have a debugging option already, you can define one and set | |
3106 `kpathsea_debug' to the number that the user supplies (as in Dviljk | |
3107 and Web2c), or you can just omit this altogether (people can | |
3108 always set `KPATHSEA_DEBUG'). If you do have runtime debugging | |
3109 already, you need to merge Kpathsea's options with yours (as in | |
3110 Dvipsk and Xdvik). | |
3111 | |
3112 3. If your program has its own configuration files that can define | |
3113 search paths, you should assign those paths to the `client_path' | |
3114 member in the appropriate element of the `kpse_format_info' array. | |
3115 (This array is indexed by file type; see `tex-file.h'.) See | |
3116 `resident.c' in Dvipsk for an example. | |
3117 | |
3118 4. Call `kpse_init_prog' (see `proginit.c'). It's useful for the DVI | |
3119 drivers, at least, but for other programs it may be simpler to | |
3120 extract the parts of it that actually apply. This does not | |
3121 initialize any paths, it just looks for (and sets) certain | |
3122 environment variables and other random information. (A search | |
3123 path is always initialized at the first call to find a file of | |
3124 that type; this eliminates much useless work, e.g., initializing | |
3125 the BibTeX search paths in a DVI driver.) | |
3126 | |
3127 5. The routine to actually find a file of type FORMAT is | |
3128 `kpse_find_FORMAT', defined in `tex-file.h'. These are macros that | |
3129 expand to a call to `kpse_find_file'. You can call, say, | |
3130 `kpse_find_tfm' after doing only the first of the initialization | |
3131 steps above--Kpathsea automatically reads the `texmf.cnf' generic | |
3132 config files, looks for environment variables, and does expansions | |
3133 at the first lookup. | |
3134 | |
3135 6. To find PK and/or GF bitmap fonts, the routines are `kpse_find_pk', | |
3136 `kpse_find_gf' and `kpse_find_glyph', defined in `tex-glyph.h'. | |
3137 These return a structure in addition to the resultant filename, | |
3138 because fonts can be found in so many ways. See the documentation | |
3139 in the source. | |
3140 | |
3141 7. To actually open a file, not just return a filename, call | |
3142 `kpse_open_file'. This function takes the name to look up and a | |
3143 Kpathsea file format as arguments, and returns the usual `FILE *'. | |
3144 It always assumes the file must exist, and thus will search the | |
3145 disk if necessary (unless the search path specified `!!', etc.). | |
3146 In other words, if you are looking up a VF or some other file that | |
3147 need not exist, don't use this. | |
3148 | |
3149 | |
3150 Kpathsea also provides many utility routines. Some are generic: hash | |
3151 tables, memory allocation, string concatenation and copying, string | |
3152 lists, reading input lines of arbitrary length, etc. Others are | |
3153 filename-related: default path, tilde, and variable expansion, `stat' | |
3154 calls, etc. (Perhaps someday I'll move the former to a separate | |
3155 library.) | |
3156 | |
3157 The `c-*.h' header files can also help your program adapt to many | |
3158 different systems. You will almost certainly want to use Autoconf for | |
3159 configuring your software if you use Kpathsea; I strongly recommend | |
3160 using Autoconf regardless. It is available from | |
3161 `ftp://prep.ai.mit.edu/pub/gnu/'. | |
3162 | |
3163 | |
3164 File: kpathsea.info, Node: Programming with config files, Prev: Calling sequence, Up: Programming | |
3165 | |
3166 Programming with config files | |
3167 ============================= | |
3168 | |
3169 You can (and probably should) use the same `texmf.cnf' configuration | |
3170 file that Kpathsea uses for your program. This helps installers by | |
3171 keeping all configuration in one place. | |
3172 | |
3173 To retrieve a value VAR from config files, the best way is to call | |
3174 `kpse_var_value' on the string `VAR'. This will look first for an | |
3175 environment variable VAR, then a config file value. The result will be | |
3176 the value found or `NULL'. This function is declared in | |
3177 `kpathsea/variable.h'. For an example, see the `shell_escape' code in | |
3178 `web2c/lib/texmfmp.c'. | |
3179 | |
3180 The routine to do variable expansion in the context of a search path | |
3181 (as opposed to simply retrieving a value) is `kpse_var_expand', also | |
3182 declared in `kpathsea/variable.h'. It's generally only necessary to | |
3183 set the search path structure components as explained in the previous | |
3184 section, rather than using this yourself. | |
3185 | |
3186 If for some reason you want to retrieve a value *only* from a config | |
3187 file, not automatically looking for a corresponding environment | |
3188 variable, call `kpse_cnf_get' (declared in `kpathsea/cnf.h') with the | |
3189 string VAR. | |
3190 | |
3191 No initialization calls are needed. | |
3192 | |
3193 | |
3194 File: kpathsea.info, Node: Index, Prev: Programming, Up: Top | |
3195 | |
3196 Index | |
3197 ***** | |
3198 | |
3199 * Menu: | |
3200 | |
3201 * !! in path specifications: ls-R. | |
3202 * $ expansion: Variable expansion. | |
3203 * -1 debugging value: Debugging. | |
3204 * -A option to ls: ls-R. | |
3205 * -Bdynamic: ShellWidgetClass. | |
3206 * -Bstatic: ShellWidgetClass. | |
3207 * -color=tty: ls-R. | |
3208 * -D NUM: Path searching options. | |
3209 * -debug=NUM: Auxiliary tasks. | |
3210 * -dpi=NUM: Path searching options. | |
3211 * -dynamic: ShellWidgetClass. | |
3212 * -enable options: configure options. | |
3213 * -enable-shared: Shared library. | |
3214 * -expand-path=STRING: Auxiliary tasks. | |
3215 * -expand-var=STRING: Auxiliary tasks. | |
3216 * -format=NAME: Path searching options. | |
3217 * -g, compiling without: configure scenarios. | |
3218 * -help: Standard options. | |
3219 * -interactive: Path searching options. | |
3220 * -L option to ls: ls-R. | |
3221 * -maketex=FILETYPE: Path searching options. | |
3222 * -mode=STRING: Path searching options. | |
3223 * -must-exist: Path searching options. | |
3224 * -no-maketex=FILETYPE: Path searching options. | |
3225 * -O, compiling with: configure scenarios. | |
3226 * -path=STRING: Path searching options. | |
3227 * -progname=NAME: Path searching options. | |
3228 * -separator=STRING: Auxiliary tasks. | |
3229 * -show-path=NAME: Auxiliary tasks. | |
3230 * -srcdir, for building multiple architectures: configure scenarios. | |
3231 * -static: ShellWidgetClass. | |
3232 * -version: Standard options. | |
3233 * -with options: configure options. | |
3234 * -with-maketextex-default: MakeTeX configuration. | |
3235 * -without-maketexmf-default: MakeTeX configuration. | |
3236 * -without-maketexpk-default: MakeTeX configuration. | |
3237 * -without-maketextfm-default: MakeTeX configuration. | |
3238 * . directories, ignored: ls-R. | |
3239 * . files: ls-R. | |
3240 * .2602gf: Unable to generate fonts. | |
3241 * .afm: Supported file formats. | |
3242 * .base: Supported file formats. | |
3243 * .bib: Supported file formats. | |
3244 * .bst: Supported file formats. | |
3245 * .cnf: Supported file formats. | |
3246 * .dtx: Supported file formats. | |
3247 * .eps: Supported file formats. | |
3248 * .epsi: Supported file formats. | |
3249 * .fmt: Supported file formats. | |
3250 * .gf: Supported file formats. | |
3251 * .ist: Supported file formats. | |
3252 * .ltx: Supported file formats. | |
3253 * .map: Supported file formats. | |
3254 * .mem: Supported file formats. | |
3255 * .mf: Supported file formats. | |
3256 * .mft: Supported file formats. | |
3257 * .mp: Supported file formats. | |
3258 * .ocp: Supported file formats. | |
3259 * .ofm: Supported file formats. | |
3260 * .opl: Supported file formats. | |
3261 * .otp: Supported file formats. | |
3262 * .ovf: Supported file formats. | |
3263 * .ovp: Supported file formats. | |
3264 * .pfa: Supported file formats. | |
3265 * .pfb: Supported file formats. | |
3266 * .pk: Supported file formats. | |
3267 * .pool: Supported file formats. | |
3268 * .pro: Supported file formats. | |
3269 * .rhosts, writable by TeX: Security. | |
3270 * .tex: Supported file formats. | |
3271 * .tex file, included in ls-R: ls-R. | |
3272 * .texi: Supported file formats. | |
3273 * .texinfo: Supported file formats. | |
3274 * .tfm: Supported file formats. | |
3275 * .txi: Supported file formats. | |
3276 * .vf: Supported file formats. | |
3277 * / may not be /: Searching overview. | |
3278 * /, trailing in home directory: Tilde expansion. | |
3279 * //: Subdirectory expansion. | |
3280 * /afs/... , installing into: Installing files. | |
3281 * /etc/profile: Unable to find files. | |
3282 * /etc/profile and aliases: ls-R. | |
3283 * /var/tex/fonts: MakeTeX configuration. | |
3284 * 2602gf: Unable to generate fonts. | |
3285 * 4allTeX Live CD-ROM: CD-ROM distribution. | |
3286 * 8.3 filenames, using: MakeTeX configuration. | |
3287 * : may not be :: Searching overview. | |
3288 * :: expansion: Default expansion. | |
3289 * @VAR@ substitutions: Running configure. | |
3290 * \, line continuation in texmf.cnf: Config files. | |
3291 * \openin: Searching overview. | |
3292 * \special, suppressing warnings about: Suppressing warnings. | |
3293 * absolute filenames: Searching overview. | |
3294 * ac_include, Autoconf extension: Running configure. | |
3295 * access warnings: Searching overview. | |
3296 * Acorn TeX implementations: Other TeX packages. | |
3297 * AFMFONTS: Supported file formats. | |
3298 * AFS: Installing files. | |
3299 * AIX shells and configure: configure shells. | |
3300 * aliases for fonts: Fontmap. | |
3301 * aliases, for filenames: Filename aliases. | |
3302 * all: Suppressing warnings. | |
3303 * alphabetical order, not: Subdirectory expansion. | |
3304 * Amiga support: Custom installation. | |
3305 * Amiga TeX implementations: Other TeX packages. | |
3306 * Andrew File System, installing with: Installing files. | |
3307 * announcement mailing list: Mailing lists. | |
3308 * append-only directories and MakeTeXPK: Security. | |
3309 * appendonlydir: MakeTeX configuration. | |
3310 * architecture-(in)dependent files, installing only: Installing files. | |
3311 * architectures, compiling multiple: configure scenarios. | |
3312 * arguments to MakeTeX: MakeTeX script arguments. | |
3313 * argv[0]: Calling sequence. | |
3314 * ash, losing with configure: configure shells. | |
3315 * autoconf, recommended: Calling sequence. | |
3316 * automounter, and configuration: configure scenarios. | |
3317 * automounter, and ls-R: ls-R. | |
3318 * auxiliary tasks: Auxiliary tasks. | |
3319 * Babel <1>: Running make. | |
3320 * Babel: Kpathsea application distributions. | |
3321 * Bach, Johann Sebastian: Default expansion. | |
3322 * backbone of CTAN: Electronic distribution. | |
3323 * backslash-newline: Config files. | |
3324 * base dpi: MakeTeX script arguments. | |
3325 * bash, recommended for running configure: configure shells. | |
3326 * basic glyph lookup: Basic glyph lookup. | |
3327 * BIBINPUTS: Supported file formats. | |
3328 * binary mode, for file transfers: Electronic distribution. | |
3329 * blank lines, in texmf.cnf: Config files. | |
3330 * brace expansion: Brace expansion. | |
3331 * BSD universe: Running make. | |
3332 * bsh, ok with configure: configure shells. | |
3333 * BSTINPUTS: Supported file formats. | |
3334 * bug address: Reporting bugs. | |
3335 * bug checklist: Bug checklist. | |
3336 * bug mailing list: Mailing lists. | |
3337 * bugs, reporting: Reporting bugs. | |
3338 * c-*.h: Calling sequence. | |
3339 * c-auto.h.in: Running configure. | |
3340 * cache of fonts, loca: Security. | |
3341 * calling sequence: Calling sequence. | |
3342 * CC: configure environment. | |
3343 * cc warnings: Pointer combination warnings. | |
3344 * cc, compiling with: configure environment. | |
3345 * CD-ROM distributions: CD-ROM distribution. | |
3346 * CFLAGS: configure environment. | |
3347 * ChangeLog entry: Bug checklist. | |
3348 * checklist for bug reports: Bug checklist. | |
3349 * checksum: Suppressing warnings. | |
3350 * circle fonts: Fontmap. | |
3351 * clean Make target: Cleaning up. | |
3352 * client_path in kpse_format_info: Calling sequence. | |
3353 * cmr10, as fallback font: Fallback font. | |
3354 * cmr10.vf: Searching overview. | |
3355 * cnf.c: Config files. | |
3356 * cnf.h: Programming with config files. | |
3357 * code sharing: Shared library. | |
3358 * color printers, configuring: Simple installation. | |
3359 * comments, in fontmap files: Fontmap. | |
3360 * comments, in texmf.cnf: Config files. | |
3361 * comments, making: Introduction. | |
3362 * common features in glyph lookup: Basic glyph lookup. | |
3363 * common problems: Common problems. | |
3364 * comp.sys.sun.admin FAQ: ShellWidgetClass. | |
3365 * comp.text.tex: Mailing lists. | |
3366 * compilation: Installation. | |
3367 * compilation value, source for path: Path sources. | |
3368 * compiler bugs: TeX or Metafont failing. | |
3369 * compiler bugs, finding: TeX or Metafont failing. | |
3370 * compiler options, additional: Running make. | |
3371 * compiler options, specifying: configure environment. | |
3372 * compiler, changing: Running make. | |
3373 * conditions for use: Introduction. | |
3374 * config files: Config files. | |
3375 * config files, for Kpathsea-using programs: Calling sequence. | |
3376 * config files, programming with: Programming with config files. | |
3377 * config.log: Bug checklist. | |
3378 * config.ps, search path for: Supported file formats. | |
3379 * config.status: Bug checklist. | |
3380 * configuration: Installation. | |
3381 * configuration bugs: Bug checklist. | |
3382 * configuration compiler options: configure environment. | |
3383 * configuration file, source for path: Path sources. | |
3384 * configuration files as shell scripts.: Config files. | |
3385 * configuration of MakeTeX scripts: MakeTeX configuration. | |
3386 * configuration of optional features: configure options. | |
3387 * CONFIGURE: Running configure. | |
3388 * configure options: configure options. | |
3389 * configure options for MakeTeX scripts: MakeTeX configuration. | |
3390 * configure, running: Running configure. | |
3391 * context diff: Bug checklist. | |
3392 * continuation character: Config files. | |
3393 * core dumps, reporting: Bug checklist. | |
3394 * CPPFLAGS: configure environment. | |
3395 * crashes, reporting: Bug checklist. | |
3396 * CTAN, defined: Electronic distribution. | |
3397 * CTAN.sites: Electronic distribution. | |
3398 * custom installation: Custom installation. | |
3399 * database search: Searching overview. | |
3400 * database, for filenames: Filename database. | |
3401 * database, format of: Database format. | |
3402 * DC fonts, and dynamic source creation: MakeTeX scripts. | |
3403 * debug.h: Debugging. | |
3404 * debugger: Bug checklist. | |
3405 * debugging: Debugging. | |
3406 * debugging options, in Kpathsea-using program: Calling sequence. | |
3407 * debugging output: Debugging. | |
3408 * debugging with -g, disabling: configure scenarios. | |
3409 * DEC shells and configure: configure shells. | |
3410 * default expansion: Default expansion. | |
3411 * default path features: Default path features. | |
3412 * default paths, changing: Default path generation. | |
3413 * default paths, how they're made: Default path generation. | |
3414 * default_texsizes: Fallback font. | |
3415 * DEFS: configure environment. | |
3416 * depot: configure scenarios. | |
3417 * destination directory for MakeTeXPK: MakeTeX script arguments. | |
3418 * directories, changing default installation: Default path generation. | |
3419 * directories, making append-only: MakeTeX configuration. | |
3420 * directory structure, for TeX files: TeX directory structure. | |
3421 * disabling MakeTeX scripts: MakeTeX configuration. | |
3422 * disk search: Searching overview. | |
3423 * disk searching, avoiding: ls-R. | |
3424 * disk space, needed: Disk space. | |
3425 * disk usage, reducing: Logging. | |
3426 * distclean Make target: Cleaning up. | |
3427 * distributions, compiling simultaneously: Kpathsea application distributions. | |
3428 * distributions, not compiling: Kpathsea application distributions. | |
3429 * distributions, on CD-ROM: CD-ROM distribution. | |
3430 * distributions, on tape: Tape distribution. | |
3431 * distributions, via ftp: Electronic distribution. | |
3432 * dlclose: dlopen. | |
3433 * dlopen: dlopen. | |
3434 * dlsym: dlopen. | |
3435 * dlsym.c: dlopen. | |
3436 * doc files: Supported file formats. | |
3437 * DOS compatible names: MakeTeX configuration. | |
3438 * DOS support: Custom installation. | |
3439 * DOS TeX implementations: Other TeX packages. | |
3440 * dosnames: MakeTeX configuration. | |
3441 * dot files: ls-R. | |
3442 * doubled colons: Default expansion. | |
3443 * dpiNNN directories: MakeTeX configuration. | |
3444 * DVI drivers: Kpathsea application distributions. | |
3445 * DVILJMAKEPK: MakeTeX script names. | |
3446 * DVILJSIZES: Fallback font. | |
3447 * DVIPSFONTS: Supported file formats. | |
3448 * DVIPSHEADERS: Supported file formats. | |
3449 * DVIPSMAKEPK: MakeTeX script names. | |
3450 * DVIPSSIZES: Fallback font. | |
3451 * dynamic creation of files: MakeTeX scripts. | |
3452 * dynamic linking problems with OpenWin libraries: ShellWidgetClass. | |
3453 * elt-dirs.c: Subdirectory expansion. | |
3454 * email CTAN access: Electronic distribution. | |
3455 * enabling MakeTeX scripts: MakeTeX configuration. | |
3456 * environment variable, source for path: Path sources. | |
3457 * environment variables for TeX: Supported file formats. | |
3458 * environment variables in paths: Variable expansion. | |
3459 * environment variables, old: Unable to find files. | |
3460 * epoch, seconds since: Logging. | |
3461 * error message macros: Calling sequence. | |
3462 * excessive startup time: Slow path searching. | |
3463 * expand.c: Brace expansion. | |
3464 * expanding symlinks: Calling sequence. | |
3465 * expansion, default: Default expansion. | |
3466 * expansion, path element: Searching overview. | |
3467 * expansion, search path: Path expansion. | |
3468 * expansion, subdirectory: Subdirectory expansion. | |
3469 * expansion, tilde: Tilde expansion. | |
3470 * expansion, variable: Variable expansion. | |
3471 * explicitly relative filenames: Searching overview. | |
3472 * externally-built filename database: Filename database. | |
3473 * extra colons: Default expansion. | |
3474 * extraclean Make target: Cleaning up. | |
3475 * failed MakeTeX... script invocation: MakeTeX script names. | |
3476 * fallback font: Fallback font. | |
3477 * fallback resolutions: Fallback font. | |
3478 * fallback resolutions, overriding: Running make. | |
3479 * FAQ, comp.sys.sun.admin: ShellWidgetClass. | |
3480 * FAQ, Kpathsea: Common problems. | |
3481 * Farwell, Matthew: Subdirectory expansion. | |
3482 * features, of default paths: Default path features. | |
3483 * file formats, supported: Supported file formats. | |
3484 * file lookup: File lookup. | |
3485 * file types, registering new: Programming overview. | |
3486 * filename aliases: Filename aliases. | |
3487 * filename database: Filename database. | |
3488 * filename database generation: Filename database generation. | |
3489 * filenames, absolute or explicitly relative: Searching overview. | |
3490 * files, unable to find: Unable to find files. | |
3491 * filesystem search: Searching overview. | |
3492 * floating directories: Searching overview. | |
3493 * font alias files: Fontmap. | |
3494 * font generation failures: Unable to generate fonts. | |
3495 * font of last resort: Fallback font. | |
3496 * font set, infinite: MakeTeX scripts. | |
3497 * fontmap files: Fontmap. | |
3498 * fontnames, arbitrary length: Fontmap. | |
3499 * fonts, being created: Simple installation. | |
3500 * fopen, redefined: Debugging. | |
3501 * format of external database: Database format. | |
3502 * Free Software Foundation: CD-ROM distribution. | |
3503 * FreeBSD shells and configure: configure shells. | |
3504 * FSF Source Code CD-ROM: CD-ROM distribution. | |
3505 * ftp retrieval: Electronic distribution. | |
3506 * ftp.tug.org: unixtex.ftp. | |
3507 * fundamental purpose of Kpathsea: Introduction. | |
3508 * gcc, compiling with: configure environment. | |
3509 * gdb, recommended: Bug checklist. | |
3510 * generation of filename database: Filename database generation. | |
3511 * get_applicationShellWidgetClass: ShellWidgetClass. | |
3512 * get_wmShellWidgetClass: ShellWidgetClass. | |
3513 * GFFONTS: Supported file formats. | |
3514 * globally writable directories: Security. | |
3515 * glyph lookup: Glyph lookup. | |
3516 * glyph lookup bitmap tolerance: Basic glyph lookup. | |
3517 * GLYPHFONTS: Supported file formats. | |
3518 * GNU C compiler bugs: TeX or Metafont failing. | |
3519 * GNU General Public License: Introduction. | |
3520 * Gopher CTAN access: Electronic distribution. | |
3521 * group-writable directories: Security. | |
3522 * GUTenberg: CD-ROM distribution. | |
3523 * hash table buckets, printing: Debugging. | |
3524 * hash table routines: Calling sequence. | |
3525 * hash_summary_only variable for debugging: Debugging. | |
3526 * help, mailing list for general TeX: Mailing lists. | |
3527 * HIER: Default path features. | |
3528 * history of Kpathsea: History. | |
3529 * home directories in paths: Tilde expansion. | |
3530 * HOME, as ~ expansion: Tilde expansion. | |
3531 * identifiers, characters valid in: Config files. | |
3532 * illegal pointer combination warnings: Pointer combination warnings. | |
3533 * include fontmap directive: Fontmap. | |
3534 * INDEXSTYLE: Supported file formats. | |
3535 * info-tex@shsu.edu: Mailing lists. | |
3536 * input lines, reading: Calling sequence. | |
3537 * install-data Make target: Installing files. | |
3538 * install-exec Make target: Installing files. | |
3539 * installation: Installation. | |
3540 * installation testing: Installation testing. | |
3541 * installation, architecture-(in)dependent files only: Installing files. | |
3542 * installation, changing default directories: Default path generation. | |
3543 * installation, customized: Custom installation. | |
3544 * installation, getting executables instead of: Simple installation. | |
3545 * installation, simple: Simple installation. | |
3546 * installing files: Installing files. | |
3547 * interactive query: Path searching options. | |
3548 * interface, not frozen: Introduction. | |
3549 * introduction: Introduction. | |
3550 * kdebug:: Debugging. | |
3551 * kdefault.c: Default expansion. | |
3552 * Knuth, Donald E.: History. | |
3553 * Knuth, Donald E., archive of programs by: Other TeX packages. | |
3554 * Knuth, Donald E., original author: Electronic distribution. | |
3555 * Korn shell, losing with configure: configure shells. | |
3556 * Kpathsea config file, source for path: Path sources. | |
3557 * Kpathsea version number: Kpathsea application distributions. | |
3558 * kpathsea.h: Programming overview. | |
3559 * kpathsea/CONFIGURE: Running configure. | |
3560 * kpathsea/HIER: Default path features. | |
3561 * KPATHSEA_DEBUG: Debugging. | |
3562 * kpathsea_debug: Debugging. | |
3563 * KPATHSEA_DEBUG: Calling sequence. | |
3564 * kpathsea_debug variable: Calling sequence. | |
3565 * KPATHSEA_DPI: MakeTeX script arguments. | |
3566 * KPSE_BITMAP_TOLERANCE: Basic glyph lookup. | |
3567 * kpse_cnf_get: Programming with config files. | |
3568 * KPSE_DEBUG_EXPAND (16): Debugging. | |
3569 * KPSE_DEBUG_FOPEN (4): Debugging. | |
3570 * KPSE_DEBUG_HASH (2): Debugging. | |
3571 * KPSE_DEBUG_PATHS (8): Debugging. | |
3572 * KPSE_DEBUG_SEARCH (32): Debugging. | |
3573 * KPSE_DEBUG_STAT (1): Debugging. | |
3574 * kpse_fallback_font: Fallback font. | |
3575 * kpse_find_*: Calling sequence. | |
3576 * kpse_find_file: File lookup. | |
3577 * kpse_find_glyph_format: Glyph lookup. | |
3578 * kpse_format_info: Calling sequence. | |
3579 * kpse_format_info_type: Debugging. | |
3580 * kpse_init_prog: Calling sequence. | |
3581 * kpse_init_prog, and MAKETEX_MODE: Default path features. | |
3582 * kpse_make_specs: MakeTeX script names. | |
3583 * kpse_open_file: Calling sequence. | |
3584 * kpse_set_progname: Calling sequence. | |
3585 * kpse_var_expand: Programming with config files. | |
3586 * kpsewhich: Invoking kpsewhich. | |
3587 * Kpsewhich, and debugging: Debugging. | |
3588 * ksh, losing with configure: configure shells. | |
3589 * labrea.stanford.edu: Other TeX packages. | |
3590 * LaserJet drive: Kpathsea application distributions. | |
3591 * last-resort font: Fallback font. | |
3592 * LaTeX help mailing list: Mailing lists. | |
3593 * lcircle10: Fontmap. | |
3594 * LDFLAGS: configure environment. | |
3595 * leading colons: Default expansion. | |
3596 * leaf directories wrongly guessed: Unable to find files. | |
3597 * leaf directory trick: Subdirectory expansion. | |
3598 * libdl.a: dlopen. | |
3599 * libraries, changing: Running make. | |
3600 * libraries, specifying additional: configure environment. | |
3601 * LIBS: configure environment. | |
3602 * libucb, avoiding: Running make. | |
3603 * license for using the library: Introduction. | |
3604 * lines, reading arbitrary-length: Calling sequence. | |
3605 * Linux File System Standard: MakeTeX configuration. | |
3606 * Linux shells and configure: configure shells. | |
3607 * Linux, using Web2c: CD-ROM distribution. | |
3608 * lndir for building symlink trees: configure scenarios. | |
3609 * loader options: configure environment. | |
3610 * loader options, final: Running make. | |
3611 * loader options, initial: Running make. | |
3612 * local cache of fonts: Security. | |
3613 * log file: Logging. | |
3614 * logging successful searches: Logging. | |
3615 * lost+found directory: Searching overview. | |
3616 * lostchar: Suppressing warnings. | |
3617 * ls-R: Supported file formats. | |
3618 * ls-R and AFS: Installing files. | |
3619 * ls-R database file: ls-R. | |
3620 * ls-R, simplest build: ls-R. | |
3621 * Macintosh TeX implementations: Other TeX packages. | |
3622 * MacKenzie, David <1>: Subdirectory expansion. | |
3623 * MacKenzie, David: History. | |
3624 * mag Metafont variable: MakeTeX script arguments. | |
3625 * magic characters: Searching overview. | |
3626 * magstep for MakeTeXPK: MakeTeX script arguments. | |
3627 * mailing lists: Mailing lists. | |
3628 * maintainer-clean Make target: Cleaning up. | |
3629 * Make arguments, additional: Running make. | |
3630 * make, running: Running make. | |
3631 * Makefile.in: Running configure. | |
3632 * MakeTeX script configuration: MakeTeX configuration. | |
3633 * MakeTeX script names: MakeTeX script names. | |
3634 * MakeTeX scripts: MakeTeX scripts. | |
3635 * MakeTeX.site: MakeTeX configuration. | |
3636 * MAKETEX_BASE_DPI: MakeTeX script arguments. | |
3637 * MAKETEX_MAG: MakeTeX script arguments. | |
3638 * MAKETEX_MODE <1>: Default path features. | |
3639 * MAKETEX_MODE: MakeTeX script arguments. | |
3640 * MakeTeXMF: MakeTeX script names. | |
3641 * MakeTeXmkdir: MakeTeX configuration. | |
3642 * MakeTeXnames.cnf: MakeTeX configuration. | |
3643 * MakeTeXPK: MakeTeX script names. | |
3644 * MakeTeXPK , initial runs: Simple installation. | |
3645 * MAKETEXPK environment variable: MakeTeX script arguments. | |
3646 * MakeTeXTeX: MakeTeX script names. | |
3647 * MakeTeXTFM: MakeTeX script names. | |
3648 * memory allocation routines: Calling sequence. | |
3649 * Metafont failures: TeX or Metafont failing. | |
3650 * Metafont installation: Unable to generate fonts. | |
3651 * Metafont making too-large fonts: Unable to generate fonts. | |
3652 * Metafont mode name for MakeTeXPK: MakeTeX script arguments. | |
3653 * Metafont using the wrong resolution: Unable to generate fonts. | |
3654 * MFBASES: Supported file formats. | |
3655 * MFINPUTS: Supported file formats. | |
3656 * MFPOOL: Supported file formats. | |
3657 * MFTINPUTS: Supported file formats. | |
3658 * mirrors, FTP: Electronic distribution. | |
3659 * mismatched checksum warnings: Suppressing warnings. | |
3660 * missfont.log: MakeTeX script names. | |
3661 * MISSFONT_LOG: MakeTeX script names. | |
3662 * missing character warnings: Suppressing warnings. | |
3663 * mode directory, omitting: MakeTeX configuration. | |
3664 * mode Metafont variable: MakeTeX script arguments. | |
3665 * Morgan, Tim: History. | |
3666 * mostlyclean Make target: Cleaning up. | |
3667 * MPINPUTS: Supported file formats. | |
3668 * MPMEMS: Supported file formats. | |
3669 * MPPOOL: Supported file formats. | |
3670 * MPSUPPORT: Supported file formats. | |
3671 * MT_FEATURES: MakeTeX configuration. | |
3672 * mtp_destdir: MakeTeX script arguments. | |
3673 * multiple architectures, compiling on: configure scenarios. | |
3674 * multiple architectures, directories for: configure scenarios. | |
3675 * multiple architectures, installing on: Installing files. | |
3676 * multiple TeX hierarchies: Brace expansion. | |
3677 * must exist: Searching overview. | |
3678 * names for MakeTeX scripts: MakeTeX script names. | |
3679 * NetBSD shells and configure: configure shells. | |
3680 * Neumann, Gustaf: History. | |
3681 * newsgroup for TeX: Mailing lists. | |
3682 * NeXT, lacking X11: Kpathsea application distributions. | |
3683 * NFS and ls-R: ls-R. | |
3684 * NFS CTAN access: Electronic distribution. | |
3685 * nomode: MakeTeX configuration. | |
3686 * non-English typesetting: Kpathsea application distributions. | |
3687 * non-Unix operating systems: Custom installation. | |
3688 * Northwest Computing Support Center: Tape distribution. | |
3689 * NTG: CD-ROM distribution. | |
3690 * null pointers, dereferencing: Bug checklist. | |
3691 * numeric debugging values: Debugging. | |
3692 * obtaining TeX: unixtex.ftp. | |
3693 * obtaining TeX on tape: Tape distribution. | |
3694 * obtaining Web2c by ftp: Electronic distribution. | |
3695 * obtaining Web2c on CD-ROM: CD-ROM distribution. | |
3696 * OCPINPUTS: Supported file formats. | |
3697 * OFMFONTS: Supported file formats. | |
3698 * online Metafont display, spurious: Unable to generate fonts. | |
3699 * OpenWin libraries, dynamic linking problems: ShellWidgetClass. | |
3700 * optimization caveat: TeX or Metafont failing. | |
3701 * optimization, enabling: configure scenarios. | |
3702 * options for debugging: Debugging. | |
3703 * options to configure: configure options. | |
3704 * OS/2 support: Custom installation. | |
3705 * other TeX distributions: Other TeX packages. | |
3706 * OTPINPUTS: Supported file formats. | |
3707 * overview of path searching: Searching overview. | |
3708 * overview of programming with Kpathsea: Programming overview. | |
3709 * OVFFONTS: Supported file formats. | |
3710 * OVPFONTS: Supported file formats. | |
3711 * patches, Sun OpenWin: ShellWidgetClass. | |
3712 * path expansion: Path expansion. | |
3713 * path searching: Path searching. | |
3714 * path searching options: Path searching options. | |
3715 * path searching, overview: Searching overview. | |
3716 * path searching, standalone: Invoking kpsewhich. | |
3717 * path sources: Path sources. | |
3718 * paths, changing default <1>: Default path generation. | |
3719 * paths, changing default: Changing search paths. | |
3720 * paths, device name included in: Default path features. | |
3721 * paths.h: Default path generation. | |
3722 * paths.h, creating: Running make. | |
3723 * pathsearch.h: Programming overview. | |
3724 * pc Pascal compiler: History. | |
3725 * PCL driver: Kpathsea application distributions. | |
3726 * PDF generation: Kpathsea application distributions. | |
3727 * permission denied: Searching overview. | |
3728 * PKFONTS: Supported file formats. | |
3729 * plain.base: Unable to generate fonts. | |
3730 * pointer combination warnings: Pointer combination warnings. | |
3731 * PostScript driver: Kpathsea application distributions. | |
3732 * PostScript fonts, additional: Simple installation. | |
3733 * precompiled executables, instead of installation: Simple installation. | |
3734 * precompiled Unix binaries: Other TeX packages. | |
3735 * preprocessor options: configure environment. | |
3736 * preprocessor options, additional: Running make. | |
3737 * Prime Time TeXcetera CD-ROM: CD-ROM distribution. | |
3738 * printer configuration files: Simple installation. | |
3739 * privacy, semblance of: Logging. | |
3740 * problems, common: Common problems. | |
3741 * proginit.c: Default path features. | |
3742 * proginit.h: Calling sequence. | |
3743 * program-varying paths: Supported file formats. | |
3744 * program_invocation_name: Calling sequence. | |
3745 * program_invocation_short_name: Calling sequence. | |
3746 * programming overview: Programming overview. | |
3747 * programming with config files: Programming with config files. | |
3748 * programming with Kpathsea: Calling sequence. | |
3749 * programs using the library: Introduction. | |
3750 * proof mode: Unable to generate fonts. | |
3751 * PSHEADERS: Supported file formats. | |
3752 * pxp Pascal preprocessor: History. | |
3753 * quoting variable values: Variable expansion. | |
3754 * readable: Suppressing warnings. | |
3755 * reading arbitrary-length lines: Calling sequence. | |
3756 * README.mirrors: Electronic distribution. | |
3757 * recording successful searches: Logging. | |
3758 * relative filenames: Searching overview. | |
3759 * relative filenames in ls-R: Installing files. | |
3760 * reporting bugs: Reporting bugs. | |
3761 * resident.c: Calling sequence. | |
3762 * resolution, setting: Path searching options. | |
3763 * resolution, wrong: Unable to generate fonts. | |
3764 * resolutions, last-resort: Fallback font. | |
3765 * retrieving TeX: unixtex.ftp. | |
3766 * right-hand side of variable assignments: Config files. | |
3767 * Rokicki, Tom: History. | |
3768 * root user: Tilde expansion. | |
3769 * runtime configuration files: Config files. | |
3770 * runtime debugging: Debugging. | |
3771 * Sauter fonts, and dynamic source creation: MakeTeX scripts. | |
3772 * scripts for file creation: MakeTeX scripts. | |
3773 * search path, defined: Searching overview. | |
3774 * search paths, changing default: Changing search paths. | |
3775 * searching for files: File lookup. | |
3776 * searching for glyphs: Glyph lookup. | |
3777 * searching overview: Searching overview. | |
3778 * searching the database: Searching overview. | |
3779 * searching the disk: Searching overview. | |
3780 * security considerations: Security. | |
3781 * SELFAUTODIR: Calling sequence. | |
3782 * SELFAUTOLOC: Calling sequence. | |
3783 * SELFAUTOPARENT: Calling sequence. | |
3784 * sending patches: Bug checklist. | |
3785 * setgid scripts: Security. | |
3786 * sh5, ok with configure: configure shells. | |
3787 * shar, recommended: Bug checklist. | |
3788 * shared library, making: Shared library. | |
3789 * shell scripts as configuration files: Config files. | |
3790 * shell variables: Variable expansion. | |
3791 * shell_escape, example for code: Programming with config files. | |
3792 * shells and configure: configure shells. | |
3793 * simple installation: Simple installation. | |
3794 * site overrides for MakeTeX...: MakeTeX configuration. | |
3795 * size of distribution archives: Disk space. | |
3796 * skeleton TeX directory: TeX directory structure. | |
3797 * slow startup time: Slow path searching. | |
3798 * Solaris BSD compatibility, not: Running make. | |
3799 * source files: Supported file formats. | |
3800 * sources for search paths: Path sources. | |
3801 * special: Suppressing warnings. | |
3802 * specification for MakeTeXPK: MakeTeX script arguments. | |
3803 * st_nlink: Subdirectory expansion. | |
3804 * stack trace: Bug checklist. | |
3805 * standalone path searching: Invoking kpsewhich. | |
3806 * standard error and debugging output: Debugging. | |
3807 * standard options: Standard options. | |
3808 * startup time, excessive: Slow path searching. | |
3809 * static linking: ShellWidgetClass. | |
3810 * static linking and dlsym: dlopen. | |
3811 * string routines: Calling sequence. | |
3812 * strip: MakeTeX configuration. | |
3813 * subdirectory searching: Subdirectory expansion. | |
3814 * suggestions, making: Introduction. | |
3815 * Sun 2: History. | |
3816 * Sun OpenWin patches: ShellWidgetClass. | |
3817 * supplier directory, omitting: MakeTeX configuration. | |
3818 * support organization: Tape distribution. | |
3819 * supported file formats: Supported file formats. | |
3820 * suppressing warnings: Suppressing warnings. | |
3821 * symbolic link trees, for multiple architectures: configure scenarios. | |
3822 * symbolic links not found: Unable to find files. | |
3823 * symbolic links, and ls-R: ls-R. | |
3824 * symlinks, resolving: Calling sequence. | |
3825 * system C compiler bugs: TeX or Metafont failing. | |
3826 * system dependencies: Running configure. | |
3827 * system V universe: Running make. | |
3828 * T1FONTS: Supported file formats. | |
3829 * T1INPUTS: Supported file formats. | |
3830 * tape distribution: Tape distribution. | |
3831 * TDS: TeX directory structure. | |
3832 * testing, post-installation: Installation testing. | |
3833 * tests, simple: Simple installation. | |
3834 * teTeX: Other TeX packages. | |
3835 * TeX directory structure: TeX directory structure. | |
3836 * TeX distributions besides Web2c: Other TeX packages. | |
3837 * TeX environment variables: Supported file formats. | |
3838 * TeX failures: TeX or Metafont failing. | |
3839 * TeX file lookup: File lookup. | |
3840 * TeX glyph lookup: Glyph lookup. | |
3841 * TeX help mailing list: Mailing lists. | |
3842 * TeX hierarchy, one: configure scenarios. | |
3843 * TeX Live CD-ROM: CD-ROM distribution. | |
3844 * TeX support: TeX support. | |
3845 * TeX Users Group: Introduction. | |
3846 * tex-archive@math.utah.edu: Mailing lists. | |
3847 * tex-file.c: File lookup. | |
3848 * tex-file.h: Programming overview. | |
3849 * tex-glyph.c: Glyph lookup. | |
3850 * tex-glyph.h: Programming overview. | |
3851 * tex-k-request@mail.tug.org: Mailing lists. | |
3852 * tex-k@mail.tug.org (bug address): Reporting bugs. | |
3853 * tex-make.c: MakeTeX script names. | |
3854 * TEX_HUSH <1>: Suppressing warnings. | |
3855 * TEX_HUSH: Searching overview. | |
3856 * TEXBIB: Supported file formats. | |
3857 * TEXCONFIG: Supported file formats. | |
3858 * TEXDOCS: Supported file formats. | |
3859 * TEXFONTMAPS: Supported file formats. | |
3860 * TEXFONTS: Supported file formats. | |
3861 * texfonts.map: Fontmap. | |
3862 * TEXFORMATS: Supported file formats. | |
3863 * TEXINDEXSTYLE: Supported file formats. | |
3864 * TEXINPUTS: Supported file formats. | |
3865 * TEXMF: TeX directory structure. | |
3866 * texmf.cnf, and variable expansion: Variable expansion. | |
3867 * texmf.cnf, creating: Running make. | |
3868 * texmf.cnf, definition for: Config files. | |
3869 * texmf.cnf, generated: Default path generation. | |
3870 * texmf.cnf, source for path: Path sources. | |
3871 * texmf.cnf.in: Default path generation. | |
3872 * texmf.cnf.in, editing: Changing search paths. | |
3873 * texmf.sed: Default path generation. | |
3874 * TEXMFCNF <1>: Supported file formats. | |
3875 * TEXMFCNF: Config files. | |
3876 * TEXMFDBS <1>: ls-R. | |
3877 * TEXMFDBS: Supported file formats. | |
3878 * TEXMFINI: Supported file formats. | |
3879 * TEXMFLOG: Logging. | |
3880 * TEXMFOUTPUT: MakeTeX script names. | |
3881 * TEXPICTS: Supported file formats. | |
3882 * TEXPKS: Supported file formats. | |
3883 * TEXPOOL: Supported file formats. | |
3884 * TEXPSHEADERS: Supported file formats. | |
3885 * TEXSIZES: Fallback font. | |
3886 * TEXSOURCES: Supported file formats. | |
3887 * TFMFONTS: Supported file formats. | |
3888 * tilde expansion: Tilde expansion. | |
3889 * tilde.c: Tilde expansion. | |
3890 * time system call: Logging. | |
3891 * tolerance for glyph lookup: Basic glyph lookup. | |
3892 * total disk space: Disk space. | |
3893 * trailing / in home directory: Tilde expansion. | |
3894 * trailing colons: Default expansion. | |
3895 * TRFONTS: Supported file formats. | |
3896 * trick for detecting leaf directories: Subdirectory expansion. | |
3897 * trojan horse attack: Security. | |
3898 * TUG: CD-ROM distribution. | |
3899 * tug.cs.umb.edu: unixtex.ftp. | |
3900 * tug@tug.org: Introduction. | |
3901 * typeface directory, omitting: MakeTeX configuration. | |
3902 * ucbinclude, avoiding: Running make. | |
3903 * UKTUG: CD-ROM distribution. | |
3904 * Ultrix shells and configure: configure shells. | |
3905 * unable to find files: Unable to find files. | |
3906 * unable to generate fonts: Unable to generate fonts. | |
3907 * uname: Bug checklist. | |
3908 * universe, BSD vs. system V: Running make. | |
3909 * UNIX_ST_LINK: Subdirectory expansion. | |
3910 * unixtex.ftp: unixtex.ftp. | |
3911 * unixtex@u.washington.edu: Tape distribution. | |
3912 * unknown special warnings: Suppressing warnings. | |
3913 * unreadable file warnings: Suppressing warnings. | |
3914 * unreadable files: Searching overview. | |
3915 * unusable ls-R warning: ls-R. | |
3916 * usage patterns, finding: Logging. | |
3917 * USE_VARTEXFONTS: MakeTeX configuration. | |
3918 * Usenet TeX newsgroup: Mailing lists. | |
3919 * varfonts: MakeTeX configuration. | |
3920 * variable expansion: Variable expansion. | |
3921 * variable.c: Variable expansion. | |
3922 * variable.h: Programming with config files. | |
3923 * VARTEXFONTS: MakeTeX configuration. | |
3924 * VAX 11/750: History. | |
3925 * version number, of Kpathsea: Kpathsea application distributions. | |
3926 * version numbers, determining: Bug checklist. | |
3927 * VF files, not found: Searching overview. | |
3928 * VFFONTS: Supported file formats. | |
3929 * VMS support: Custom installation. | |
3930 * VMS TeX implementations: Other TeX packages. | |
3931 * Vojta, Paul: History. | |
3932 * Walnut Creek TeX CD-ROM: CD-ROM distribution. | |
3933 * Walsh, Norman: History. | |
3934 * warning about unusable ls-R: ls-R. | |
3935 * warnings, file access: Searching overview. | |
3936 * warnings, pointer combinations: Pointer combination warnings. | |
3937 * warnings, suppressing: Suppressing warnings. | |
3938 * wcstombs: dlopen. | |
3939 * whitespace, in fontmap files: Fontmap. | |
3940 * whitespace, not ignored on continuation lines: Config files. | |
3941 * Windows TeX implementations: Other TeX packages. | |
3942 * World Wide Web CTAN access: Electronic distribution. | |
3943 * www.tug.org: unixtex.ftp. | |
3944 * X11 previewer: Kpathsea application distributions. | |
3945 * X11, lacking on NeXT: Kpathsea application distributions. | |
3946 * XCFLAGS: Running make. | |
3947 * XCPPFLAGS: Running make. | |
3948 * XDEFS: Running make. | |
3949 * XDVIFONTS: Supported file formats. | |
3950 * XDVIMAKEPK: MakeTeX script names. | |
3951 * XDVISIZES: Fallback font. | |
3952 * XLDFLAGS: Running make. | |
3953 * XLOADLIBES: Running make. | |
3954 * XMAKEARGS: Running make. | |
3955 * Xmu library problems: ShellWidgetClass. | |
3956 * XtStrings: XtStrings. | |
3957 * zuhn, david: History. | |
3958 * { expansion: Brace expansion. | |
3959 * ~ expansion: Tilde expansion. | |
3960 | |
3961 | |
3962 | |
3963 Tag Table: | |
3964 Node: Top1433 | |
3965 Node: Introduction2080 | |
3966 Node: History4437 | |
3967 Node: Installation8250 | |
3968 Node: Simple installation9023 | |
3969 Node: Custom installation12062 | |
3970 Node: Disk space13230 | |
3971 Node: Kpathsea application distributions14090 | |
3972 Node: Changing search paths15194 | |
3973 Node: Default path features16385 | |
3974 Node: Default path generation18513 | |
3975 Node: Running configure19944 | |
3976 Node: configure shells20990 | |
3977 Node: configure options21759 | |
3978 Node: configure environment22970 | |
3979 Node: configure scenarios24758 | |
3980 Node: Shared library26369 | |
3981 Node: Running make27616 | |
3982 Node: Installing files29648 | |
3983 Node: Cleaning up31583 | |
3984 Node: Filename database generation32618 | |
3985 Node: MakeTeX scripts33179 | |
3986 Node: MakeTeX configuration34140 | |
3987 Node: MakeTeX script names37184 | |
3988 Node: MakeTeX script arguments38287 | |
3989 Node: Installation testing40355 | |
3990 Node: Security40719 | |
3991 Node: TeX directory structure42950 | |
3992 Node: unixtex.ftp47362 | |
3993 Node: Electronic distribution48931 | |
3994 Node: CD-ROM distribution51252 | |
3995 Node: Tape distribution52926 | |
3996 Node: Other TeX packages53786 | |
3997 Node: Reporting bugs55075 | |
3998 Node: Bug checklist55810 | |
3999 Node: Mailing lists59900 | |
4000 Node: Debugging61245 | |
4001 Node: Logging65404 | |
4002 Node: Common problems66902 | |
4003 Node: Unable to find files67652 | |
4004 Node: Slow path searching70064 | |
4005 Node: Unable to generate fonts71427 | |
4006 Node: TeX or Metafont failing72978 | |
4007 Node: XtStrings74335 | |
4008 Node: dlopen75163 | |
4009 Node: ShellWidgetClass75965 | |
4010 Node: Pointer combination warnings77579 | |
4011 Node: Path searching77954 | |
4012 Node: Searching overview78599 | |
4013 Node: Path sources81959 | |
4014 Node: Config files83024 | |
4015 Node: Path expansion86519 | |
4016 Node: Default expansion87383 | |
4017 Node: Variable expansion89106 | |
4018 Node: Tilde expansion90474 | |
4019 Node: Brace expansion91358 | |
4020 Node: Subdirectory expansion92150 | |
4021 Node: Filename database94478 | |
4022 Node: ls-R95784 | |
4023 Node: Filename aliases98662 | |
4024 Node: Database format99827 | |
4025 Node: Invoking kpsewhich100839 | |
4026 Node: Path searching options101708 | |
4027 Node: Auxiliary tasks105363 | |
4028 Node: Standard options106604 | |
4029 Node: TeX support106914 | |
4030 Node: Supported file formats108201 | |
4031 Node: File lookup113362 | |
4032 Node: Glyph lookup114701 | |
4033 Node: Basic glyph lookup115825 | |
4034 Node: Fontmap116692 | |
4035 Node: Fallback font119290 | |
4036 Node: Suppressing warnings120246 | |
4037 Node: Programming121303 | |
4038 Node: Programming overview121751 | |
4039 Node: Calling sequence123667 | |
4040 Node: Programming with config files128053 | |
4041 Node: Index129337 | |
4042 | |
4043 End Tag Table |