NOWEB(1) | General Commands Manual | NOWEB(1) |
noindex - build external index for noweb document
noindex basename[.tex]
noindex looks through LaTeX .aux files for identifiers that should go in a noweb external index. It sorts all identifiers and writes the results on basename.nwi.
A noweb program consists of one or more files. In the simple case, these files are run through noweave together, to produce a single LaTeX file. noweave -index suffices to produce an index and cross-referencing information; neither nodefs nor noindex is required.
When a noweb program consists of several source files, it is often better to run each source file through noweave to produce its own LaTeX file, then use noindex to produce an external index. This technique has several advantages:
The disadvantages are that nodefs and noindex are needed for full cross-referencing and a properly sorted index.
This example assumes a noweb program of three source files: a.nw , b.nw , and c.nw. The file doc.tex is assumed to contain LaTeX boilerplate, including the commands
\include{a} \include{b} \include{c}
The first sequence of steps is to create a file listing all the identifiers defined anywhere in a, b, or c.
nodefs b.nw > b.defs nodefs c.nw > c.defs sort -u a.defs b.defs c.defs | cpif all.defs
Using sort -u and cpif(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 LaTeX files with full cross-reference information for all identifiers.
noweave -n -indexfrom all.defs b.nw > b.tex noweave -n -indexfrom all.defs c.nw > c.tex
The final steps run LaTeX once to create .aux files, then noindex to create the index, then LaTeX again to format the complete document.
noindex doc latex doc
In a Makefile, noindex can be run before every invocation of LaTeX.
noindex 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.
This man page is from noweb version 2.12.
Norman Ramsey, Tufts University. Internet address
Norman.Ramsey@tufts.edu.
Noweb home page at http://www.cs.tufts.edu/~nr/noweb.
local 10/40/2008 |