Donald Knuth's web specification, summarized
-----------------------------------------------------------------

Notes by Man Kein Hong, 2002-10-17

These were made in a hurry, so in the event of confusion, please
read the original file, webman.tex, available from CTAN in the
directory knuth/web.

-----------------------------------------------------------------

NOTE: _ denotes a space, since it is not used in the specs
NOTE: [item] denotes an item to be filled in

-----------------------------------------------------------------

@_		Begins a module
@* [title].	Begins a major module

@<[long name]@>		Module name
@<[short name]...@>	Abbreviated module name

Module names are stripped of leading and trailing spaces, and
any multiple combinations of spaces and/or tabs count as a
single space.

-----------------------------------------------------------------

Process:

(1) all unnamed modules are copied in order, first approx. made
(2) all module names are substituted with module's code
(3) all defined macros are substituted
(4) comments removed except metacomments (@{ and @}) and
    module-number comments
(5) if more than one module have the same name, they are strung
    together

-----------------------------------------------------------------

@d identifier=constant		Simple arithmetic, done immediately
@d identifier==Pascal text	Text substitution
@d identifier(#)==Pascal text	Parameterized text substitution,
				# is replaced with parameter

All identifiers must have length > 1.
All macros and modules must have balanced parentheses.
Macros must be defined before they can be used.
RHS = integer constant|numeric macros|preprocessed strings|
      plus or minus signs
Comments are allowed to follow
Numeric values must be < 2^15
Argument to a parametric macro must not come from the expansion
of a macro that has not already been started.

-----------------------------------------------------------------

A preprocessed string can be:

"A"	single letter alphabet, ASCII value used in calcs
"..."	sent to a string pool, numbered 256 onwards, and pool
        is a list of strings, each prefixed by a 2 character
	ASCII length specification. E.g. 04Dude

-----------------------------------------------------------------

@@			always @

@f left==right		format definition (or substitution)
@p			unnamed Pascal module

@'NNN			octal number
@"XXXX			hexadecimal number

@{ ... @}		metacomment
@&			concatenate token strings into one

@^[item]@>		index item
@.[item]@>		index item
@:[item]@>		index item
@t[control text]@>	boxed item
@=[text]@>		verbatim text

@\			force end of line
@!			highlight & index special identifier
@?			cancels highlighting & indexing
@,			adds a thin space
@/			formatting line break
@|			formatting line break (in expression)
@#			line break with white space
@+			cancels a line break
@;			invisible semicolon; for formatting

-----------------------------------------------------------------

(* and *)	comments, converted to metacomments
(. and .)	comments, converted to metacomments

-----------------------------------------------------------------

