How much control do I have over how Wikipublisher lays out the printed page?
Wikipublisher uses the Wikibook meta element to pass layout control instructions to the typesetting engine. Each instance of the meta element is a type/value attribute pair and Wikipublisher includes pre-set default values for each class of document. Let’s look first at the kinds of control available, then at how to change the default settings.
Have a look at the metadata settings for this page. Click the PDF icon, then press the “View XML” button. Note the list of <meta> elements.
Defining print metadata gives authors and readers a great deal of flexibility. Most meta element settings are generic — they have the same meaning in all document classes (e.g. whether to use a sans or serif font for headings). All classes lists these.
bodystyle | body text can print in a sans or serif font |
colorlinks | text of hyperlinks can be displayed in colour |
duplex | lay out pages for two- or one-sided printing |
floathere | allow floating images and tables to print “here” |
fontset | choose a fontset for heading (sans) and body (serif) text |
headingstyle | heading text can print in a sans or serif font |
imagesize | choose how to print images for optimum quality |
justification | body text can be set justified or ragged right |
pagesize | paper can be A4, A5 or US letter |
parasep | paragraphs can be separated by space or by indenting |
watermark | a watermark can be printed on every page |
However, some metadata settings are class-specific and apply only to certain classes of document (e.g. what chapter style to use for a book). Selected classes lists these.
autonumber | whether (and how deeply) to number sections | report, article |
chapterstyle | style used for chapter headings | book |
cover | alignment of front cover text | report |
coverstyle | cover text can print is sans or serif font | report |
figurelist | generate a list of figures | report, book |
return | include the sender’s return address in the footer | letter |
sectionnewpage | start major sections on a new recto page | report, article |
tablelist | generate a list of tables | report, book |
textsize | print text in a regular or large fontsize | article, letter |
toc | generate a table of contents | article |
A reader can change the default settings by pressing a PDF options button. This will display a form showing the current settings, which can then be modified as the reader sees fit. Any revisions apply to the current print request only; subsequent printings revert to the default metadata values.
An author can add metadata type/value pairs to any (:typeset:) directive. Any such settings are locked into place — a reader cannot adjust them in the corresponding options form. For example, an author setting up a trail page for typesetting might write the following:
(:typeset cover=left sectionnewpage=on imagesize=sidecaps:)
Site-wide default values are defined on template pages in the Site group: Book Template, Calendar Template, Include Template, Letter Template, Print Template, Publish Template, Search Template. An administrator can edit these to change the default settings for the entire site. An administrator can also change the defaults for a particular group, by creating one or more template pages within the group.
For example, to set local defaults for typesetting individual pages in the current group:
That’s all. The local group settings will take precedence over the site-wide settings. If you wish to change one of the generic settings, for example to make US letter the default paper size for all printed output, you have to change this in all templates. This group has a local Search Template.
Category: metadata