| 1 |
.TH WEAVE 1 "2 February 2026 "Web2C 2026" |
| 2 |
.\"===================================================================== |
| 3 |
.if n .ds TX TeX |
| 4 |
.if t .ds TX \fRT\\h'-0.10m'\\v'0.17v'E\\v'-0.17v'\\h'-0.06m'X\fP |
| 5 |
.\"===================================================================== |
| 6 |
.SH NAME |
| 7 |
weave \- translate a literate programming WEB to TeX |
| 8 |
.SH SYNOPSIS |
| 9 |
\f[B]weave\f[R] [\f[B]-p\f[R]] [\f[B]-x\f[R]] |
| 10 |
\f[I]webfile\f[R][\f[B].web\f[R]] |
| 11 |
[{\f[I]changefile\f[R][\f[B].ch\f[R]]|\f[B]-\f[R]} |
| 12 |
[\f[I]outfile\f[R][\f[B].tex\f[R]]]] |
| 13 |
.\"===================================================================== |
| 14 |
.SH DESCRIPTION |
| 15 |
The |
| 16 |
.B weave |
| 17 |
program creates a \*(TX file for viewing a literate program written in |
| 18 |
WEB. It takes appropriate care of typographic details like page layout |
| 19 |
and the use of indentation, italics, boldface, etc., and it supplies |
| 20 |
extensive cross-index information that it gathers automatically. |
| 21 |
.PP |
| 22 |
The output \*(TX file name is formed by adding |
| 23 |
.B .tex |
| 24 |
to the root of the WEB file name or from the third argument. In this |
| 25 |
case you can specify '-' as an empty change file. These non-option |
| 26 |
command line arguments are handled in the same way as |
| 27 |
.BR tangle (1). |
| 28 |
.PP |
| 29 |
There are several macros that probably should be redefined by the |
| 30 |
programmer at the beginning of the WEB file. It is a good idea to set |
| 31 |
.I \etitle |
| 32 |
to the name of the program. |
| 33 |
To output only those modules which are changed, one can say |
| 34 |
.IR \elet\emaybe=\eiffalse , |
| 35 |
usually as the first change in the change file. |
| 36 |
.\"===================================================================== |
| 37 |
.SH OPTIONS |
| 38 |
See |
| 39 |
.BR tex (1) |
| 40 |
for details of command-line parsing. |
| 41 |
.TP |
| 42 |
.B -p |
| 43 |
says to \fI\einput pwebmac.tex\fP, a variant on the default |
| 44 |
\fIwebmac.tex\fP which is more suited for PDF output. |
| 45 |
.TP |
| 46 |
.B -x |
| 47 |
says to omit the index, module name list, and table of contents pages. |
| 48 |
(A |
| 49 |
.I CONTENTS.tex |
| 50 |
file will still be written when the \*(TX file is processed, |
| 51 |
however, unless some macros in |
| 52 |
.I webmac.tex |
| 53 |
are redefined.) |
| 54 |
.PP |
| 55 |
The standard |
| 56 |
.B -help |
| 57 |
and |
| 58 |
.B -version |
| 59 |
options are also supported. |
| 60 |
.\"===================================================================== |
| 61 |
.SH ENVIRONMENT |
| 62 |
The programs look for the input files using the environment variable |
| 63 |
WEBINPUTS. If it is not set, it uses the system default. See the |
| 64 |
Kpathsea manual at https://tug.org/kpathsea for the details of the |
| 65 |
searching. |
| 66 |
.\"===================================================================== |
| 67 |
.SH BUGS |
| 68 |
The table of contents appears at the end of the output. |
| 69 |
.\"===================================================================== |
| 70 |
.SH FILES |
| 71 |
.TP |
| 72 |
.I $TEXMFMAIN/tex/plain/knuth-lib/webmac.tex |
| 73 |
\*(TX macros used by |
| 74 |
.B weave |
| 75 |
output. |
| 76 |
.TP |
| 77 |
.I $TEXMFMAIN/tex/plain/pwebmac/pwebmac.tex |
| 78 |
Alternative |
| 79 |
\*(TX macros used for PDF output. |
| 80 |
.TP |
| 81 |
.I CONTENTS.tex |
| 82 |
Temporary file created by \fBweave\fP for the table of contents. |
| 83 |
.\"===================================================================== |
| 84 |
.SH "SEE ALSO" |
| 85 |
.BR tangle (1) |
| 86 |
for references, authors, and other information. |
| 87 |
.PP |
| 88 |
Public discussion list and bug reports: https://lists.tug.org/tex-k |