


NOWEB(1)                 USER COMMANDS                   NOWEB(1)



NAME
     noindex - build external index for noweb document

SYNOPSIS
     noindex _b_a_s_e_n_a_m_e[.tex]

DESCRIPTION
     _n_o_i_n_d_e_x looks through _L_a_T_e_X .aux files for identifiers  that
     should  go in a _n_o_w_e_b external index.  It sorts all identif-
     iers and writes the results on _b_a_s_e_n_a_m_e.nwi.

NOWEB INDEXING STRATEGIES
     A _n_o_w_e_b program consists of one or more files.  In the  sim-
     ple  case,  these files are run through _n_o_w_e_a_v_e together, to
     produce a single _L_a_T_e_X file.   _n_o_w_e_a_v_e  -_i_n_d_e_x  suffices  to
     produce  an index and cross-referencing information; neither
     _n_o_d_e_f_s nor _n_o_i_n_d_e_x is required.

     When a _n_o_w_e_b program consists of several source files, it is
     often better to run each source file through _n_o_w_e_a_v_e to pro-
     duce its own _L_a_T_e_X file, then  use  _n_o_i_n_d_e_x  to  produce  an
     external index.  This technique has several advantages:

          The line numbers in the _L_a_T_e_X files correspond  to  the
          line  numbers  in  the source files, so it is easier to
          diagnose _L_a_T_e_X errors.

          The _L_a_T_e_X \includeonly feature can be used,  making  it
          possible  to  format  parts  of  large  programs  while
          retaining complete cross-reference information.

          When used with _m_a_k_e(_1), the  technique  avoids  running
          _n_o_w_e_a_v_e over source files that have not changed.

          Using  the  external  index  places  fewer  demands  on
          _L_a_T_e_X's memory, making it read its .aux files much more
          quickly.

     The disadvantages are that _n_o_d_e_f_s and _n_o_i_n_d_e_x are needed for
     full cross-referencing and a properly sorted index.

EXAMPLE
     This example assumes a _n_o_w_e_b program of three source  files:
     a.nw, b.nw, and c.nw. The file doc.tex is assumed to contain
     _L_a_T_e_X boilerplate, including the commands

          \noweboptions{externalindex}
          \include{a}
          \include{b}
          \include{c}





Sun Release 4.1    Last change: local 4/19/93                   1






NOWEB(1)                 USER COMMANDS                   NOWEB(1)



     The first sequence of steps is to create a file listing  all
     the identifiers defined anywhere in a, b, or c.

          nodefs a.nw > a.defs
          nodefs b.nw > b.defs
          nodefs c.nw > c.defs
          sort -u a.defs b.defs c.defs | cpif all.defs

     Using _s_o_r_t -_u and _c_p_i_f(_1) avoids  changing  all.defs  unless
     the  set  of identifiers changes.  This technique, used in a
     Makefile, avoids unnecessary rebuilding.

     The next series of steps is to create _L_a_T_e_X files with  full
     cross-reference information for all identifiers.

          noweave -n -indexfrom all.defs a.nw > a.tex
          noweave -n -indexfrom all.defs b.nw > b.tex
          noweave -n -indexfrom all.defs c.nw > c.tex

     The final steps run _L_a_T_e_X once to create  .aux  files,  then
     _n_o_i_n_d_e_x  to create the index, then _L_a_T_e_X again to format the
     complete document.

          latex doc
          noindex doc
          latex doc

     In a Makefile, _n_o_i_n_d_e_x can be run before every invocation of
     _L_a_T_e_X.

BUGS
     _n_o_i_n_d_e_x is distributed in awk and Icon  versions.   The  awk
     version is slow and does a poorer job sorting.

     There is no comparable machinery to make it possible to  use
     multiple files with the HTML back end.

SEE ALSO
     _n_o_w_e_a_v_e(_1), _n_o_d_e_f_s(_1), _c_p_i_f(_1)

AUTHOR
     Norman     Ramsey,     Bellcore.       Internet      address
     norman@bellcore.com.












Sun Release 4.1    Last change: local 4/19/93                   2



