ਫਰਮਾ:Recto-verso header/doc
This is a documentation subpage for ਫਰਮਾ:Recto-verso header. It contains usage information, categories and other content that is not part of the original ਫਰਮਾ page. |
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 (Q255731) changes semi-automatic by calling {{rh}} 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 {{rh}}
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 {{rvh2}}
.
Syntax
[ਸੋਧੋ]The syntax is:
{{rvh|pagenumber|text for recto pages|text for verso pages}}
… or …
{{rvh|pagenumber|text for all pages}}
Three columns
[ਸੋਧੋ]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
[ਸੋਧੋ]- Typical use with the work's title on verso pages and the chapter title on recto pages
{{rvh|1|A Chapter|The Great Work}}
A Chapter
1
{{rvh|2|A Chapter|The Great Work}}
2
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}}
The Great Work
1
{{rvh|2|The Great Work}}
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.}}
1800.]
An Article
1
{{rvh|2|An Article|The Great Journal|1800.]|[Jan.}}
2
The Great Journal
[Jan.
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 {{rh}}
directly (all it does is call {{rh}}
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 {{rh}}
directly for that. For lower-case roman numerals you can use {{rvh2}}
.
Similarly, supporting more than page number and work/chapter title would complicate the code immensely and is better handled by {{rh}}
to begin with. The same goes for various partial alignment, conditional behaviour, and so forth. If you need that you should use {{rh}}
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 {{rvh2}}
.
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.
See also
[ਸੋਧੋ]- {{rvh2}} - like this template, but enables also using roman numerals and formatting page numbers
- {{rvh3}} - for left/right aligned non-page number headers
- {{rh}} - Simple 3 and 4 item running header
- {{rh/5}} 5 item running header left center center center right arrangment, as might be encountered in an index, dictionary or Gazetteer type work.
- {{rv}} - Template with flexible content to cover non-standand cases