manpagez: man pages & more
man weave(1)
Home | html | info | man
weave(1)                             2026"                            weave(1)


NAME

       weave - translate a literate programming WEB to TeX


SYNOPSIS

       weave [-p] [-x] webfile[.web] [{changefile[.ch]|-} [outfile[.tex]]]


DESCRIPTION

       The weave program creates a TeX file for viewing a literate program
       written in WEB. It takes appropriate care of typographic details like
       page layout and the use of indentation, italics, boldface, etc., and it
       supplies extensive cross-index information that it gathers
       automatically.

       The output TeX file name is formed by adding .tex to the root of the
       WEB file name or from the third argument. In this case you can specify
       '-' as an empty change file. These non-option command line arguments
       are handled in the same way as tangle(1).

       There are several macros that probably should be redefined by the
       programmer at the beginning of the WEB file. It is a good idea to set
       \title to the name of the program.  To output only those modules which
       are changed, one can say \let\maybe=\iffalse, usually as the first
       change in the change file.


OPTIONS

       See tex(1) for details of command-line parsing.

       -p     says to \input pwebmac.tex, a variant on the default webmac.tex
              which is more suited for PDF output.

       -x     says to omit the index, module name list, and table of contents
              pages.  (A CONTENTS.tex file will still be written when the TeX
              file is processed, however, unless some macros in webmac.tex are
              redefined.)

       The standard -help and -version options are also supported.


ENVIRONMENT

       The programs look for the input files using the environment variable
       WEBINPUTS. If it is not set, it uses the system default. See the
       Kpathsea manual at https://tug.org/kpathsea for the details of the
       searching.


BUGS

       The table of contents appears at the end of the output.


FILES

       $TEXMFMAIN/tex/plain/knuth-lib/webmac.tex
              TeX macros used by weave output.

       $TEXMFMAIN/tex/plain/pwebmac/pwebmac.tex
              Alternative TeX macros used for PDF output.

       CONTENTS.tex
              Temporary file created by weave for the table of contents.


SEE ALSO

       tangle(1) for references, authors, and other information.

       Public discussion list and bug reports: https://lists.tug.org/tex-k

Web2C                          2 February 2026                        weave(1)

texlive-bin 2026.78235 - Generated Thu Mar 5 16:08:56 CST 2026
© manpagez.com 2000-2026
Individual documents may contain additional copyright information.