carta
twill(1)

twill1

Translate a literate programming web to tex with mini-indexes

Usage

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

twill-refsort < reffile.ref > sreffile.sref

Overview

The twill program is used to create a TeX file for viewing a literate program written in WEB. The output TeX file name is formed by adding .tex to the root of the file name.

twill is like weave(1), but also supplies cross-reference information in the form of `mini-indexes' for each spread of pages, for identifiers used on that spread, and a `master index' at the end that it gathers automatically.

You need to run twill twice, once to prime the pump and once to get decent answers. Moreover, you must run the output twice through TeX.

For a program foo.web, after a first tex foo you will have output that looks like final pages except that the entries of mini-indexes will not be alphabetized. The first run produces an auxiliary file named foo.ref.
Run twill-refsort <foo.ref >foo.sref and then another tex foo will produce alphabetized output.

Options

See tex(1) for details of command-line parsing, and weave(1) for options accepted.

Environment

The environment variable WEBINPUTS is used to search for the input files, 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.

Files

$TEXMFMAIN/tex/plain/cweb/cwebbin/twimac-web.tex

TeX macros used by twill output.

History

  • Arch Linux 2026-11-01: the text shown here
  • Debian 13 (Trixie)
  • Debian 12 (Bookworm)

Bugs

The table of contents file, CONTENTS.tex, is generated but ignored (unless macros in twimac-web.tex are redefined).

From texlive-doc 2026.1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.