tds draft 0.9991

Ulrik Vieth twg-tds@tug.cs.umb.edu
Wed, 20 Nov 1996 17:01:05 +0100


David wrote:

> Appendix B3.
> Nothing on a Mac or a PC? Shame.

Well, there is Peter Breitenlohner's PubliC (e)TeX/METAFONT/MetaPost
for DOS-TP (a Turbo Pascal implementation), which is admittedly not 
as widely known as e.g. emTeX, yet it does fully support the TDS now.
Appended below is the original documentation from the lastest release
concerning its directory structure and file searching mechanism.

If you want something on emTeX and other DOS or Mac implementations,
you'll probably have to ask the individual maintainers whether or 
not they plan to support the TDS, and if so in how far.

Cheers, Ulrik.

P.S. It's been a very long time since I last Public TeX.  The only
thing I remember is that it used to be awfully slow.  I believe it
took almost 40 minutes to docstrip nfss2ltx on a 386-SX with 16 MHz.


[dostp/doc/dostp.doc]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
TeXMF   ---   Dos-TP 2.1   ---   DosTP

   Dos-TP, Version 2.1

Purpose:

   DosTP (Version 2.0 or later) is a Turbo Pascal unit, or library, that
   provides various common services for PubliC (e)TeX/METAFONT/MetaPost,
   and the Dos-TP implementations of many of the utility programs.
   The most important of these services is the file search mechanism
   for various types of input files (similar to kpathsea for the web2c
   implementations).

   See also: DosTPQry, TeX, eTeX, METAFONT, MetaPost

Dos-TP and the TeX directory structure (TDS):

   The TDS draft `A Directory Structure for TeX Files' recommends a
   directory structure for TeX (and METAFONT and ...) files.  This TDS
   is defined relative to a root <texmf>.  As an example, the TFM files
   should be in subdirectories of <texmf>\fonts\tfm\.

   The Dos-TP implementation specific files should be placed as follows:
      <texmf>\dostp\      the standard configuration file 'texmf.cnf'
      <texmf>\dostp\bin\     all executables (should be in the Dos path)
      <texmf>\dostp\ini\     TeX formats, MF bases, MP mems, and pool
                             files
      <texmf>\dostp\doc\     documentation
      <texmf>\dostp\src21\   source files for Version 2.1
      <texmf>\dostp\tmp\     used when generating from sources

The file search mechanism:

   Note, that the new file search mechanism (unlike earlier Dos-TP
   implementations) finds files in the current directory only if it is
   explicitly included in the search path (as it is now in all
   compile-time defaults and in the standard configuration file).

   For each type of input file (e.g., 'TFMfonts' or 'TeXinputs') there
   are three sources for a search path:
   1. the value of a Dos environment variable (possibly with a qualfier)
   2. the value from a configuration file (possibly with a qualifier)
   3. the compile-time default specified in the file 'dostp.web'.

   Most programs use just their name (the name of the '.exe' file to be
   precise) as qualifier; there are, however, some important exceptions:
      (e)VIRTEX uses the name of the default format file,
      VIRMF uses the name of the default base file,
      VIRMP uses the name of the default mem file.
      These defaults can be specified on the command line in the form
          virtex -f<format> ...   (same for evirtex)
          virmf -b<base> ...
          virmp -m<mem> ...
      if the command line contains no such option 'plain' will be used.

      DosTPQry (a utility to interrogate the file search mechanism) uses
      a qualifier specified on the command line in the form
         dostpqry -q<qualifier> ...
      the default is again 'plain'.

   The value of a Dos environment variable with the correct qualifier
   takes precedence over the value of an unqualified Dos environment
   variable.  Similarly, a configuration file value with the correct
   qualifier takes precedence over an unqualified configuration file
   value.

   Each of the three search paths (from environment, configuration file,
   and compile-time default) is a semicolon separated list of directory
   specifications.  If the environment value contains an empty directory
   specifications (i.e., is empty or contains leading, trailing, or
   consecutive semicolons) that empty specification is replaced by the
   configuration file value.  Similarly an empty directory specification
   in the configuration file value is replaced by the compile-time
   default value (probably not what you want).  The file search
   mechanism will process one directory specification after the other
   and eliminates duplicate directory specifications.

   This allows to specify, e.g.,
      set TeXinputs=.;c:\mymacros;
   with the effect that the search for TeX input files starts with the
   current directory and the directory 'c:\mymacros' and continues with
   the standard search path from the configuration file.

   A '\' is appended to each directory specification if it is not
   already present.  Therefore 'c:' and 'c:\' both specify the root
   directory of drive C: whereas 'c:.' and 'c:.\' both specify the
   current directory.

   A directory specification may contain Dos style wild cards, i.e.,
   '...\*\...' is matched by, e.g., '...\foo\...' and '...\bar\...' but
   not by '...\foo.bar\...'.  A directory specification may contain
   '...\\...' indicating recursive subdirectory search; this is matched
   first by '...\...' and then by '...\*\\...'.  Nothing else should be
   assumed about the search order of various directories matching one
   and the same directory specification.

   A '~' as first character in a directory specification is replaced by
   the root '<texmf>\' of the TeX directory structure (TDS).  This is
   the recommended way to refer to parts of the TDS tree, because it is
   independent of the actual location of the TDS; all compile-time
   defaults use this form.  The specification 'TFMfonts=~fonts\tfm\\'
   would search the whole TFM fonts subtree of the TDS.

   A directory specification for bitmap fonts may contain '...\(m)\...'
   which is replaced by '...\<mode>\...', where <mode> can be specified
   by the '-m<mode>' command line option or is the default mode '*'.

   When a program starts, the search path for each relevant type of
   input file (e.g., TFMfonts, TeXinputs, and TeXformats for TeX) is
   analyzed and a list of directories is built.  For each directory
   specification all matching directories are appended to the list
   unless they are already in the list. The list of directories is kept
   in a cache (in memory).

   When a program needs to find a file, the file name may or may not
   specify a directory part; in the later case the program tries to
   find the file in one of the directories in the cache.  For bitmap
   fonts the string 'dpi<nnn>\' is appended to all explicit or implicit
   directory names, where <nnn> is the resolution in dots per inch.

   This mechanism avoids the quite time consuming recursive directory
   search each time a file is to be found.  It does, however, assume
   that no new directories are created during the execution of a program
   such as TeX (or at least that files in such new directories need not
   be found).

The configuration file:

   A Dos-TP configuration file with name 'texmf.cnf' can specify values
   for all file search paths as well as for a few other variables.
   The programs first try to find the configuration file in the
   directory specified by the 'TeXMFcnf' Dos environment variable (or in
   the current directory).  If this fails a configuration file in the
   parent of the '.exe' file's directory is used (this should be
   '<texmf>\dostp\texmf.cnf').

   Configuration file lines specifying a value must be of the form
      <keyword>=<value>   or   <keyword>.<qualifier>=<value>
   without leading, trailing, or intervening blanks.  Here <keyword> is
   a sequence of upper or lower case letters (the case is irrelevant),
   <qualifier> is a sequence of letters or digits.  Any lines not of
   this form are ignored.

Dos environment variables:

   The values for the Dos environment variables can be specified as
   'set <keyword>=<value>' or 'set <keyword>.<qualifier>=<value>'.

Keywords and compile-time default values for file search paths:

   <keyword>     <compile-time default>  <usage>

   'PKfonts'     '.;~fonts\pk\(m)\\'   PK fonts
   'GFfonts'     '.;~fonts\gf\(m)\\'   GF fonts
   'TFMfonts'    '.;~fonts\tfm\*\*'    TFM fonts (TeXfonts)
   'VFfonts'     '.;~fonts\vf\*\*'     VF fonts
   'TeXinputs'   '.;~tex\\'            (e)TeX inputs
   'TeXformats'  '.;~dostp\ini'        (e)TeX formats, pool, and code pages
   'MFinputs'    '.;~fonts\source\*\*;~metafont\*\\'      MF inputs
   'MFbases'     '.;~dostp\ini'        MF bases, pool, and code pages
   'MPinputs'    '.;~metapost\*\\'     MP inputs
   'MPmems'      '.;~dostp\ini'        MP mems, pool, and code pages
   'MFTfiles'    '.;~mft\\'            MFT styles
   'BIBinputs'   '.;~bibtex\bib\\'     BibTeX databases
   'BSTinputs'   '.;~bibtex\bst\\'     BibTeX styles
   'WEBfiles'    '.;~web\\'            PATCHWEB/TGL/WVE inputs

Other keywords:

   Here a Dos environment value takes precedence over a configuration
   file value; if neither is specified, the compile-time default value
   is used.

   'temp'        'c:'                  directory for temporary files or
                                       subdirectories

   'TeXMFedt'    'TeXMFedt'            name of the command to be invoked
                                       when (e)TeX/METAFONT/MetaPost are
                                       terminated with the `E' option;
                                       the command (usually a batch
                                       file) has two parameters: a file
                                       name and a line number

   'TeXMF'       grand parent of       root of the TDS, to be
                 the '.exe' file's     substituted for a leading '~'
                 directory (this
                 should be '<texmf>\').

Command line options:

   For some programs the file search mechanism uses a few command line
   options (they must precede all non-option command line parameters):

      <option>        <default>   <usage>

      -f<format>      'plain'     default format for TeX (INITEX and
                                  VIRTEX) and eTeX (eINITEX and eVIRTEX)
                                  used as qualifier by by (e)VIRTEX

      -b<base>        'plain'     default base for METAFONT (INIMF and
                                  VIRMF) used as qualifier by by VIRMF

      -m<mem>         'plain'     default mem for MetaPost (INIMP and
                                  VIRMP) used as qualifier by by VIRMP

      -q<qualifier>   'plain'     qualifier for DosTPQry

      -m<mode>        '*'         mode for bitmap fonts

---  Peter Breitenlohner (peb@mppmu.mpg.de) ------------  27 Aug 96  ---