


TEX(1)                                                     TEX(1)


NNAAMMEE
       tex, virtex, initex - text formatting and typesetting

SSYYNNOOPPSSIISS
       tteexx [_o_p_t_i_o_n_s] [_c_o_m_m_a_n_d_s]

DDEESSCCRRIIPPTTIIOONN
       This  manual page is not meant to be exhaustive.  The com-
       plete documentation for this version of TeX can  be  found
       in the info file or manual _W_e_b_2_C_: _A _T_e_X _i_m_p_l_e_m_e_n_t_a_t_i_o_n.

       TeX  formats  the interspersed text and commands contained
       in the named files and outputs  a  typesetter  independent
       file  (called _D_V_I, which is short for _D_e_V_i_c_e _I_n_d_e_p_e_n_d_e_n_t).
       TeX's capabilities and language are described in _T_h_e  _T_e_X_-
       _b_o_o_k.   TeX  is normally used with a large body of precom-
       piled macros, and there are  several  specific  formatting
       systems,  such as LaTeX, which require the support of sev-
       eral macro files.

       This version of TeX looks at its command line to see  what
       name it was called under.  Both iinniitteexx and vviirrtteexx are sym-
       links to the tteexx executable.  When called  as  iinniitteexx  (or
       when  the ----iinnii option is given) it can be used to precom-
       pile macros into a _._f_m_t file.  When called  as  vviirrtteexx  it
       will  use  the  _p_l_a_i_n format.  When called under any other
       name, TeX will use that name as the name of the format  to
       use.   For  example,  when called as tteexx the _t_e_x format is
       used, which is identical to the _p_l_a_i_n  format.   The  com-
       mands  defined  by  the _p_l_a_i_n format are documented in _T_h_e
       _T_e_X_b_o_o_k.  Other formats that are often  available  include
       _l_a_t_e_x and _a_m_s_t_e_x.

       The  _c_o_m_m_a_n_d_s given on the command line to the TeX program
       are passed to it as the first  input  line.   (But  it  is
       often easier to type extended arguments as the first input
       line, since UNIX shells tend to gobble up or  misinterpret
       TeX's favorite symbols, like backslashes, unless you quote
       them.)  As described  in  _T_h_e  _T_e_X_b_o_o_k,  that  first  line
       should  begin  with  a  filename, a _\_c_o_n_t_r_o_l_s_e_q_u_e_n_c_e, or a
       _&_f_o_r_m_a_t_n_a_m_e.

       The normal usage is to say
              _t_e_x _p_a_p_e_r
       to start processing _p_a_p_e_r_._t_e_x.  The name _p_a_p_e_r will be the
       ``jobname'',  and is used in forming output filenames.  If
       TeX doesn't get a filename in the first line, the  jobname
       is  _t_e_x_p_u_t.   When  looking  for a file, TeX looks for the
       name  with  and  without  the  default  extension   (_._t_e_x)
       appended, unless the name already contains that extension.
       If _p_a_p_e_r is the ``jobname'', a log of error messages, with
       rather  more  detail  than normally appears on the screen,
       will appear in _p_a_p_e_r_._l_o_g, and the output file will  be  in
       _p_a_p_e_r_._d_v_i.



Web2C 7.2                6 December 1997                        1





TEX(1)                                                     TEX(1)


       TeX  will  look in the first line of the file _p_a_p_e_r_._t_e_x to
       see if it begins with the magic sequence _%_&.  If the first
       line  begins  with _%_&_i_n_i then TeX will run in iinniitteexx mode.
       Otherwise, a _%_&_f_o_r_m_a_t line names a format to be used.

       The _e response to TeX's error  prompt  causes  the  system
       default editor to start up at the current line of the cur-
       rent file.  The environment variable TEXEDIT can  be  used
       to  change  the editor used.  It may contain a string with
       "%s" indicating where the filename goes and "%d"  indicat-
       ing  where  the  decimal  line  number (if any) goes.  For
       example, a TEXEDIT string for eemmaaccss can be set with the sshh
       command
              _T_E_X_E_D_I_T_=_"_e_m_a_c_s _+_%_d _%_s_"_; _e_x_p_o_r_t _T_E_X_E_D_I_T

       A  convenient  file in the library is _n_u_l_l_._t_e_x, containing
       nothing.  When TeX can't find a file it thinks you want to
       input,  it keeps asking you for another filename; respond-
       ing `null' gets you out of the loop if you don't  want  to
       input  anything.   You  can  also  type your EOF character
       (usually control-D).


OOPPTTIIOONNSS
       This version of TeX understands the following command line
       options.

       ----ffmmtt _f_o_r_m_a_t
              Use  _f_o_r_m_a_t  as  the name of the format to be used,
              instead of the name by which TeX was called or a _%_&
              line.

       ----hheellpp Print help message and exit.

       ----iinnii  Be  iinniitteexx, for dumping formats; this is implicitly
              true if the program is called as iinniitteexx.

       ----iinntteerraaccttiioonn _m_o_d_e
              Sets the interaction mode.  The mode can be one  of
              _b_a_t_c_h_m_o_d_e,  _n_o_n_s_t_o_p_m_o_d_e, _s_c_r_o_l_l_m_o_d_e, and _e_r_r_o_r_s_t_o_p_-
              _m_o_d_e.  The meaning of these modes is  the  same  as
              that of the corresponding \commands.

       ----iippcc  Send  DVI  output  to a socket as well as the usual
              output file.  Whether this option is  available  is
              the choice of the installer.

       ----iippcc--ssttaarrtt
              As ----iippcc, and starts the server at the other end as
              well.  Whether this  option  is  available  is  the
              choice of the installer.

       ----kkppaatthhsseeaa--ddeebbuugg _b_i_t_m_a_s_k
              Sets  path  searching  debugging flags according to



Web2C 7.2                6 December 1997                        2





TEX(1)                                                     TEX(1)


              the bitmask.  See the _K_p_a_t_h_s_e_a manual for  details.

       ----mmaakkeetteexx _f_m_t
              Enable  mktex_f_m_t,  where  _f_m_t must be one of _t_e_x or
              _t_f_m.

       ----mmlltteexx
              Enable MLTeX extensions.

       ----nnoo--mmaakkeetteexx _f_m_t
              Disable mktex_f_m_t, where _f_m_t must be one of  _t_e_x  or
              _t_f_m.

       ----oouuttppuutt--ccoommmmeenntt _s_t_r_i_n_g
              Use  _s_t_r_i_n_g for the DVI file comment instead of the
              date.

       ----pprrooggnnaammee _n_a_m_e
              Pretend to be program _n_a_m_e.  This affects both  the
              format used and the search paths.

       ----sshheellll--eessccaappee
              Enable  the  \\wwrriittee1188{{_c_o_m_m_a_n_d}} construct.  The _c_o_m_-
              _m_a_n_d can be any Bourne shell  command.   This  con-
              struct is normally disallowed for security reasons.

       ----vveerrssiioonn
              Print version information and exit.

EENNVVIIRROONNMMEENNTT
       See the Kpathsearch library documentation (the `Path spec-
       ifications'  node) for precise details of how the environ-
       ment variables are used.  The  kkppsseewwhhiicchh  utility  can  be
       used to query the values of the variables.

       One  caveat:  In  most  TeX formats, you cannot use ~ in a
       filename you give directly to TeX, because ~ is an  active
       character, and hence is expanded, not taken as part of the
       filename.  Other programs, such as Metafont, do  not  have
       this problem.


       TEXMFOUTPUT
              Normally,  TeX puts its output files in the current
              directory.  If any output  file  cannot  be  opened
              there,  it tries to open it in the directory speci-
              fied  in  the  environment  variable   TEXMFOUTPUT.
              There  is  no default value for that variable.  For
              example, if you  say  _t_e_x  _p_a_p_e_r  and  the  current
              directory  is  not writable, if TEXMFOUTPUT has the
              value _/_t_m_p, TeX attempts to  create  _/_t_m_p_/_p_a_p_e_r_._l_o_g
              (and _/_t_m_p_/_p_a_p_e_r_._d_v_i, if any output is produced.)





Web2C 7.2                6 December 1997                        3





TEX(1)                                                     TEX(1)


       TEXINPUTS
              Search  path  for  _\_i_n_p_u_t  and _\_o_p_e_n_i_n files.  This
              should probably start  with  ``.'',  so  that  user
              files are found before system files.

       TEXEDIT
              Command  template  for  switching  to  editor.  The
              default, usually vvii, is set when TeX is compiled.

FFIILLEESS
       The location of the files mentioned below varies from sys-
       tem  to  system.   Use the kkppsseewwhhiicchh utility to find their
       locations.

       _t_e_x_._p_o_o_l
              Encoded text of TeX's messages.

       _t_e_x_f_o_n_t_s_._m_a_p
              Filename mapping definitions.

       _*_._t_f_m  Metric files for TeX's fonts.

       _*_._f_m_t  Predigested TeX format (.fmt) files.

       _$_T_E_X_M_F_M_A_I_N_/_t_e_x_/_p_l_a_i_n_/_b_a_s_e_/_p_l_a_i_n_._t_e_x
              The basic macro package described in the TeXbook.

BBUUGGSS
       This version of TeX fails to trap arithmetic overflow when
       dimensions  are  added  or  subtracted.   Cases where this
       occurs are rare, but when it does the generated  _D_V_I  file
       will be invalid.

SSEEEE AALLSSOO
       mmff(1), uunndduummpp(1),
       Donald  E.  Knuth, _T_h_e _T_e_X_b_o_o_k, Addison-Wesley, 1986, ISBN
       0-201-13447-0.
       Leslie Lamport, _L_a_T_e_X _-  _A  _D_o_c_u_m_e_n_t  _P_r_e_p_a_r_a_t_i_o_n  _S_y_s_t_e_m,
       Addison-Wesley, 1985, ISBN 0-201-15790-X.
       K.      Berry,     _E_p_l_a_i_n_:     _E_x_p_a_n_d_e_d     _p_l_a_i_n     _T_e_X,
       ftp://ftp.cs.umb.edu/pub/tex/eplain/doc.
       Michael Spivak, _T_h_e _J_o_y _o_f _T_e_X, 2nd edition,  Addison-Wes-
       ley, 1990, ISBN 0-8218-2997-1.
       _T_U_G_b_o_a_t (the journal of the TeX Users Group).

TTRRIIVVIIAA
       TeX,  pronounced  properly, rhymes with ``blecchhh.''  The
       proper spelling in typewriter-like fonts  is  ``TeX''  and
       not ``TEX'' or ``tex.''

AAUUTTHHOORRSS
       TeX  was  designed  by Donald E. Knuth, who implemented it
       using his Web system for Pascal programs.  It  was  ported
       to  Unix  at Stanford by Howard Trickey, and at Cornell by



Web2C 7.2                6 December 1997                        4





TEX(1)                                                     TEX(1)


       Pavel Curtis.  The version now offered with the  Unix  TeX
       distribution  is  that  generated  by  the Web to C system
       (wweebb22cc), originally written by Tomas Rokicki and Tim  Mor-
       gan.





















































Web2C 7.2                6 December 1997                        5


