Recent Changes · Search:

Support the Project

Wikipublisher

PmWiki

edit SideBar

 

Wikipublisher supports local customisation of book layout through a wikibook-book.cfg file and an extensible metadata model. Customisation requires some knowledge of LATEX, such as that found in The Not So Short Introduction. Access to a comprehensive and authoritative guide is highly desirable; see recommended TEX and LATEX resources.

Wikibook configuration

The Wikibook PDF server administrator can create a local/wikibook-book.cfg file and use \renewcommand to redefine the commands used to lay out the book. The modifications automatically apply to all books generated by the PDF server. The default command definitions are specified in templates/wikibook.sty and templates/wikibook-book.sty. Customising book layout commands lists the most commonly customised commands.

Layout purposeRenew command
Define running headers and footers for odd, even and plain pages\bookheadfootduplex
Control the style of part pages (defaults to plain; some style guides want empty)\bookpartpagestyle
Describe the layout of the regular halftitle page\bookhalftitle
Describe the layout of the regular title page\booktitle
Describe the layout of the title verso (legal) page\booklegal

Tip: The variables used in these commands generally contain the @ sign. This means the wikibook-book.cfg file needs to start and end with the \makeatletter and \makeatother commands respectively.

The administator needs to take care to customise book layout using the wikibook-book.cfg file, not the wikibook.cfg file. The Wikibook PDF server loads the wikibook.sty and wikibook.cfg files for all document types. In addition, it loads a wikibook-book.sty and wikibook-book.cfg files only when generating books. So if an administrator uses wikibook.cfg to redefine a command defined in wikibook-book.sty, the PDF server will only work if the requested document is a book; otherwise, it will stop with an error, as it tries to redefine a command that has not been previously defined.

Extensible metadata

The server administrator can extend the book metadata model as follows.

  1. Define the metadata names in the wiki’s local/config.php file, using the $TbookCustomMetadata array. For example:

    $TbookCustomMetadata = array(degree, supervisor);

  2. Define the values for the metadata on the book trail page. For example:

    (:degree: Master of Science :)

    (:supervisor: Dr Mary Contrary :)

  3. Reference the values in a redefined layout command (in the PDF server’s local/wikibook-book.cfg file) as \@name. For example, \@degree or \@supervisor.

Metadata values can include line breaks; for example:

(:address: 32 The Terrace\\
Wellington 6140 :)

Charlie

Appendix: Technical Matters | Book Guide | Internationalisation

Creative Commons License
Edit · History · Print · Recent Changes · Search · Links
Page last modified on 26 January 2011 at 09:46 AM