Automation of MiniToc

To increase the efficiency of your publishing workflow, this plugin can be run as part of an automation process.

A FrameMaker “CallClient” notification is provided for the Build MiniToc command. This can be called from various automation environments, such as ExtendScript, FrameScript, and other FDK clients.

The exact syntax for calling this command varies based on the automation environment in use, but the general concept is the same for all. First you pass the client name, typically “Pubs-Tools:MiniToc” (cased and spelled exactly as defined in the maker.ini file). Then you provide the “ID” of the document or book to be processed (or nothing to process the current file or book).

If you’re using ExtendScript, the following code will run the Build MiniToc command on the current book or document. Remember to set up the minitoc.ini file first.

CallClient("Pubs-Tools:MiniToc", "");

To run this automatically as part of the DITA-FMx book-build process, select the Run Custom Script option in the DITA-FMx Book Build Settings dialog (or enable the RunScript parameter in the ditafmx-bookbuild.ini file). Enter “Pubs-Tools:MiniToc” as the Client name, then enter “%BOOKID%” as the Args value. When a book is generated from a map, this client plugin will process the book files.

Remember: In order for MiniToc to function, the minitoc.ini file must exist in the same folder as the files being processed.