Template:Recto-verso header
Usage
[edit]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 recto and verso (Q255731) 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 {{{pagenum}}}
. 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 {{RunningHeader}} 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 {{recto-verso header2}}.
Syntax
[edit]The syntax is:
{{rvh|pagenumber|text for recto pages|text for verso pages}}
… or …
{{rvh|pagenumber|text for all pages}}
Three columns
[edit]When the header has three columns, the syntax is:
{{rvh|pagenumber|recto text|verso text|recto text opposite page number|verso text opposite page number}}
… or …
{{rvh|pagenumber|text for all pages|4=recto text opposite page number|5=verso text opposite page number}}
Examples
[edit]- Typical use with the work's title on verso pages and the chapter title on recto pages
{{rvh|1|A Chapter|The Great Work}}
{{rvh|2|A Chapter|The Great Work}}
- 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
{{rvh|1|The Great Work}}
{{rvh|2|The Great Work}}
- If the header has three columns, the final two parameters set what the column opposite the page number has on recto and verso pages
{{rvh|1|An Article|The Great Journal|1800.]|[Jan.}}
{{rvh|2|An Article|The Great Journal|1800.]|[Jan.}}
Limitations
[edit]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 {{RunningHeader}} directly (all it does is call {{RunningHeader}} 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 {{RunningHeader}} directly for that. For lower-case roman numerals you can use {{recto-verso header2}}.
Similarly, supporting more than page number and work/chapter title would complicate the code immensely and is better handled by {{RunningHeader}} to begin with. The same goes for various partial alignment, conditional behaviour, and so forth. If you need that you should use {{RunningHeader}} 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 {{recto-verso header2}}.
Tricks
[edit]- 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.
See also
[edit]- {{Recto-verso header2}} – like this template, but enables also using roman numerals and formatting page numbers
- {{Recto-verso header3}} – for left/right aligned non-page number headers
- {{Recto-verso header4}} – for left/right aligned page number headers
- {{RunningHeader}} – Simple running header
- {{Recto-verso}} – Template with flexible content to cover non-standard cases