web2c: Determining the memory dump to use

 
 4.3.2 Determining the memory dump to use
 ----------------------------------------
 
 The virgin form (⇒Initial and virgin) of each program always
 reads a memory dump before processing normal source input.  All three
 programs determine the memory dump to use in the same way:
 
   1. If the first non-option command-line argument begins with '&', the
      program uses the remainder of that argument as the memory dump
      name.  For example, running 'tex \&super' reads 'super.fmt'.  (The
      backslash protects the '&' against interpretation by the shell.)
 
   2. If the '-fmt' resp. '-base' option is specified, its value is used.
 
   3. If the '-progname' option is specified, its value is used.
 
   4. If the first line of the main input file (which must be specified
      on the command line, not in response to '**') is '%&DUMP', and DUMP
      is an existing memory dump of the appropriate type, DUMP is used.
 
      The first line of the main input file can also specify which
      character translation file is to be used:
      '%&-translate-file=TCXFILE' (⇒TCX files).
 
      These two roles can be combined: '%&DUMP -translate-file=TCXFILE'.
      If this is done, the name of the dump must be given first.
 
   5. Otherwise, the program uses the program invocation name, most
      commonly 'tex' resp. 'mf'.  For example, if 'latex' is a link to
      'tex', and the user runs 'latex foo', 'latex.fmt' will be used.