Template:Recto-verso header/doc

Usage
Recto-verso header is intended to make it easier to deal with the differences between recto and verso page headers in simple cases. By convention, recto pages have a page header consisting of a centred chapter or section title and a right-aligned page number, while verso pages have a left-aligned page number and a centred work title. Similarly, works tend to start their page numbering (page "1") on a recto page, meaning odd-numbered pages are recto pages and even-numbered pages are verso pages. This template attempts to make the changes semi-automatic by calling RunningHeader with different parameters depending on whether the provided page number is odd or even.

The intended use is to insert this template in the Header field of the work's index page with the page number argument replaced with. When creating a page in the Page: namespace, the ProofreadPage extension will replace that argument with the actual page number, leading to a template invocation that will do the right thing. You can, of course, also use it directly on a page in the Page: namespace, but that will usually not be any easier than just using directly.

Note that this template deliberately only handles very simple and regular cases, and does not expose the full functionality of RunningHeader. It is intended to make simple cases simple, not to be everything to everyone in all cases. For a template with some more functionalities see.

Syntax
The syntax is:

Three columns
When the header has three columns, the syntax is:

Examples

 * Typical use with the work's title on verso pages and the chapter title on recto pages




 * When the text (often the work's title) is the same on all pages, but the page number is on the left for verso pages and right for recto pages




 * If the header has three columns, the final two parameters set what the column opposite the page number has on recto and verso pages



Limitations
The template is made to be simple, and consequently it deliberately does not even try to handle complicated or edge cases. There is nothing this template can do that you cannot also do with directly (all it does is call  with various parameters), so if you can't do what you want with this template you'll probably want to use that instead.

Specifically, this template only supports plain arabic page numbers (it works by calculating the modulo of the page number: if there's a remainder it's odd, if there's not it's even). Non-numeric page numbers and things like roman numerals either have no inherent way to determine whether they are a recto or verso page, or they would require a ton of complicated code to convert into a computable number, and consequently they are not supported in this template. Use directly for that. For lower-case roman numerals you can use.

Similarly, supporting more than page number and work/chapter title would complicate the code immensely and is better handled by to begin with. The same goes for various partial alignment, conditional behaviour, and so forth. If you need that you should use directly rather than this template.

The central text (chapter, work…) can be formatted as desired (italics, larger font…), but this does not apply to the page number. If you need to format this too, use.

Tricks

 * There's nothing preventing you from swapping the text for the recto and verso arguments. This template does not know anything about what you put in there: it's all just text, and it'll dutifully spit it out on alternating pages regardless of content. Does your work have the work's title on recto pages and the chapter title on verso pages? Just swap the arguments.