Amaya

Assembling large document collections (Make book)

Amaya enables you to handle document collections. Such a collection may, for example, represent a technical documentation made up of several web pages. The present manual is a document collection.

One of the web pages in the collection contains the title of the entire documentation (an h1 element), an introduction (some other elements), and a list ol or ul whose items li contain links to each chapter. Chapters are separate documents that can have a similar structure.

This organization is useful for browsing, but has several drawbacks when the entire documentation has to be printed.

Amaya addresses this problem with the Tools/Make book command, which assembles a document collection into a single volume. You use typed links for linking chapters, by associating an attribute rel="chapter" or rel="subdocument" with the anchor that refers to a chapter (create a link and use the Attributes tool for the rel attribute).

Each referred chapter or sub-document may be:

To refer to a document subset, you should define a container element (such as a div) enclosing the part of the document to be included, add an identifier to it, and create a link to this container element.

Then, when you activate the Tools/Make book command, all blocks (li elements in the above example) containing a typed link to a chapter will be replaced by the corresponding actual web pages (or a part of it), and Amaya will display a unique document containing the whole collection:

Before each replacement, the Make book command generates a new div element with an id attribute, to clearly separate each included piece.

Pieces of the new generated document may contain normal links, target anchors, and target elements. During the Make book operation, Amaya ensures that each name and id attribute value remains unique in the new document. Amaya changes these values as needed, and updates all relative links.

Amaya automatically transforms external links referring to external documents or to document parts, into internal links to the part that are now included. For example, if the link originally pointed to an external document, the link will now refer to the  div element generated by the Make book command. This ensures that all links are preserved in the new unique document containing the whole collection.

This large document can then be numbered and printed with a complete table of contents and a list of all links.

Example : you can experiment with the Make book command using this test document.