home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / texlatex.zip / web2c72.zip / info / kpathsea.info (.txt) next >
GNU Info File  |  1999-09-14  |  51KB  |  936 lines

  1. This is Info file kpathsea.info, produced by Makeinfo-1.64 from the
  2. input file kpathsea.texi.
  3.   TeX
  4.   * Kpathsea: (kpathsea).                       File lookup along
  5. search paths.  * kpsewhich: (kpathsea)Invoking kpsewhich.    TeX file
  6. searching.  * mktexmf: (kpathsea)mktex scripts.           MF source
  7. generation.  * mktexpk: (kpathsea)mktex scripts.           PK bitmap
  8. generation.  * mktextex: (kpathsea)mktex scripts.          TeX source
  9. generation.  * mktextfm: (kpathsea)mktex scripts.          TeX font
  10. metric generation.  * mktexlsr: (kpathsea)Filename database.
  11. Update ls-R.   direntry
  12.   This file documents the Kpathsea library for path searching.
  13.   Copyright (C) 1993, 94, 95, 96, 97 K. Berry & O. Weber.
  14.   Permission is granted to make and distribute verbatim copies of this
  15. manual provided the copyright notice and this permission notice are
  16. preserved on all copies.
  17.   Permission is granted to copy and distribute modified versions of this
  18. manual under the conditions for verbatim copying, provided that the
  19. entire resulting derived work is distributed under the terms of a
  20. permission notice identical to this one.
  21.   Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that this permission notice may be stated in a
  24. translation approved by the Free Software Foundation.
  25. File: kpathsea,  Node: Top,  Next: Introduction,  Up: (dir)
  26. Kpathsea library
  27. ****************
  28.   This manual documents how to install and use the Kpathsea library for
  29. filename lookup.  It corresponds to version 3.2, released in October
  30. 1997.
  31. * Menu:
  32. * Introduction::                Overview.
  33. * Installation::                Compilation, installation, and bug reporting.
  34. * Path searching::              How filename lookups work.
  35. * TeX support::                 Special support for TeX-related file lookups.
  36. * Programming::                 How to use Kpathsea features in your program.
  37. * Index::                       General index.
  38. File: kpathsea,  Node: Introduction,  Next: Installation,  Prev: Top,  Up: Top
  39. Introduction
  40. ************
  41.   This manual corresponds to version 3.2 of the Kpathsea library,
  42. released in October 1997.
  43.   The library's fundamental purpose is to return a filename from a list
  44. of directories specified by the user, similar to what shells do when
  45. looking up program names to execute.
  46.   The following software, all of which we maintain, uses this library:
  47.    * Dviljk (see the `dvilj' man page)
  48.    * Dvipsk (*note Introduction: (dvips)Top.)
  49.    * GNU font utilities (*note Introduction: (fontu)Top.)
  50.    * Web2c (*note Introduction: (web2c)Top.)
  51.    * Xdvik (see the `xdvi' man page)
  52. Other software that we do not maintain also uses it.
  53.   We are still actively maintaining the library (and probably always
  54. will be, despite our hopes).  If you have comments or suggestions,
  55. please send them to us (*note Reporting bugs::.).
  56.   We distribute the library under the GNU Library General Public License
  57. (LGPL), with one exception (see below).  In short, this means if you
  58. write a program using the library, you must (offer to) distribute the
  59. source to the library, along with any changes you have made, and allow
  60. anyone to modify the library source and distribute their modifications.
  61. It does not mean you have to distribute the source to your program,
  62. although we hope you will.
  63.   The exception is the part of the file `expand.c' which implements
  64. brace expansion.  We took this from Bash, which is covered by the GNU
  65. General Public License (GPL).  Therefore, if you wish to redistribute
  66. the library under the LGPL, you must remove this code.  (If you write a
  67. replacement we can distribute, we hope you'll share it with us.)  See
  68. the files `COPYING' and `COPYING.LIB' for the text of the GNU licenses.
  69.   If you know enough about TeX to be reading this manual, then you (or
  70. your institution) should consider joining the TeX Users Group (if
  71. you're already a member, great!).  TUG produces the periodical
  72. `TUGboat', sponsors an annual meeting and publishes the proceedings,
  73. and arranges courses on TeX for all levels of users throughout the
  74. world.  Anyway, here is the address:
  75.      TeX Users Group
  76.      P.O. Box 1239
  77.      Three Rivers, CA 93271-1239
  78.      USA
  79.      phone: 1 209 561 0112
  80.      fax: 1 209 561 4584
  81.      email: tug@tug.org
  82. * Menu:
  83. * History::
  84. File: kpathsea,  Node: History,  Up: Introduction
  85. History
  86. =======
  87.   (This section is for those people who are curious about how the
  88. library came about.)  (If you like to read historical accounts of
  89. software, we urge you to seek out the GNU Autoconf manual and the
  90. "Errors of TeX" paper by Don Knuth, published in `Software--Practice and
  91. Experience' 19(7), July 1989.)
  92.   [Karl writes.]  My first ChangeLog entry for Web2c seems to be
  93. February 1990, but I may have done some work before then.  In any case,
  94. Tim Morgan and I were jointly maintaining it for a time.  (I should
  95. mention here that Tim had made Web2c into a real distribution long
  96. before I had ever used it or even heard of it, and Tom Rokicki did the
  97. original implementation.  I was using `pxp' and `pc' on VAX 11/750's
  98. and the hot new Sun 2 machines.)
  99.   It must have been later in 1990 and 1991 that I started working on
  100. `TeX for the Impatient'. Dvips, Xdvi, Web2c, and the GNU fontutils
  101. (which I was also writing at the time) all used different environment
  102. variables, and, more importantly, had different bugs in their path
  103. searching. This became extremely painful, as I was stressing everything
  104. to the limit working on the book.  I also desperately wanted to
  105. implement subdirectory searching, since I couldn't stand putting
  106. everything in one big directory, and also couldn't stand having to
  107. explicitly specify `cm', `pandora', ... in a path.
  108.   In the first incarnation, I just hacked separately on each
  109. program--that was the original subdirectory searching code in both Xdvi
  110. and Dvips, though I think Paul Vojta has completely rewritten Xdvi's
  111. support by now.  That is, I tried to go with the flow in each program,
  112. rather than changing the program's calling sequences to conform to
  113. common routines.
  114.   Then, as bugs inevitably appeared, I found I was fixing the same thing
  115. three times (Web2c and fontutils were always sharing code, since I
  116. maintained those--there was no Dvipsk or Xdvik or Dviljk at this
  117. point).  After a while, I finally started sharing source files.  They
  118. weren't yet a library, though.  I just kept things up to date with shell
  119. scripts.  (I was developing on a 386 running ISC 2.2 at the time, and so
  120. didn't have symbolic links.  An awful experience.)
  121.   The ChangeLogs for Xdvik and Dvipsk record initial releases of those
  122. distributions in May and June 1992.  I think it was because I was tired
  123. of the different configuration strategies of each program, not so much
  124. because of the path searching.  (Autoconf was being developed by David
  125. MacKenzie and others, and I was adapting it to TeX and friends.)
  126.   I started to make a separate library that other programs could link
  127. with on my birthday in April 1993, according to the ChangeLog.  I don't
  128. remember exactly why I finally took the time to make it a separate
  129. library; a conversation with david zuhn that initiated it.  Just seemed
  130. like it was time.
  131.   Dviljk got started in March 1994 after I bought a Laserjet 4.
  132. (Kpathsea work got suspended while Norm Walsh and I, with Gustaf
  133. Neumann's help, implemented a way for TeX to get at all those neat
  134. builtin LJ4 fonts ... such a treat to have something to typeset in
  135. besides Palatino!)
  136.   By spring of 1995, I had implemented just about all the path-searching
  137. features in Kpathsea that I plan to, driven beyond my initial goals by
  138. Thomas Esser and others.  I then started to integrate Web2c with
  139. Kpathsea. After the release of a stable Web2c, I hope to be able to stop
  140. development, and turn most of my attention back to making fonts for GNU.
  141. (Always assuming Micros**t hasn't completely obliterated Unix by then,
  142. or that software patents haven't stopped software development by anybody
  143. smaller than a company with a million-dollar-a-year legal budget.  Which
  144. is actually what I think is likely to happen, but that's another
  145. story...)
  146.   [Olaf writes.]  At the end of 1997, UNIX is still alive and kicking,
  147. individuals still develop software, and Web2c development still
  148. continues.  Karl had been looking for some time for someone to take up
  149. part of the burden, and I volunteered.
  150. File: kpathsea,  Node: Installation,  Next: Path searching,  Prev: Introduction,  Up: Top
  151. Installation
  152. ************
  153.   (A copy of this chapter is in the distribution file
  154. `kpathsea/INSTALL'.)
  155.   The procedure for Kpathsea (and Web2c, etc.) configuration and
  156. installation follows.  If you encounter trouble, see *Note Common
  157. problems::, a copy of which is in the file `kpathsea/BUGS'.
  158. * Menu:
  159. * Simple installation::      If you just want to do it.
  160. * Custom installation::      If you want to change things around.
  161. * Security::                 Who can write what files, etc.
  162. * TeX directory structure::  Managing the horde of TeX input files.
  163. * unixtex.ftp::              Getting software via FTP, on CD-ROM, or on tape.
  164. * Reporting bugs::           Where and how to report bugs.
  165. File: kpathsea,  Node: Simple installation,  Next: Custom installation,  Up: Installation
  166. Simple installation
  167. ===================
  168.   Installing TeX and friends for the first time can be a daunting
  169. experience.  Thus, you may prefer to skip this whole thing and just get
  170. precompiled executables: see *Note unixtex.ftp::.
  171.   This section explains what to do if you wish to take the defaults for
  172. everything, and generally to install in the simplest possible way.  Most
  173. steps here refer to corresponding subsection in the next section which
  174. explains how to override defaults and generally gives more details.
  175.   By default everything will be installed under `/usr/local' and the
  176. following discussion assumes this.  However, if you already have TeX
  177. installed, its location is used to derive the directory under which
  178. everything is to be installed.
  179.   1. Be sure you have enough disk space: approximately 8 megabytes for
  180.      the compressed archives, 15MB for sources, 45MB for compilation,
  181.      40MB for the (initial) installed system (including library files).
  182.      *Note Disk space::.
  183.   2. Retrieve these two distribution archives:
  184.     ftp://ftp.tug.org/tex/texk.tar.gz
  185.           These are the sources, which you will be compiling.
  186.     ftp://ftp.tug.org/tex/texklib.tar.gz
  187.           This is a basic set of input files.  You should unpack it in
  188.           the directory `/usr/local/share'; doing so will create a
  189.           `texmf' subdirectory there.
  190.      *Note Kpathsea application distributions::.
  191.   3. When using the default search paths, there is no need to edit any
  192.      distribution files. *Note Changing search paths::.
  193.   4. At the top level of the distribution, run `sh configure'.  (If you
  194.      have the GNU Bash shell installed, run `bash configure'.) *Note
  195.      Running configure::.
  196.   5. `make'. *Note Running make::.  If you are using a BSD 4.4 system
  197.      such as FreeBSD or NetBSD, use GNU make (often installed in
  198.      `/usr/local/bin'), not the BSD make.
  199.      If you are using a HP-UX 10 system and the native compiler,
  200.      specify the `+u' flag in `XCFLAGS'.
  201.   6. `make install'. *Note Installing files::.
  202.   7. `make distclean'. *Note Cleaning up::.
  203.   8. Set up a cron job to rebuild the filename database that makes
  204.      searching faster.  This line will rebuild it every midnight:
  205.           0 0 * * * cd /usr/local/share/texmf && /BINDIR/mktexlsr
  206.      *Note Filename database generation::, and *Note Filename
  207.      database::.
  208.   9. If you're installing Dvips, you also need to set up configuration
  209.      files for your printers and make any additional PostScript fonts
  210.      available.  *Note Installation: (dvips)Installation.  If you have
  211.      any color printers, see *Note Color device configuration:
  212.      (dvips)Color device configuration.
  213.  10. The first time you run a DVI driver, a bunch of PK fonts will be
  214.      built by Metafont via `mktexpk' (and added to the filename
  215.      database).  This will take some time.  Don't be alarmed; they will
  216.      created only this first time (unless something is wrong with your
  217.      path definitions).
  218.      By default, `mktexpk' will create these fonts in a hierarchy under
  219.      `/var/tmp/texfonts'; it simply assumes that `/var/tmp' exists and
  220.      is globally writable.  If you need a different arrangement, see
  221.      *Note mktex configuration::.
  222.      *Note mktex scripts::.
  223.  11. For some simple tests, try `tex story \\bye' and `latex sample2e'.
  224.      Then run `xdvi story' or `dvips sample2e' on the resulting DVI
  225.      files to preview/print the documents.  *Note Installation
  226.      testing::.
  227. File: kpathsea,  Node: Custom installation,  Next: Security,  Prev: Simple installation,  Up: Installation
  228. Custom installation
  229. ===================
  230.   Most sites need to modify the default installation procedure in some
  231. way, perhaps merely changing the prefix from `/usr/local', perhaps
  232. adding extra compiler or loader options to work around `configure'
  233. bugs.  This section explains how to override default choices.  For
  234. additional distribution-specific information:
  235.    * `dviljk/INSTALL'.
  236.    * *Note Installation: (dvips)Installation.
  237.    * *Note Installation: (web2c)Installation.
  238.    * `xdvik/INSTALL'.
  239.   These instructions are for Unix systems.  Other operating-system
  240. specific distributions have their own instructions.  The code base
  241. itself supports Amiga, DOS, OS/2, and VMS.
  242.   Following are the same steps as in the previous section (which
  243. describes the simplest installation), but with much more detail.
  244. * Menu:
  245. * Disk space::
  246. * Kpathsea application distributions::
  247. * Changing search paths::
  248. * Running configure::
  249. * Running make::
  250. * Installing files::
  251. * Cleaning up::
  252. * Filename database generation::
  253. * mktex scripts::
  254. * Installation testing::
  255. File: kpathsea,  Node: Disk space,  Next: Kpathsea application distributions,  Up: Custom installation
  256. Disk space
  257. ----------
  258.   Here is a table showing the disk space needed for each distribution
  259. (described in the next section).  The `(totals)' line reflects the
  260. `texk' source distribution and `texklib'; the individual distributions
  261. don't enter into it.  Sizes are in megabytes.  All numbers are
  262. approximate.
  263.   distribution .tar.gz unpacked compiled installed  Distribution
  264. .tar.gz  Unpacked  Compiled  Installed  dviljk      .9   3.8   dvipsk
  265.   .9   3.2   xdvik       .7   2.5   web2c      1.3   5.0   web
  266. 1.9   6.5     -  -  texk       3.8  14.1  43.1  23.5  texklib    3.8
  267. 15.0     -  15.0  (totals)   7.6  29.1  43.1  38.5  multitable
  268. File: kpathsea,  Node: Kpathsea application distributions,  Next: Changing search paths,  Prev: Disk space,  Up: Custom installation
  269. Kpathsea application distributions
  270. ----------------------------------
  271.   The archive ftp://ftp.tug.org/tex/texk.tar.gz contains all of the
  272. Kpathsea applications I maintain, and the library itself.  For example,
  273. since NeXT does not generally support X11, you'd probably want to skip
  274. `xdvik' (or simply remove it after unpacking `texk.tar.gz'.  If you are
  275. not interested in all of them, you can also retrieve them separately:
  276. `dviljk.tar.gz'
  277.      DVI to PCL, for LaserJet printers.
  278. `dvipsk.tar.gz'
  279.      DVI to PostScript, for previewers, printers, or PDF generation.
  280. `web2c.tar.gz'
  281.      The software needed to compile TeX and friends.
  282. `web.tar.gz'
  283.      The original WEB source files, also used in compilation.
  284. `xdvik.tar.gz'
  285.      DVI previewing under the X window system.
  286.   If you want to use the Babel LaTeX package for support of non-English
  287. typesetting, you may need to retrieve additional files.  See the file
  288. `install.txt' in the Babel distribution.
  289. File: kpathsea,  Node: Changing search paths,  Next: Running configure,  Prev: Kpathsea application distributions,  Up: Custom installation
  290. Changing search paths
  291. ---------------------
  292.   If the search paths for your installation differ from the standard
  293. TeX directory structure (*note Introduction: (tds)Top.), edit the file
  294. `kpathsea/texmf.in' as desired, before running `configure'.  For
  295. example, if you have all your fonts or macros in one big directory.
  296.   You may also wish to edit the file `mktex.cnf', either before or
  297. after installation, to control various aspects of `mktexpk' and
  298. friends.  *Note mktex configuration::.
  299.   You do not need to edit `texmf.in' to change the default top-level or
  300. other installation *directories* (only the paths).  You can and should
  301. do that when you run `configure' (next step).
  302.   You also do not need to edit `texmf.in' if you are willing to rely on
  303. `texmf.cnf' at runtime to define the paths, and let the compile-time
  304. default paths be incorrect.  Usually there is no harm in doing this.
  305.   The section below explains default generation in more detail.
  306. * Menu:
  307. * Default path features::
  308. * Default path generation::
  309. File: kpathsea,  Node: Default path features,  Next: Default path generation,  Up: Changing search paths
  310. Default path features
  311. .....................
  312.   The purpose of having all the different files described in the section
  313. above is to avoid having the same information in more than one place. If
  314. you change the installation directories or top-level prefix at
  315. `configure'-time, those changes will propagate through the whole
  316. sequence.  And if you change the default paths in `texmf.in', those
  317. changes are propagated to the compile-time defaults.
  318.   The Make definitions are all repeated in several Makefile's; but
  319. changing the top-level `Makefile' should suffice, as it passes down all
  320. the variable definitions, thus overriding the submakes.  (The
  321. definitions are repeated so you can run Make in the subdirectories, if
  322. you should have occasion to.)
  323.   By default, the bitmap font paths end with `/$MAKETEX_MODE', thus
  324. including the device name (usually a Metafont mode name such as
  325. `ljfour').  This distinguishes two different devices with the same
  326. resolution--a write/white from a write/black 300dpi printer, for
  327. example.
  328.   However, since most sites don't have this complication, Kpathsea
  329. (specifically, the `kpse_init_prog' function in `kpathsea/proginit.c')
  330. has a special case: if the mode has not been explicitly set by the user
  331. (or in a configuration file), it sets `MAKETEX_MODE' to `/'.  This
  332. makes the default PK path, for example, expand into `.../pk//', so
  333. fonts will be found even if there is no subdirectory for the mode (if
  334. you arranged things that way because your site has only one printer,
  335. for example) or if the program is mode-independent (e.g., `pktype').
  336.   To make the paths independent of the mode, simply edit `texmf.in'
  337. before installation, or the installed `texmf.cnf', and remove the
  338. `$MAKETEX_MODE'.
  339.   *Note mktex script arguments::, for how this interacts with `mktexpk'.
  340.   *Note TeX directory structure: TeX directory structure, for a
  341. description of the default arrangement of the input files that comprise
  342. the TeX system.  The file `kpathsea/HIER' is a copy of that section.
  343. File: kpathsea,  Node: Default path generation,  Prev: Default path features,  Up: Changing search paths
  344. Default path generation
  345. .......................
  346.   This section describes how the default paths are constructed.
  347.   You may wish to ignore the whole mess and simply edit `texmf.cnf'
  348. after it is installed, perhaps even copying it into place beforehand so
  349. you can complete the installation, if it seems necessary.
  350.   To summarize the chain of events that go into defining the default
  351. paths:
  352.   1. `configure' creates a `Makefile' from each `Makefile.in'.
  353.   2. When Make runs in the `kpathsea' directory, it creates a file
  354.      `texmf.sed' that substitutes the Make value of `$(var)' for a
  355.      string `@var@'.  The variables in question are the one that define
  356.      the installation directories.
  357.   3. `texmf.sed' (together with a little extra magic--see
  358.      `kpathsea/Makefile') is applied to `texmf.in' to generate
  359.      `texmf.cnf'.  This is the file that will eventually be installed
  360.      and used.
  361.   4. The definitions in `texmf.cnf' are recast as C `#define''s in
  362.      `paths.h'.  These values will be the compile-time defaults; they
  363.      are not used at runtime unless no `texmf.cnf' file can be found.
  364.      (That's a lie: the compile-time defaults are what any extra :'s in
  365.      `texmf.cnf' expand into; but the paths as distributed have no extra
  366.      :'s, and there's no particular reason for them to.)
  367. File: kpathsea,  Node: Running configure,  Next: Running make,  Prev: Changing search paths,  Up: Custom installation
  368. Running `configure'
  369. -------------------
  370.   Run `sh configure OPTIONS' (in the top-level directory, the one
  371. containing `kpathsea/'), possibly using a shell other than `sh' (*note
  372. configure shells::.).
  373.   `configure' adapts the source distribution to the present system via
  374. `#define''s in `*/c-auto.h', which are created from the corresponding
  375. `c-auto.in'.  It also creates a `Makefile' from the corresponding
  376. `Makefile.in', doing `@VAR@' and `ac_include' substitutions).
  377.   `configure' is the best place to control the configuration,
  378. compilation, and installed location of the software, either via
  379. command-line options, or by setting environment variables before
  380. invoking it.  For example, you can disable `mktexpk' by default with
  381. the option `--disable-mktexpk'.  *Note configure options::.
  382. * Menu:
  383. * configure shells::
  384. * configure options::
  385. * configure environment::
  386. * configure scenarios::
  387. * Shared library::
  388. File: kpathsea,  Node: configure shells,  Next: configure options,  Up: Running configure
  389. `configure' shells
  390. ..................
  391.   If you have Bash, the GNU shell, use it if `sh' runs into trouble
  392. (*note Top: (features)Top.).
  393.   Most Bourne shell variants other than Bash cannot handle `configure'
  394. scripts as generated by GNU Autoconf (*note Introduction:
  395. (autoconf)Top.).  Specifically:
  396. `ksh'
  397.      The Korn shell may be installed as `/bin/sh' on AIX.  `/bin/bsh'
  398.      may serve instead.
  399. `ash'
  400.      Ash is sometimes installed as `/bin/sh' on NetBSD, FreeBSD, and
  401.      Linux systems.  `/bin/bash' should be available.
  402. `Ultrix /bin/sh'
  403.      `/bin/sh' under Ultrix is a DEC-grown shell that is notably
  404.      deficient in many ways.  `/bin/sh5' may be necessary.
  405. File: kpathsea,  Node: configure options,  Next: configure environment,  Prev: configure shells,  Up: Running configure
  406. `configure' options
  407. ...................
  408.   For a complete list of all `configure' options, run `configure
  409. --help' or see *Note Running `configure' scripts: (autoconf)Invoking
  410. configure, (a copy is in the file `kpathsea/README.CONFIGURE').  The
  411. generic options are listed first in the `--help' output, and the
  412. package-specific options come last.  The environment variables
  413. `configure' pays attention to are listed below.
  414.   Options particularly likely to be useful are `--prefix', `--datadir',
  415. and the like; see *Note configure scenarios::.
  416.   This section gives pointers to descriptions of the `--with' and
  417. `--enable' options to `configure' that Kpathsea-using programs accept.
  418. `--without-mktexmf-default'
  419. `--without-mktexpk-default'
  420. `--without-mktextfm-default'
  421. `--with-mktextex-default'
  422.      Enable or disable the dynamic generation programs.  *Note mktex
  423.      configuration::.
  424. `--enable-shared'
  425.      Build Kpathsea as a shared library, and link against it.  Also
  426.      build the usual static library.  *Note Shared library::.
  427. `--disable-static'
  428.      Build only the shared library.   Implies `--enable-shared'.
  429. `--enable-maintainer-mode'
  430.      Enables make targets that are useful for the maintainer and likely
  431.      to be a pain for anyone else; the makefiles created when this
  432.      option is enabled may not work at all for you.  You have been
  433.      warned.
  434. File: kpathsea,  Node: configure environment,  Next: configure scenarios,  Prev: configure options,  Up: Running configure
  435. `configure' environment
  436. .......................
  437.   `configure' uses the value of the following environment variables in
  438. determining your system's characteristics, and substitutes for them in
  439. Makefile's:
  440.      The compiler to use: default is `gcc' if it's installed, otherwise
  441.      `cc'.
  442. `CFLAGS'
  443.      Options to give the compiler: default is `-g -O2' for `gcc', `-g'
  444.      otherwise.  `CFLAGS' comes after any other options.  You may need
  445.      to include `-w' here if your compilations commonly have useless
  446.      warnings (e.g., `NULL redefined'), or `configure' may fail to
  447.      detect the presence of header files (it takes the messages on
  448.      standard error to mean the header file doesn't exist).
  449. `CPPFLAGS'
  450.      Options to pass to the compiler preprocessor; this matters most for
  451.      configuration, not the actual source compilation.  The `configure'
  452.      script often does only preprocessing (e.g., to check for the
  453.      existence of #include files), and `CFLAGS' is not used for this.
  454.      You may need to set this to something like
  455.      `-I/usr/local/include/wwwhatever' if you have the libwww library
  456.      installed for hyper-xdvik (see `xdvik/INSTALL').
  457. `DEFS'
  458.      Additional preprocessor options, but not used by `configure'.
  459.      Provided for enabling or disabling program features, as documented
  460.      in the various program-specific installation instructions.  `DEFS'
  461.      comes before any compiler options included by the distribution
  462.      `Makefile's or by `configure'.
  463. `LDFLAGS'
  464.      Additional options to give to the loader.  `LDFLAGS' comes before
  465.      any other linker options.
  466. `LIBS'
  467.      Additional libraries to link with.
  468. File: kpathsea,  Node: configure scenarios,  Next: Shared library,  Prev: configure environment,  Up: Running configure
  469. `configure' scenarios
  470. .....................
  471.   Here are some common installation scenarios:
  472.    * Including X support in Metafont.  This is disabled by default,
  473.      since many sites have no use for it, and it's a leading cause of
  474.      configuration problems.
  475.           configure --with-x
  476.    * Putting the binaries, TeX files, GNU info files, etc. into a single
  477.      TeX hierarchy, say `/here/texmf', requires overriding defaults in
  478.      `configure':
  479.           configure --prefix=/here/texmf --datadir=/here
  480.    * You can compile on multiple architectures simultaneously either by
  481.      building symbolic link trees with the `lndir' script from the X11
  482.      distribution, or with the `--srcdir' option:
  483.           configure --srcdir=SRCDIR
  484.    * If you are installing binaries for multiple architectures into a
  485.      single hierarchy, you will probably want to override the default
  486.      `bin' and `lib' directories, something like this:
  487.           configure --prefix=TEXMF --datadir=TEXMF \
  488.             --bindir=TEXMF/ARCH/bin --libdir=TEXMF/ARCH/lib
  489.           make texmf=TEXMF
  490.       (Unless you make provisions for architecture-specific files in
  491.      other ways, e.g., with Depot or an automounter.)
  492.    * To compile with optimization (to compile without debugging, remove
  493.      the `-g'):
  494.           env CFLAGS="-g -O" sh configure ...
  495.       For a potential problem if you optimize, see *Note TeX or
  496.      Metafont failing: TeX or Metafont failing.
  497. File: kpathsea,  Node: Shared library,  Prev: configure scenarios,  Up: Running configure
  498. Shared library
  499. ..............
  500.   You can compile Kpathsea as a shared library on a few systems, by
  501. specifying the option `--enable-shared' when you run `configure'.
  502.   The main advantage in doing this is that the executables can then
  503. share the code, thus decreasing memory and disk space requirements.
  504.   On some systems, you can record the location of shared libraries in a
  505. binary, usually by giving certain options to the linker.  Then
  506. individual users do not need to set their system's environment variable
  507. (e.g., `LD_LIBRARY_PATH') to find shared libraries.  If you want to do
  508. this, you will need to add the necessary options to `LDFLAGS' yourself;
  509. for example, on Solaris, include something like `-R${prefix}/lib', on
  510. IRIX or Linux, use `-rpath${prefix}/lib'.  (Unfortunately, making this
  511. happen by default is very difficult, because of interactions with an
  512. existing installed shared library.)
  513.   Currently, shared library support is implemented only on Linux, SunOS
  514. 4 (Solaris 1), SunOS 5 (Solaris 2), IRIX 5, and IRIX 6.  If you're
  515. interested and willing in adding support for other systems, please see
  516. the `configure' mode in the `klibtool' script, especially the
  517. host-specific case statement around line 250.
  518. File: kpathsea,  Node: Running make,  Next: Installing files,  Prev: Running configure,  Up: Custom installation
  519. Running `make'
  520. --------------
  521.   `make' (still in the top-level directory).  This also creates the
  522. `texmf.cnf' and `paths.h' files that define the default search paths,
  523. and (by default) the `plain' and `latex' TeX formats.
  524.   You can override directory names and other values at `make'-time.
  525. `make/paths.make' lists the variables most commonly reset.  For
  526. example, `make default_texsizes=600' changes the list of fallback
  527. resolutions.
  528.   You can also override each of `configure''s environment variables
  529. (*note configure environment::.).  The Make variables have the same
  530. names.
  531.   Finally, you can supply additional options via the following
  532. variables.  (`configure' does not use these.)
  533. `XCPPFLAGS'
  534. `XDEFS'
  535.      Preprocessor options.
  536. `XCFLAGS'
  537.      Compiler options.
  538. `XLDFLAGS'
  539.      Loader options (included at beginning of link commands).
  540. `XLOADLIBES'
  541.      More loader options (included at end of link commands).
  542. `XMAKEARGS'
  543.      Additional Make arguments passed to all sub-`make''s. You may need
  544.      to include assignments to the other variables here via `XMAKEARGS';
  545.      for example: `make XMAKEARGS="CFLAGS=-O XDEFS=-DA4"'.
  546.   It's generally a bad idea to use a different compiler (`CC') or
  547. libraries (`LIBS') for compilation than you did for configuration,
  548. since the values `configure' determined may then be incorrect.
  549.   Adding compiler options to change the "universe" you are using
  550. (typically BSD vs. system V) is generally a cause of trouble.  It's
  551. best to use the native environment, whatever that is; `configure' and
  552. the software usually adapt best to that.  In particular, under Solaris
  553. 2.x, you should not use the BSD-compatibility library (`libucb') or
  554. include files (`ucbinclude').
  555.   If you want to use the Babel LaTeX package for support of non-English
  556. typesetting, you need to modify some files before making the LaTeX
  557. format.  See the file `install.txt' in the Babel distribution.
  558. File: kpathsea,  Node: Installing files,  Next: Cleaning up,  Prev: Running make,  Up: Custom installation
  559. Installing files
  560. ----------------
  561.   The basic command is the usual `make install'.  For security issues,
  562. *note Security::..
  563.   The first time you install any manual in the GNU Info system, you
  564. should add a line (you choose where) to the file `dir' in your
  565. `$(infodir)' directory.  Sample text for this is given near the top of
  566. the Texinfo source files (`kpathsea/kpathsea.texi',
  567. `dvipsk/dvips.texi', and `web2c/doc/web2c.texi').  If you have a recent
  568. version of the GNU Texinfo distribution installed
  569. (ftp://prep.ai.mit.edu/pub/gnu/texinfo-3.9.tar.gz or later), this
  570. should happen automatically.
  571.   On the offchance that this is your first Info installation, the `dir'
  572. file I use is included in the distribution as `etc/dir-example'.
  573.   You may wish to use one of the following targets, especially if you
  574. are installing on multiple architectures:
  575.    * `make install-exec' to install in architecture-dependent
  576.      directories, i.e., ones that depend on the `$(exec_prefix)' Make
  577.      variable.  This includes links to binaries, libraries, etc., not
  578.      just "executables".
  579.    * `make install-data' to install in architecture-independent
  580.      directories, such as documentation, configuration files, pool
  581.      files, etc.
  582.   If you use the Andrew File System, the normal path (e.g., PREFIX/bin)
  583. only gets you to a read-only copy of the files, and you must specify a
  584. different path for installation.  The best way to do this is by setting
  585. the `prefix' variable on the `make' command line.  The sequence becomes
  586. something like this:
  587.      configure --prefix=/whatever
  588.      make
  589.      make install prefix=/afs/.SYSTEM.NAME/system/1.3/@sys/whatever
  590.    With AFS, you will definitely want to use relative filenames in
  591. `ls-R' (*note Filename database::.), not absolute filenames.  This is
  592. done by default, but check anyway.
  593. File: kpathsea,  Node: Cleaning up,  Next: Filename database generation,  Prev: Installing files,  Up: Custom installation
  594. Cleaning up
  595. -----------
  596. The basic command is `make distclean'.  This removes all files created
  597. by the build.
  598.   Alternatively,
  599.    * `make mostlyclean' if you intend to compile on another
  600.      architecture.  For Web2C, since the generated C files are portable,
  601.      they are not removed.  If the `lex' vs. `flex' situation is going
  602.      to be different on the next machine, `rm web2c/lex.yy.c'.
  603.    * `make clean' to remove files created by compiling, but leave
  604.      configuration files and Makefiles.
  605.    * `make maintainer-clean' to remove everything that the Makefiles can
  606.      rebuild.  This is more than `distclean' removes, and you should
  607.      only use it if you are thoroughly conversant with (and have the
  608.      necessary versions of) Autoconf.
  609.    * `make extraclean' to remove other junk, e.g., core files, log
  610.      files, patch rejects.  This is independent of the other `clean'
  611.      targets.
  612. File: kpathsea,  Node: Filename database generation,  Next: mktex scripts,  Prev: Cleaning up,  Up: Custom installation
  613. Filename database generation
  614. ----------------------------
  615.   You will probably want to set up a `cron' entry on the appropriate
  616. machine(s) to rebuild the filename database nightly or so, as in:
  617.      0 0 * * * cd TEXMF && /BINDIR/mktexlsr
  618.    *Note Filename database::.
  619. Although the `mktex...' scripts make every effort to add newly-created
  620. files on the fly, it can't hurt to make sure you get a fresh version
  621. every so often.
  622. File: kpathsea,  Node: mktex scripts,  Next: Installation testing,  Prev: Filename database generation,  Up: Custom installation
  623. `mktex' scripts
  624. ---------------
  625.   If Kpathsea cannot otherwise find a file, for some file types it is
  626. configured by default to invoke an external program to create it
  627. dynamically (*note mktex configuration::.).  This is most useful for
  628. fonts (bitmaps, TFM's, and arbitrarily-sizable Metafont sources such as
  629. the Sauter and EC fonts), since any given document can use fonts never
  630. before referenced.  Trying to build all fonts in advance is therefore
  631. impractical, if not impossible.
  632.   The script is passed the name of the file to create and possibly other
  633. arguments, as explained below.  It must echo the full pathname of the
  634. file it created (and nothing else) to standard output; it can write
  635. diagnostics to standard error.
  636. * Menu:
  637. * mktex configuration::
  638. * mktex script names::
  639. * mktex script arguments::
  640. File: kpathsea,  Node: mktex configuration,  Next: mktex script names,  Up: mktex scripts
  641. `mktex' configuration
  642. .....................
  643.   The following file types can run an external program to create missing
  644. files: `pk', `tfm', `mf', `tex'; the scripts are named `mktexpk',
  645. `mktextfm', `mktexmf', and `mktextex'.
  646.   In the absence of `configure' options specifying otherwise,
  647. everything but `mktextex' will be enabled by default. The `configure'
  648. options to change the defaults are:
  649.      --without-mktexmf-default
  650.      --without-mktexpk-default
  651.      --without-mktextfm-default
  652.      --with-mktextex-default
  653.   The `configure' setting is overridden if the environment variable or
  654. configuration file value named for the script is set; e.g., `MKTEXPK'
  655. (*note mktex script arguments::.).
  656.   As distributed, all the scripts source a file `texmf/web2c/mktex.cnf'
  657. if it exists, so you can override various defaults.  See `mktex.opt',
  658. for instance, which defines the default mode, resolution, some special
  659. directory names, etc.  If you prefer not to change the distributed
  660. scripts, you can simply create `mktex.cnf' with the appropriate
  661. definitions (you do not need to create it if you have nothing to put in
  662. it).  `mktex.cnf' has no special syntax; it's an arbitrary Bourne shell
  663. script.  The distribution contains a sample `mktex.cnf' for you to copy
  664. and modify as you please (it is not installed anywhere).
  665.   In addition, you can configure a number of features with the
  666. `MT_FEATURES' variable, which you can define:
  667.    * in `mktex.opt', as just mentioned;
  668.    * by editing the file `mktex.opt', either before `make install' (in
  669.      the source hierarchy) or after (in the installed hierarchy);
  670.    * or in the environment.
  671.   If none of the options below are enabled, `mktexpk', `mktextfm', and
  672. `mktexmf' follow the following procedure to decide where fonts should
  673. be installed.  Find the tree where the font's sources are, and test the
  674. permissions of the `fonts' directory of that tree to determine whether
  675. it is writable.  If it is, put the files in the tree in appropriate
  676. locations.  If it isn't writable, see whether the tree is a system tree
  677. (named in `SYSTEXMF').  If so, the `VARTEXFONTS' tree is used.  In all
  678. other cases the working directory is used.
  679.   The `appendonlydir' option is enabled by default.
  680. `appendonlydir'
  681.      Tell `mktexdir' to create directories append-only, i.e., set their
  682.      sticky bit (*note Mode Structure: (fileutils)Mode Structure.).
  683.      This feature is silently ignored on non-Unix platforms (e.g.
  684.      Windows/NT and MS-DOS) which don't support similar functionality.
  685.      This feature is enabled by default.
  686. `dosnames'
  687.      Use 8.3 names; e.g., `dpi600/cmr10.pk' instead of `cmr10.600pk'.
  688.      Note that this feature only affects filenames that would otherwise
  689.      clash with other TeX-related filenames; `mktex' scripts do nothing
  690.      about filenames which exceed the 8+3 MS-DOS limits but remain
  691.      unique when truncated (by the OS) to these limits, and nether do
  692.      the scripts care about possible clashes with files which aren't
  693.      related with TeX.  For example, `cmr10.600pk' would clash with
  694.      `cmr10.600gf' and is therefore changed when `dosnames' is in
  695.      effect, but `mf.pool' and `mp.base' don't clash with any
  696.      TeX-related files and are therefore unchanged.
  697.      This feature is turned on by default on MS-DOS.  If you do not wish
  698.      `dosnames' to be set on an MS-DOS platform, you need to set the
  699.      `MT_FEATURES' environment variable to a value that doesn't include
  700.      `dosnames'.  You can also change the default setting by editing
  701.      `mktex.opt', but only if you use the `mktex' shell scripts; the
  702.      emulation programs don't consult `mktex.opt'.
  703. `fontmaps'
  704.      Instead of deriving the location of a font in the destination tree
  705.      from the location of the sources, the aliases and directory names
  706.      from the Fontname distribution are used. (*note Introduction:
  707.      (fontname)Top.).
  708. `nomode'
  709.      Omit the directory level for the mode name; this is fine as long as
  710.      you generate fonts for only one mode.
  711. `stripsupplier'
  712.      Omit the font supplier name directory level.
  713. `striptypeface'
  714.      Omit the font typeface name directory level.
  715. `strip'
  716.      Omit the font supplier and typeface name directory levels.  This
  717.      feature is deprecated in favour of `stripsupplier' and
  718.      `striptypeface'.
  719. `varfonts'
  720.      When this option is enabled, fonts that would otherwise be written
  721.      in system texmf tree go to the `VARTEXFONTS' tree instead.  The
  722.      default value in `kpathsea/Makefile.in' is `/var/tmp/texfonts'.
  723.      The `Linux File System Standard' recommends `/var/tex/fonts'.
  724.      The `varfonts' setting in `MT_FEATURES' is overridden by the
  725.      `USE_VARTEXFONTS' environment variable: if set to `1', the feature
  726.      is enabled, and if set to `0', the feature is disabled.
  727. File: kpathsea,  Node: mktex script names,  Next: mktex script arguments,  Prev: mktex configuration,  Up: mktex scripts
  728. `mktex' script names
  729. ....................
  730.   The following table shows the default name of the script for each
  731. possible file types.  (The source is the variable `kpse_make_specs' in
  732. `kpathsea/tex-make.c'.)
  733. `mktexpk'
  734.      Glyph fonts.
  735. `mktextex'
  736.      TeX input files.
  737. `mktexmf'
  738.      Metafont input files.
  739. `mktextfm'
  740.      TFM files.
  741. These names are overridden by an environment variable specific to the
  742. program--for example, `DVIPSMAKEPK' for Dvipsk.
  743.   If a `mktex...' script fails, the invocation is appended to a file
  744. `missfont.log' (by default) in the current directory.  You can then
  745. execute the log file to create the missing files after fixing the
  746. problem.
  747.   If the current directory is not writable and the environment variable
  748. or configuration file value `TEXMFOUTPUT' is set, its value is used.
  749. Otherwise, nothing is written.  The name `missfont.log' is overridden
  750. by the `MISSFONT_LOG' environment variable or configuration file value.
  751. File: kpathsea,  Node: mktex script arguments,  Prev: mktex script names,  Up: mktex scripts
  752. `mktex' script arguments
  753. ........................
  754.   The first argument to a `mktex' script is always the name of the file
  755. to be created.
  756.   In the default `mktexpk' implementation, additional arguments may
  757. also be passed:
  758. `--dpi NUM'
  759.      Sets the resolution of the generated font to NUM.
  760. `--mfmode NAME'
  761.      Sets the Metafont mode to NAME.
  762. `--bdpi NUM'
  763.      Sets the the "base dpi" for the font.  This must match the mode
  764.      being used.
  765. `--mag STRING'
  766.      A "magstep" string suitable for the Metafont `mag' variable.  This
  767.      must match the combination of BDPI and DPI being used.
  768. `--destdir STRING'
  769.      A directory name. If the directory is absolute, it is used as-is.
  770.      Otherwise, it is appended to the root destination directory set in
  771.      the script.
  772. File: kpathsea,  Node: Installation testing,  Prev: mktex scripts,  Up: Custom installation
  773. Installation testing
  774. --------------------
  775.   Besides the tests listed in *Note Simple installation::, you can try
  776. running `make check'.  This includes the torture tests (trip, trap, and
  777. mptrap) that come with Web2c (*note Triptrap: (web2c)Triptrap.).
  778. File: kpathsea,  Node: Security,  Next: TeX directory structure,  Prev: Custom installation,  Up: Installation
  779. Security
  780. ========
  781.   None of the programs in the TeX system require any special system
  782. privileges, so there's no first-level security concern of people gaining
  783. illegitimate root access.
  784.   A TeX document, however, can write to arbitrary files, e.g.,
  785. `~/.rhosts', and thus an unwitting user who runs TeX on a random
  786. document is vulnerable to a trojan horse attack.  This loophole is
  787. closed by default, but you can be permissive if you so desire in
  788. `texmf.cnf'.  *Note tex invocation: (web2c)tex invocation.  MetaPost has
  789. the same issue.
  790.   Dvips, Xdvi, and TeX can also execute shell commands under some
  791. circumstances.  To disable this, see the `-R' option in *Note Option
  792. details: (dvips)Option details, the xdvi man page, and *Note tex
  793. invocation: (web2c)tex invocation, respectively.
  794.   Another security issue arises because it's very useful--almost
  795. necessary--to make arbitrary fonts on user demand with `mktexpk' and
  796. friends.  Where do these files get installed?  By default, the
  797. `mktexpk' distributed with Kpathsea assumes a world-writable `/var/tmp'
  798. directory; this is a simple and convenient approach, but it may not
  799. suit your situation because it means that a local cache of fonts is
  800. created on every machine.
  801.   To avoid this duplication, many people consider a shared, globally
  802. writable font tree desirable, in spite of the potential security
  803. problems.  To do this you should change the value of `VARTEXFONTS' in
  804. `texmf.cnf' to refer to some globally known directory.  *Note mktex
  805. configuration::.
  806.   The first restriction you can apply is to make newly-created
  807. directories under `texmf' be append-only with an option in `mktex.cnf'.
  808. *Note mktex configuration::.
  809.   Another approach is to establish a group (or user) for TeX files,
  810. make the `texmf' tree writable only to that group (or user), and make
  811. `mktexpk' et al. setgid to that group (or setuid to that user).  Then
  812. users must invoke the scripts to install things.  (If you're worried
  813. about the inevitable security holes in scripts, then you could write a
  814. C wrapper to exec the script.)
  815.   The `mktex...' scripts install files with the same read and write
  816. permissions as the directory they are installed in.  The executable,
  817. sgid, suid, and sticky bits are always cleared.
  818.   Any directories created by the `mktex...' scripts have the same
  819. permissions as their parent directory, unless the `appendonlydir'
  820. feature is used, in which case the sticky bit is always set.
  821. File: kpathsea,  Node: TeX directory structure,  Next: unixtex.ftp,  Prev: Security,  Up: Installation
  822. TeX directory structure
  823. =======================
  824.   This section describes the default installation hierarchy of the
  825. distribution.  It conforms to both the GNU coding standards and the TeX
  826. directory structure (TDS) standard.  For rationale and further
  827. explanation, please see those documents.  The GNU standard is available
  828. as ftp://prep.ai.mit.edu/pub/gnu/standards/standards.texi and mirrors.
  829. The TDS document is available from `CTAN:/tex-archive/tds' (*note
  830. unixtex.ftp::.).
  831.   You can change the default paths in many ways (*note Changing search
  832. paths::.).  One common desire is to put everything (binaries and all)
  833. under a single top-level directory such as `/usr/local/texmf' or
  834. `/opt/texmf'--in the terms used below, make PREFIX and TEXMF the same.
  835. For specific instructions on doing that, see *Note configure
  836. scenarios::.
  837.   Here is a skeleton of the default directory structure, extracted from
  838. the TDS document:
  839.      PREFIX/      installation root (`/usr/local' by default)
  840.       bin/         executables
  841.       man/         man pages
  842.       include/     C header files
  843.       info/        GNU info files
  844.       lib/         libraries (`libkpathsea.*')
  845.       share/       architecture-independent files
  846.        texmf/      TDS root
  847.         bibtex/     BibTeX input files
  848.          bib/        BibTeX databases
  849.           base/       base distribution (e.g., `xampl.bib')
  850.           misc/       single-file databases
  851.           PKG/       name of a package
  852.          bst/        BibTeX style files
  853.           base/       base distribution (e.g., `plain.bst', `acm.bst')
  854.           misc/       single-file styles
  855.           PKG/       name of a package
  856.         doc/         additional documentation
  857.         dvips/       `.pro', `.ps', `psfonts.map'
  858.         fonts/       font-related files
  859.          TYPE/         file type (e.g., `tfm', `pk')
  860.           MODE/          type of output device (types `pk' and `gf' only)
  861.            SUPPLIER/       name of a font supplier (e.g., `public')
  862.             TYPEFACE/        name of a typeface (e.g., `cm')
  863.              dpiNNN/           font resolution (types `pk' and `gf' only)
  864.         metafont/    Metafont (non-font) input files
  865.          base/        base distribution (e.g., `plain.mf')
  866.          misc/        single-file packages (e.g., `modes.mf')
  867.          PKG/           name of a package (e.g., `mfpic')
  868.         metapost/    MetaPost input files
  869.          base/        base distribution (e.g., `plain.mp')
  870.          misc/        single-file packages
  871.          PKG/           name of a package
  872.          support/     support files for MetaPost-related utilities (e.g., `trfonts.map')
  873.         mft/         `MFT' inputs (e.g., `plain.mft')
  874.         tex/         TeX input files
  875.          FORMAT/         name of a format (e.g., `plain')
  876.           base/        base distribution for FORMAT (e.g., `plain.tex')
  877.           misc/        single-file packages (e.g., `webmac.tex')
  878.           local/       local additions to or local configuration files for FORMAT
  879.           PKG/           name of a package (e.g., `graphics', `mfnfss')
  880.          generic/     format-independent packages
  881.           hyphen/      hyphenation patterns (e.g., `hyphen.tex')
  882.           images/      image input files (e.g., Encapsulated PostScript)
  883.           misc/        single-file format-independent packages (e.g., `null.tex').
  884.           PKG/           name of a package (e.g., `babel')
  885.         web2c/        implementation-dependent files (`.pool', `.fmt', `texmf.cnf', etc.)
  886.   Some concrete examples for most file types:
  887.      /usr/local/bin/tex
  888.      /usr/local/man/man1/xdvi.1
  889.      /usr/local/info/kpathsea.info
  890.      /usr/local/lib/libkpathsea.a
  891.      /usr/local/share/texmf/bibtex/bst/base/plain.bst
  892.      /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmr10.600pk
  893.      /usr/local/share/texmf/fonts/source/public/pandora/pnr10.mf
  894.      /usr/local/share/texmf/fonts/tfm/public/cm/cmr10.tfm
  895.      /usr/local/share/texmf/fonts/type1/adobe/utopia/putr.pfa
  896.      /usr/local/share/texmf/metafont/base/plain.mf
  897.      /usr/local/share/texmf/metapost/base/plain.mp
  898.      /usr/local/share/texmf/tex/plain/base/plain.tex
  899.      /usr/local/share/texmf/tex/generic/hyphen/hyphen.tex
  900.      /usr/local/share/texmf/web2c/tex.pool
  901.      /usr/local/share/texmf/web2c/tex.fmt
  902.      /usr/local/share/texmf/web2c/texmf.cnf
  903. File: kpathsea,  Node: unixtex.ftp,  Next: Reporting bugs,  Prev: TeX directory structure,  Up: Installation
  904. `unixtex.ftp': Obtaining TeX
  905. ============================
  906.   This is ftp://ftp.tug.org/tex/unixtex.ftp, last updated 18 March 1998.
  907. Also available as http://www.tug.org/unixtex.ftp.  The IP address is
  908. currently `[158.121.106.10]', and the canonical host name is currently
  909. `tug.org'.  It is also in Kpathsea source distributions as
  910. `etc/unixtex.ftp' (although the network version is usually newer).
  911. Mail kb@mail.tug.org with comments or questions.
  912.   Following are general instructions for Unix or other sites who wish to
  913. acquire the Web2c distribution, (plain) TeX, LaTeX (2e), BibTeX,
  914. Metafont, MetaPost, DVI processors for the X window system, PostScript,
  915. the PCL language in the HP LaserJet, and related programs.  They are
  916. oriented towards building from the original sources, though some
  917. information on alternative packages is included in the last section.
  918. See also http://www.tug.org/web2c, the Web2c and Kpathsea home page.
  919.   Please consider joining the TeX Users Group (TUG) to help support the
  920. maintenance and development of the programs you retrieve.  Email
  921. tug@tug.org or see http://www.tug.org for information and a membership
  922. form.
  923.   For actual installation instructions after obtaining the necessary
  924. sources, see *Note Installation::.  A copy is in the distribution file
  925. `kpathsea/INSTALL'.
  926. * Menu:
  927. * Electronic distribution::  CTAN and so forth.
  928. * CD-ROM distribution::
  929. * Tape distribution::
  930. * Other TeX packages::
  931. File: kpathsea,  Node: Electronic distribution,  Next: CD-ROM distribution,  Up: unixtex.ftp
  932. Electronic distribution
  933. -----------------------
  934.   In many places we refer to CTAN:.  This is *both* a host name and a
  935. directory name.  Here are some primary locations:
  936.