I have a website divided into Chronicles. I have a trail per chronicle which can be typeset. I also want a trail which includes all the chronicle trails. Is it possible to ‘include’ another trail as part of the top-trail?
Not only is it possible, it is relatively easy!
- Download trailoftrails.php Δ and put it in the cookbook directory.
- As of wikipublisher version 2.1.8, the (:typeset-book:) directive allows us to use a custom “extract trail stops” function to build our own trail.
- For the top-trail page, say called Chronicles.TopTrail create a local/Chronicles.TopTrail.php file that contains:
- if you wish to exclude the text of each trail page, set $IncludeEachTrailPageText = false;
- On Chronicles.TopTrail, make each Chronicle page a trail list item, add (:typeset-book:) and that’s it!
When you press the Typeset Book button, you should get a chapter for each Chronicle. If you include each trail page’s text (the default), this will act as a mini table of contents at the start of each chapter.
For a working example of this, go to www.wearelost.eu/Main/Pdf which is the ‘TopTrail’ of a number of Trail pages all found below /Group/Pdf.
Contributors: John Rankin and Gustav Andersson, Tuesday, 6 November 2007.
« Typeset a Page List | Cookbook | Underscore in PDF Bookmark »