The <readgen/> command

TopLeaf is capable of creating tables of contents and indexes using captured document or custom content. These tables can be exported to file after typesetting the partition, or included as part of the typesetting input stream.

The <readgen/> command issues a request to generate and read the contents of a named file type into the input stream.

The command format is:

<readgen type="TYPE" passes="PASSES" />

where TYPE is one of:

The value PASSES specifies the number of times the composition engine processes the entire document stream in order to create and include the requested file type. On the first pass the input stream is typeset and the content for the requested data type is generated. On all other passes the content generated from the previous pass is inserted at the point at which the <readgen/> command was processed.

The value of passes defaults to 2. Where more than one <readgen/> command is encountered, the actual number of passes performed is the minimum required to satisfy all <readgen/> requests.

For example, to generate and include the partition Table of Contents, use the following:

<readgen type="toc" />