A pattern declaration must be in a file called NAME.inweb which is inside a
directory of plugins and templates, called NAME. The declaration should
be written thus:
Language "NAME" {
...
}
where the body ... consists of blank lines, or of any of the following,
given in any order:
-
based on: ENAMEdeclares that the new pattern is based on an existing one calledENAME. For the pattern to be used, Inweb must be able to see that existing pattern somewhere: it will halt with an error if not. Any of the settings in this section (other thanbased on) will be taken fromENAMEif the new pattern does not specify them. -
default range: RANGEtells Inweb how granular the weave of a multi-section web should be, by default.default range: sectionsmeans that each section should be woven to its own file.default range: chaptersmeans that each chapter is in its own file, which presents all its sections in turn. -
format: FORMATgives the fundamental kind of output being made. This must be one of those supported by Inweb:HTML ePub plain TeX TestingInwebePubis the book format;plainis plain text;TeXis (plain) TeX; andTestingInwebshould not be used except for its advertised purpose. -
block template: FILEtells Inweb not to read a file of this name from the template(s) that the current template is based on. This can only be used with template files liketemplate-body.html. (It is less fuss to change the version oftemplate-body.html: simply supply a replacement in the new template's directory. But if the idea is to not have the file at all, then this command is needed.) -
plugin: PNAMEtells Inweb to include the pluginPNAME, which should be a subdirectory calledPNAMEof the pattern directory. It should contain asset files: see Asset Management. -
mathematics plugin: PNAMEtells Inweb to includePNAMEif and only if the weave includes any TeX mathematics formulae in commentary. -
footnotes plugin: PNAMEtells Inweb to includePNAMEif and only if the weave includes any use of footnotes in commentary. -
assets, followed by lines containing instructions on how to include files of various types, followed by anendline. See Asset Management. -
initial extension: .EXTis useful only whencommandsare supplied. See The Post-Weave. -
commands, followed by lines containing post-weave shell script commands, followed by anendline. See The Post-Weave.